Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment Questions (Submission required, 50 points) Problem 1 (25 points) You have been hired to develop a database system for an online ordering system. In

image text in transcribed
Assignment Questions (Submission required, 50 points) Problem 1 (25 points) You have been hired to develop a database system for an online ordering system. In this database, you want to store information about Restaurants, Clients, Orders, and Food. For each restaurant, you need to store the restaurant id, name, address, and type of food. For each client, you need to store client id, name, favorite restaurant, and credit card number. For each order, you need to store the order id, the client, the restaurant, and the food item being purchased. For each food, you need to store the food id, the type of food, the name of the food, and the number of calories in the dish. Assume that all ids are unique. Ensure your design allows the same client to make orders from the same restaurant on different days, even if the orders are identical in what type of food. Complete the following: 1. Create an ER diagram. [10 points] 2. List the primary keys, candidate keys, weak entities (if any), partial keys (if any), total participation, and any key constraints. [5 points] 3. Turn the ER diagram into tables (relational schema). Provide the SQL to create each table in the relational schema. [ 10 points] Problem 2 (25 points) Consider the following excerpt from a database schema about an electronics seller. Product(company, model, type) Phone(model, cpu, ram, cellular_network, price) Headset(model, color, connection_method, price) Charger(model, color, plug_type, price) Give an expression in relational algebra for each of the following queries: 1. Which Phone models support 5g? [5 points] 2. Which companies make phones with at least 8GB of RAM? [5 points] 3. Which manufacturers make phones but not headsets? [ 5 points] 4. What RAM size is present in at least two distinct phone models? [ 5 points] 5. Which company makes the most expensive charger? [5 points]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

5. Identify three characteristics of the dialectical approach.

Answered: 1 week ago

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago