If there are parts of a problem that E/R diagrams cannot model, state these as "notes". Make sure you follow all the rules and conventions discussed in class to correctly denote all aspects of the E/R diagrams, including multiplicity and referential integrity constraints.
1. Why would you choose a database system instead of simply storing data in operating system files? When would it make sense not to use a database system?
2. Explain following term briefly:
Entity and Entity Sets
Relationship and Relationship Sets
Attributes
Domains
Superkey, Candidate Key and Primary Key
Strong Entity Set and Week Entity Set
One-to-many relationship
Many-to-many relationship
3. Design an E/R diagram for the following situation: Doctors prescribe drugs for patients. A given doctor can prescribe many drugs for a certain patient. Sometimes a doctor may not prescribe any drug to a patient. Many doctors can treat a patient. Many doctors can prescribe the same drug to the same patient. A prescription can involve more than one patient (e.g., a mother and her baby) and more than one drug, but is associated with a unique doctor.
This problem may be trickier than it appears. Carefully consider what the instances of each entity set and relationship in your E/R diagram will look like.
4. 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).
1)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.
2)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).
3)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.
4)Each song recorded at Notown has a title and an author.
5)Each musician may play several instruments, and a given instrument may be played by several musicians.
6)Each album has a number of songs on it, but no song may appear on more than one album.
7)Each song is performed by one or more musicians, and a musician may perform a number of songs.
8)Each album has exactly one musician who acts as its producer. A musician may produce several albums, of course.
Design a conceptual schema for Notown and draw an ER diagram for your schema. The preceding information describes the situation that the Notown database must model. 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.