Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Notown Records has decided to store information about musicians who perform on its albums (as well as other company data) in a database. The company

Notown Records has decided to store information about musicians who perform on its albums (as well as other company data) in a database. The company has wisely chosen to hire you as a database designer (at your usual consulting fee of $2500/day).

Each musician that records at Notown has an SSN, a name, an address, and a phone number. Poorly paid musicians often share the same address, and no address has more than one phone.

Each instrument used in songs recorded at Notown has a unique identification number, a name (e.g., guitar, synthesizer, flute) and a musical key (e.g., C, B-flat, E-flat).

Each album recorded on the Notown label has a unique identification number, a title, a copyright date, a format (e.g., CD or MC), and an album identifier.

Each song recorded at Notown has a title and an author.

Each musician may play several instruments, and a given instrument may be played by several musicians.

Each album has a number of songs on it, but no song may appear on more than one album.

Each song is performed by one or more musicians, and a musician may perform a number of songs.

Each album has exactly one musician who acts as its producer. A musician may produce several albums, of course.

1. (25pt) Design a conceptual schema for Notown and draw an ER diagram for your schema. Be sure to indicate all key and cardinality constraints and any assumptions you make. Identify any constraints you are unable to capture in the ER diagram and briefly explain why you could not express them.

2. (25pt) Translate the ER diagram into tables. Write SQL statements to create the tables and specify the constraints. Populate the tables with some sample data

3. (20pt) Triggers and Stored Procedures: Add the following triggers and stored procedures to your database:

a. cd_Album(): a function that returns the percentage of the the CD album.

b. total_songs(): a function that returns the total number of songs of all albums.

c. remove_album: a trigger to delete an album if all songs in the album are deleted.

d. song_restrict: a trigger to ensure that an album contains no more than 15 songs.

3). (30pt) Java and JDBC: Write a Java client to the database such that a person who does not know SQL could perform the following tasks:

Add / remove a musician

Add / remove an album and a song

Display the information of all tables in the database

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 Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Can uncertainty be estimated? If not, then why not? Explain.

Answered: 1 week ago

Question

Write a note on Historical Development of clinical Trials?

Answered: 1 week ago