Midterm Practical Exam-1
Midterm Practical Exam-1
Business Rule:
A small businessman owns a record store wherein he creates albums and manage artists.
He wants to store the data of all the albums and artist his record company has. Below are the
rules for his database schema.
An artist can have one or more albums, but an album should have at least one artist or
more. An album should have an album id, album name and the artist should have an artist id
and artists name, respectively. These albums should be categorized into genres. One genre
must have one or more albums, but an album is required to have only one genre. Genres have
genre id and genre name.
Given the business rules above, create in data modeler the appropriate entities identified
with their respective attributes. Create a logical diagram and a relational diagram of the
schema. The data type of the attribute is up to you, as long as it is appropriate and correct.
Filename: MPE_fullname
Once the logical and relational diagrams are done, take a screenshot of the diagrams and
paste it below. Make sure to show the labels of the relationship in the logical diagram. And for
the relational diagram it should be properly arranged.
UCLAStudent
UCLAEnrollment
StudentId StudName Age EnrollmentId EnrollmentDate StudentId SubjId
UCLASubject
SubjId SubjDescription Units Priceperunit
Given the above tables, write the correct SQL code to do the following. Please do the following
codes in sequential order. Copy and paste the source code. Also take a screenshot of each SQL
statement and paste it in every number.