Database,ER diagram, SQL

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

 

ER Model and Normalization

Q1: Garage Database [40 points]

We want to design a database for a local garage. For each customer, we want to record the (unique) name, the customer address, and the contact phone number. For each vehicle, we want to record the unique vehicle’s identification number (VIN), and the vehicle’s make, model and year. For each repair job we want to record the description of the job done (maximum 200 chars), the date, and the total dollar cost. A repair job may involve zero or more parts (like, e.g., “windshield wipers”, “battery”, etc.) For each part we want to record its (unique) part number, the part name and its cost. In addition, note that:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

• Each vehicle may have 1 or more repair jobs.

• Each customer may be the primary owner of 1 or more vehicles.

• Every vehicle has only one primary owner (we ignore co-owners).

• No vehicle can have more than one repair job in any given day.

Please answer the following questions:

Q1.1. (10 points) Draw an ER diagram for this database. Make sure to indicate primary keys, cardinality constraints, weak entities (if any), and participation constraints. List any assumptions you make in the process.

Q1.2. (10 points) Translate the ER diagram in Q1.1 into relational database tables (i.e. give the SQL DDL statements). Make sure that the translation captures key constraints (primary keys and foreign keys if applicable) and participation constraints in the ER diagram. Identify constraints, if any, that you are not able to capture.

Q1.3. (20 points) Identify the functional dependencies that you expect should hold for the Garage Database domain. Use the dependencies to find keys and BCNF normal forms.

 

Q2: Restaurant Database [ 40 points]

The student administrator of the Mini University wants to design a database for profiling students’ preferences for the nearby restaurants and the dishes. For example, the student Jack Smith likes the “rib eye steak” at the “TGI Fridays”, not the “rib eye steak” at the “Olive Garden”, while the student Nancy Graham likes the Italian spaghetti at “Zeppoli’s”.

• Each student has his/her SSN, the name, and the department.

• Each restaurant has its name, and the mailing address.

• The name of a restaurant may not be unique, but the mailing address is unique.

• Each dish has the name and the price.

• The price of a dish might differ on different restaurants. For example, “rib eye steak” is $15 at “TGI Fridays”, but $20 at the “Olive Garden”.

• The name of a dish is unique within a restaurant. Two restaurants may have the same dish name.

• A dish is offered by at least one restaurant, and a restaurant offers at least a dish.

Please answer the following questions:

Q2.1. (10 points) Draw an ER diagram for this database. Make sure to indicate primary keys, cardinality constraints, weak entities (if any), and participation constraints. List any assumptions you make in the process.

Q2.2. (10 points) Translate the ER diagram in Q2.1 into relational database tables (i.e. give the SQL DDL statements). Make sure that the translation captures key constraints (primary keys and foreign keys if applicable) and participation constraints in the ER diagram. Identify constraints, if any, that you are not able to capture.

Q2.3. (20 points) Identify the functional dependencies that you expect should hold for the Restaurant Database domain. Use the dependencies to find keys and BCNF normal forms.

 

Q3: Reverse Engineering [20 points]

This question tests how well you understand the algorithm for converting E/R diagrams to relational schemas. An E/R diagram when converted to relations (using the mechanical construction that we know and love) gives rise to the following relations:

  • R(a, b, c)
  • S(a, d)
  • T(a, d, f, g)

You may assume that the same symbols refer to the same attribute and different symbols refer to different attributes (e.g., the attributes a in the relations R, S and T are the same) i.e. it ultimately comes from a single entity set or relationship in the E/R diagram.

Your task is to reverse-engineer the E/R diagram from these relations; in other words, what E/R diagram could have produced these relations. For full credit, give two different E/R diagrams that could have produced these (and only these) relations (i.e. 10 points for each correct E/R diagram).

 Submission Guidelines and Requirements

  • Include your name and UCM ID in the assignment
  1. Add the following statement in your solution “I certify that the codes/answers/outputs of this assignment are entirely my own work.”

// Your Name

// Your UCM ID

//Certificate of Authenticity: “I certify that the assignment is entirely my own work.”

  1. Add comments to your submission as much as possible
  2. Submit your ER diagrams, relation schemas, functional dependencies and normalized forms
  3. Zip your files and upload the zipped file onto Blackboard
  4. There could be more than one correct answer. We shall accept them all
  5. Whenever you are making an assumption, please state it clearly
  6. Grading standards:
  • There will be automatic 10 points penalty if your submission is missing certificate of authenticity
  • Late submission: Late submission is allowed with a 10% deduction per day (delay in submission). Submission after 3 days of the deadline won’t be accepted

CHANGES TO BE MADE!!!!!

 1.1 No primary keys, cardinality constraints, weak entities (if any), and participation constraints are given in your ER diagram
1.2 DDL statements means “Create table” statements with primary keys and foreign keys
1.3 Functional dependencies means for example: Customer.Name —> Customer.Address, Customer.PhoneNumber. All dependencies like this and also BCNF normal form.

2.1 No primary keys, cardinality constraints, weak entities (if any), and participation constraints are given in your ER diagram
2.2 DDL statements means “Create table” statements with primary keys and foreign keys
2.3 Functional dependencies means for example: Student.SSN —> Student.Name, Student.Department. All dependencies like this and also BCNF normal form.

3. Please mention participation constraints by double lines()strong and weak participation), keys etc. in the ER diagram 

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Homework Mules
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Business Studies
Great paper thanks!
Customer 452543, January 23rd, 2023
Political science
Thank you!
Customer 452701, February 12th, 2023
Technology
Thank you for your work
Customer 452551, October 22nd, 2021
Accounting
Thank you for your help. I made a few minor adjustments to the paper but overall it was good.
Customer 452591, November 11th, 2021
Political science
I like the way it is organized, summarizes the main point, and compare the two articles. Thank you!
Customer 452701, February 12th, 2023
Finance
Thank you very much!! I should definitely pass my class now. I appreciate you!!
Customer 452591, June 18th, 2022
Psychology
Thank you. I will forward critique once I receive it.
Customer 452467, July 25th, 2020
Education
Thank you so much, Reaserch writer. you are so helpfull. I appreciate all the hard works. See you.
Customer 452701, February 12th, 2023
Psychology
I requested a revision and it was returned in less than 24 hours. Great job!
Customer 452467, November 15th, 2020
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Show more
<
Live Chat 1 7633094299EmailWhatsApp

Order your essay today and save 15% with the discount code WELCOME