[ ] Contains bullet points after the table that state which foreign keys will reference to which table, or references to the associations which will be made
[ ] foreign key and table name are lowercased, snake_cased and back_ticked
[ ] Correctly formatted
[X] schema is written in a table format
[X] the table's name are lowercased, snake_cased and back_ticked
[X] the table header column names are bolded
[ ] columns names are lowercased and snaked_cased and back_ticked
Comments
[x] I could be mistaken, but I don't believe Airbnb asks Users to provide a username. Please double check on this. Our Users will provide both a first_name and last_name on Signup though.
[x] Your Listings will probably have a lot more data in their data. I imagine they'll have city, state, zip_code, num_beds, num_baths, num_beds, latitude, longitude. The Listings are the main draw of the site, so that table is going to be robust. Think this over and look at what information is available if you go on Airbnb and check a Listing's Show page.
[x] Do our Reservations need a host_id if they have a listing_id and that points to a Listing which has a host_id?
[x] Will Reservations need a start_date and a end_date? How about num_guests or total_cost? If we can view our Reservations on a page, what information should they have available to display?
[x] Same notes above for Reviews. Right now, your Reviews only have a review column. Maybe Reviews will have a body, rating information (clealiness, communication, check-in, etc), etc. Browse Airbnb and think this through.
[ ] Our tables are currently missing associations and what tables the foreign keys are referencing. Please look to Bluebird example for this formatting and content.
Database Schema
back_ticked
back_ticked
back_ticked
Comments
Users
to provide ausername
. Please double check on this. OurUsers
will provide both afirst_name
andlast_name
on Signup though.Listings
will probably have a lot more data in their data. I imagine they'll havecity
,state
,zip_code
,num_beds
,num_baths
,num_beds
,latitude
,longitude
. TheListings
are the main draw of the site, so that table is going to be robust. Think this over and look at what information is available if you go on Airbnb and check a Listing's Show page.Reservations
need ahost_id
if they have alisting_id
and that points to aListing
which has ahost_id
?Reservations
need astart_date
and aend_date
? How aboutnum_guests
ortotal_cost
? If we can view our Reservations on a page, what information should they have available to display?Reviews
. Right now, yourReviews
only have areview
column. MaybeReviews
will have abody
, rating information (clealiness
,communication
,check-in
, etc), etc. Browse Airbnb and think this through.