Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose you are given the following business rules to form the basis for a database design. The database must enable the manager of a company

  • Suppose you are given the following business rules to form the basis for a database design. The database must enable the manager of a company dinner club to mail invitations to the club’s members, plan the meals, keep track of who attends the dinners, and so on. • Each dinner serves many members, and each member may attend many dinners. • A member receives many invitations, which are mailed to many members. • A dinner is based on a single entree, but an entree may be used as the basis for many dinners. For example, a dinner may be composed of a fish entree, rice, and corn, or a fish entree, a baked potato, and string beans. Because the manager is not a database expert, the first attempt at creating the database uses the structure shown in Table 1 below Create databases using MySQL, with primary keys, foreign keys, and other attributes mentioned for each entity of the ERD in Task (c) using proper constraints. e) Populate the tables created in task d with some significant data (See Table 1 for sample data). f) Create SQL statements to satisfy the following: 1. Write an SQL statement to list the member number, member name, zip code and dinner date for all club members. 2. Write a SQL statement to determine how many times the ‘Stuffed Crab’ have been ordered? 3. Write an SQL statement to list the name of the members who are from the city ‘Murkywater’ and had the dinner date as ‘15-Mar-2018’. 4. Write an SQL statement to list the total bill (new column) for each member (member name). The price for each dish code is as given in Table 2 below: (Hints: - Add new attributes for dinner, entrée and dessert price, and insert respective values - total bill = dinner + entrée + dessert using WHERE clause - Recursive JOIN Table 1 to calculate total bill and display member number, member name and invite number

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

Step: 3

blur-text-image

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 Systems Design Implementation and Management

Authors: Carlos Coronel, Steven Morris

11th edition

9781305323230, 1285196147, 1305323238, 978-1285196145

More Books

Students also viewed these Databases questions

Question

A greater tendency to create winwin situations.

Answered: 1 week ago