Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In MySql (1) Create the tables needed to implement your database (2) Define primary keys and foreign keys (3) Define the relationships among your tables.
In MySql
(1) Create the tables needed to implement your database
(2) Define primary keys and foreign keys
(3) Define the relationships among your tables.
(4) Define any necessary referential integrity constraints between your tables.
(5) Add sample data to the database tables (each table should have at least 10 rows).
The red color attributes are the primary key and green color attributes are the foreign key of the relation.
- The Customer relation has the details of the customer.
- Each customer has a sign up id. It was stored in the relation User, with CustId has the foreign key. (Referential integrity constraints)
- The song relation has the details of the song
- The purchase relation has details of the purchase made by the customer. A purchase will have single song only. (Referential integrity constraints)
- The album relation contains the details of all albums with its artist id detail. A album will have a single artist. (Referential integrity constraints)
- The genre relation has the details of different genres available.
- Song_Genre_Album relation has the details of the song title and its genre and Album title.
Relation Name Customer User Purchase Song Album Attribute1 Attribute2 Attribute3 Attribute4 Attribute5 Custid CustName EmailAddress Age CreditCar Num UserName CustId Password Price Order Num Purchase_Date Song Title Song Title Duration_in_secs Release_Date Album Title produced_city Artist Id CustId Artist Genre Artist_Id Genre Name HomeCity ResidenceCity Description Song_Genre_Album Song Title Genre Album Title
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started