Database Schema - JackPercival/chihuaWalk GitHub Wiki
Users
column name |
data type |
details |
id |
integer |
not null, primary key |
first_name |
string |
not null |
last_name |
string |
not null |
email |
string |
not null, unique |
profile_pic |
string |
nullable |
hashed_password |
string |
not null |
Dogs
column name |
data type |
details |
id |
integer |
not null, primary key |
name |
string |
not null |
breed |
string |
not null |
description |
text |
not null |
weight |
integer |
not null |
user _id |
integer |
not null |
address |
string |
not null |
city |
string |
not null |
state |
string |
not null |
country |
string |
not null |
latitude |
decimal |
not null |
longitude |
decimal |
not null |
owner_id
references owners
table
Images
column name |
data type |
details |
id |
integer |
not null, primary key |
dog_id |
integer |
not null |
url |
string |
not null |
dog_id
references dogs
table
Walks
column name |
data type |
details |
id |
integer |
not null, primary key |
dog_id |
integer |
not null |
user_id |
integer |
not null |
start_time |
datetime |
not null |
end_time |
datetime |
not null |
dog_id
references dogs
table
user_id
references users
table
Reviews
column name |
data type |
details |
id |
integer |
not null, primary key |
dog_id |
integer |
not null |
user_id |
integer |
not null |
created_at |
datetime |
not null |
comment |
text |
not null |
behavior |
integer |
not null |
kindness |
integer |
not null |
loudness |
integer |
not null |
energy |
integer |
not null |
dog_id
references dogs
table
user_id
references users
table
Future Enhancements
- Create a Shelter table that holds Shelter information. Each dog would have an associated shelter_id (which holds all the address information)
- Create a Breeds table that holds dog breeds. Each dog would have an associated breed_id