0% found this document useful (1 vote)
143 views2 pages

Midterm Practical Exam-1

This document contains instructions for a midterm practical exam on database design. It provides business rules for a record store database to track albums, artists, genres. It asks the student to create logical and relational diagrams for the database schema based on the provided entities and attributes. It also provides sample tables and asks the student to write SQL commands to create the tables, make changes to the tables like adding/changing columns, and set permissions.

Uploaded by

Eustus Holmes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
143 views2 pages

Midterm Practical Exam-1

This document contains instructions for a midterm practical exam on database design. It provides business rules for a record store database to track albums, artists, genres. It asks the student to create logical and relational diagrams for the database schema based on the provided entities and attributes. It also provides sample tables and asks the student to write SQL commands to create the tables, make changes to the tables like adding/changing columns, and set permissions.

Uploaded by

Eustus Holmes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

College of Computer Studies and Multimedia Arts

MIDTERM PRACTICAL EXAM FOR INFORMATION MANAGEMENT [CCS0021]

Name Student Number


Professor Name Date of Examination
Section Schedule (Time/Day)

Part 1 of 2 – Database Schema

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.

Paste Logical Diagram here:

Paste Relational Diagram here:


Part 2 of 2 – Creation of Tables and DDL

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.

1. Create the table UCLAStudent.


2. Create the table UCLA Subject.
3. Drop the UCLASubject Table (do not purge)
4. Restore back the UCLASubject.
5. Create the table UCLA Enrollment
6. Change the table name of UCLAEnrollment to UCLAEnrollSummary
7. Change the Column name StudName to StudentName
8. Add another column UCLAStudent. Name that column as YearLevel
9. Increase the characters of the StudentName column in the UCLAStudent table. Please
take a screenshot of the original number of characters before changing it, then paste both
pics of the before and after.
10. Set the UCLASubject table to be non-editable.

You might also like