a. Suppose that a model of a music library does not model ‘artist’ as an entity set, but instead models it as an attribute of a track. This could lead to what the authors of our text call ‘incompleteness’. Why would the they call this model incomplete? Is it because a) not all artist information could be contained as an attribute of a track, b) it would not be possible to model an artist before that artist released any tracks, or c) the artist could not have a key.
b. Can one entity belong to two entity sets? (yes/no)
c. Is a table in a database more like a) an ER relationship or b) an ER relationship set?
d. When would it be wise to specify the role played by an entity in a relationship? a) when the same entity set participates more than once in the relationship set, b) when the relationship is ternary, or c) when the entity represents an abstract rather than physical thing.
e. In an ER model, would it be possible for the same two entity sets to participate in two different relationship sets? (yes/no)
f. It is possible for a attribute to be multivalued in a ___________________ but not a _________________. Should the blanks be filled with a) "relational schema", "ER model", or b) "ER model", "relational schema"?
g. In the music library example, a possible entity set is ‘playlist’. If the playlist gives the IDs of tracks, and each track has a ‘length’ attribute (giving how long the track is in seconds), then the length of the playlist could be calculated from the track lengths. So should playlist have an attribute ‘length’ in an ER model? a) yes, b) no, or c) the choice would be a modeling decision.
h. Why might you want to model ‘address’ as a composite attribute (built from attributes ‘street’, ‘city’, ‘state’, and ‘zip’, perhaps) rather than just using all of the individual attributes? Would it be a) because in the model we might want to sometimes refer to the address as a whole and sometimes to parts of the address, b) to save space, or c) to avoid possible null values.
i. Suppose a music library model includes entity sets ‘album’ and ‘artist’, and relationship set ‘album-artist’. In this model, would you expect the participation of album in album-artist to be ‘total’? (yes/no)
j. In an ER model, we could model the department of an instructor as using a 'department' entity set, or with a 'department_name' attribute of the 'instructor' entity set. Which is the best reason for choosing to model the department as an entity set? a) some instructors don't have departments, b) some instructors have multiple departments, or c) there is additional information about departments that we will probably want to model.
A. The ER model of the music library would be incomplete if
artist is considered as an attribute. an attribute cannot be
uniquely identified like an entity. Remember, Key is the attributre
or set of attributes that uniquely identify an entity. The artist
attribute could not have a key. So there is no way to uniuely
identify a particular artist.
B. An entity set is a set of entities of the same type that share
the same properties. Let's say there is an entity set ,say
artist(as in this case )means it has a set of artists who share the
same properties like singing, music making , acting etc. There
cannot be another entity set with exactly same properties. In other
words, there cannot be another entity set which has has different
set of properties that the same entity might have. thus, answer is
No.
C.Is a table in a database more like a) an ER relationship or b) an
ER relationship set?
Table is more like a ER relationship set .Relationship set is a set
of tuples that has atleast one value/component for each
entity.
D.When an entity set participates more than once in the
relationship set, the role name is explicitly specified instead of
entity name. Example: if employee records info about all the
employees in the bank.We may have a relationship set called
works-for. Here, one will be worker and the former will be manager
who gets info about the workers. Both are from employee entity
set.
E. same two entity sets to participate in two different
relationship sets? YES they would play different roles.
F.It is possible for a attribute to be multivalued in a ERmodel but
not a relational schema.
In ER model, it is represented as double ovals.
G.should playlist have an attribute ‘length’ in an ER model? This
would be a modelling decision. If there is a need, they can have
the length attribute. If not a must for any other table, it can be
omitted.
H.Address should be a composite attribute because in the model we
might want to sometimes refer to the address as a whole and
sometimes to parts of the address.
I. Yes the relationship would be total participation because ,
one artist will have atleast one album in the music library.
J. Yes we need to model the department as an entity set because
there is additional information about departments that we will
probably want to model. i.e. it can have some more attributes other
than instructor.
a. Suppose that a model of a music library does not model ‘artist’ as an entity...
Consider the following relational database to manage concert and ticket sales. The relations are artist, concert, venue, seat, ticket, and fan. The schemas for these relations (with primary key attributes underlined) are: Artist-schema = (artistname, type, salary) Concert-schema = (artistname, date, venuename, artistfees) Venue-schema = (venuename, address, seating_capacity) Seat-schema=(venuename, row, seatnumber) Ticket-schema = (fanID, date, venuename, row, seatnumber) Fan-schema = (fanID, name, address, creditcardno) Where: • artistname is a unique name for the artist (because of trademark/copyright rules no two...
For this DATABASE homework assignment you will create an Entity Relationship model for a business case and then convert the model to a set of relations. Read through the following business case for the “Drum Corps International” Create an Entity relationship model with the necessary entities, attributes, identifiers and relationships to capture the data requirements. All relationships should be labeled with verb phrases. Use UML notation for this work. Relationship lines should not cross. ...
Database
1. Draw an Entity-Relationship diagram(including cardinality ratio and participa- tion constraint) to represent the following application: A DEPARTMENT has a number of TEACHERS and each TEACHER is affil- iated only with one DEPARTMENT; A STUDENT has only one TEACHER as an advisor, but a TEACHER can advise many STUDENT; on the other hand, TEACHER instructs many STUDENTS, and a STUDENT has a number of instructors. Different AGENCIES support different TEACHERS for various PROJECTS. (15 points) A trucking company is...
Problem 1 Consider the following set of requirements for a university database that is used to keep track of students' transcripts. (a) The university keeps track of each student's name, student number, social security number, current address and phone, permanent address and phone, birthdate, sex, class (freshman, sophomore, -, graduate), major department, minor department (if any), and degree program (B.A., B.S., ...., Ph.D.). Some user applications need to refer to the city, state, and zip of the student's permanent address,...
Describe each questions: Explain why the object-oriented database model was developed. How does the OID in the OO model differ from the primary key in the relational model? Is it possible for a superkey not to be a candidate key? Why or why not? Briefly describe the four types of binary relationships possible between an entity set A and an entity set B based on relationship cardinality. Sales Database: Customer(custId, lastName, firstName, address, phone, creditLimit) Order(orderNumber, date, total, custID) LineItem(orderNumber,...
Describe each questions: Explain why the object-oriented database model was developed. How does the OID in the OO model differ from the primary key in the relational model? Is it possible for a superkey not to be a candidate key? Why or why not? Briefly describe the four types of binary relationships possible between an entity set A and an entity set B based on relationship cardinality. Sales Database: Customer(custId, lastName, firstName, address, phone, creditLimit) Order(orderNumber, date, total, custID) LineItem(orderNumber, itemNumber,...
Hi i need Help. i use MYSQL command line.
THE QUESTION ARE BELOW
please check the answer before you submit because sometimes
query gives error thank you
For Full database of SQL you can DOWNLOAD from this link:
https://drive.google.com/file/d/1xh1TcBfMtvKoxvJr7Csgnts68fF53Q1t/view?usp=sharing
-------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
What are the total sales for each year. Note that you will need
to use the YEAR function. Order by year with the newest year
first.
-------------------------------------------------------
How many employees have no customers?
------------------------------------------------------------------
List the total sales for...
Introduction Welcome to Rad.io, you've been hired to work on our music streaming app, think of it as Spotify only more rad! You're in charge of handling our customer’s song list. When a user selects a playlist it will load into the list a number of songs. Users can skip to the next song, move to the previous, they can select a song to play next or select a song to add to the end of their list. Objective You...
Consider the following set of requirements for a university database that is used to keep track of students' transcripts The university keeps track of each student's name, student number, social security number, address and phone, birthdate, gender, `, and degree program (bachelor, Masters, PhD.). Both social security number and student number have unique values for each student. Each department is described by a name, department code, office number, office phone. Both name and code have unique values for each department....
Write an SQL query against the Chinook Database v1.4. Each query
must run successfully using DB Browser for SQLite. Create the exact
query below. Must use sub query. I saw that a
similar solution for this question used IF and CONCAT functions
which do not work and return errors. If it is possible to use the
CASE function in place of IF that would be greatly appreciated.
Also I really hate to ask but if it could be organized neatly...