Ask your own question, for FREE!
edX CS50x Intro to CS I 20 Online
OpenStudy (tansheet):

Design a number of SQL tables to allow for storing the following information: A. Companies and company owners. B. Store locations which belong to one company. C. Store location hours which allow for orders to be placed at different times on different days. D. Food orders.

OpenStudy (rsmith6559):

What have you got so far? Remember: one of the main things about the tables in a database are their relationship.

OpenStudy (mandre):

Tables needed : Company, Company_Owner, Company_Location, Food_Order Company table should have basic info like Company_ID, Company_Name, Owner_ID, Location_ID. Owner_ID will store the primary key from the Owner table corresponding to a specific Owner name. For example if Company_Owner has the following Record: 4, "Bill Gates" (Owner_ID, Owner_Name) then your Company table could have the following record: 2, "Microsoft", 4, 2 (Company_ID, Company_Name, Owner_ID, Location_ID). The Location_ID should of course correspond with the Location_ID of Microsoft's location on your Company_Location table.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!