Question: Create a database with a Many - to - Many Relationshop using entities Phone to Store ( phone:store ) OR jeweler:jewelry Each independent entity should

Create a database with a Many-to-Many Relationshop using entities Phone to Store (phone:store) OR jeweler:jewelry
Each independent entity should have a single theme. Attributes or columns chosen for each class should be atomic and essential. Use natural language names for the tables and columns, minimize the use of abbreviations for identifiers and data values. The database schema should include attributes for each of the major data types: int, date or year, fixed or variable length character, and decimal with fraction. The tables for the independent entities should have three or more non-key attributes. The table defined for the associative entity should have one or more non-key attributes.
Tables created should have data types and lengths consistent with the authentic data. Use case consistently for the data values. Define primary and foreign keys to enforce entity and referential integrity.
Table data should include all known instances or a meaningful subset of authentic data. Also, the data stored should illustrate M:M,1:M, M:1,1:1,1:0 and 0:1 participation constraints.
Complete the following steps to show your login and environment, table design and to confirm the data depict the relationships specified above;
0) Show tables and issue "show create table" statements for the two independent classes and the associative entity.
1) query each of the tables to project all columns. Include an order by clause on the querys to highlight those columns designated as primary keys;
2) prepare querys with nested querys to document the M:M relationship;
A. Reference one independent entity in a superQuery that matches multiple rows in the associative entity, which will then match rows in the other independent entity
B. Then reference the other independent entity in a superquery to produce multiple rows illustrating the other end of a m:m relationship
3) define a join view based on a query joining the three tables. This view should include columns corresponding to the primary key and one non-key column from each of the independent entities, plus the keys and one non-key column from the associative entity. Query this view with columns from the two independent entities.
4) prepare correlated subquerys with the NOT EXISTS operator to show that there are independent entity instances not related to the other independent entity (1:0, and 0:1).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!