Ask DBMS Expert


Home >> DBMS

Q1. Consider the following ER diagram:

1021_figure.png

For each claim, state whether it is true or false given the model shown in the diagram. Explain your answers.

(a) Different companies cannot make a drug with the same trade name.

(b) A patient can only be prescribed a particular drug by one doctor.

(c) A patient can be prescribed the same drug by the same doctor on different dates.

(d) A patient can have prescriptions from at most one doctor.

(e) Someone cannot be both a patient and a doctor.

(f) A doctor can have more than one specialty.

(g) More than one patient can have the same name.

(h) A doctor can work for several different practices.

(i) A practice must have at least one doctor working for it.

(j) A patient can locate all of the doctors working in a particular city.

Q2. Consider the following relational schema for a course catalog:

COURSE (Department, CourseNumber, Title, Description, TaughtBy)

PROFESSOR(Department, Name)

  • COURSE.TaughtBy refers to PROFESSOR.Name

For each claim, state whether it is true or false given the schema. Explain your answers.

(a) There can be more than one course in the same department.

(b) A course can have more than one title.

(c) Every professor must teach at least one course.

(d) A course can be included in the catalog without the name of the professor teaching it.

(e) A course can be taught by someone not included in the catalog.

(f) There can be several professors with the same name as long as they are in different departments.

Q3. Consider the following ER diagram:

761_figure1.png

Does the relational schema below accurately express the relationship constraints (cardinality and participation) present in the ER diagram? Explain why or why not.

EMPLOYEE(Ssn, FirstName, LastName)

OFFICE(SranchNumber, City, Ssn)

  • OFFICE.Ssn refers to EMPLOYEE.Ssn

Q4. Draw an ER diagram which captures as accurately as possible the following information about the operations of a large real estate rental management company. Include participation, cardinality, and key constraints. If necessary specifics are lacking, make reasonable assumptions and state those assumptions. If there are any elements which cannot be represented in your diagram, identify them and explain what the problem is.

Draw your diagram by hand (neatly) or use a program such as dia.

  • The company has branch offices in cities across the US. Each branch office has a unique branch number, an address (with a street, street number, city, state, and zip code), and up to three phone numbers.
  • Each branch office has a staff. The data stored for each staff member includes their ID number (unique across all branches), name, address, position, salary, supervisor's name (where applicable), and the branch office where they work. Staff members may be reassigned to different offices, but never work in more than one office at a time.
  • One staff member is the office manager.
  • Some staff members are supervisors. Only supervisors can supervise other staff members. The date when each supervisor became a supervisor is recorded. Supervisors also get a monthly bonus, the size of which is based on the number of years since they became a supervisor and the number of staff members supervised.
  • Each branch office offers a range of properties to rent. The data stored for each property includes the property number (unique to the branch with the listing), address (street, street number, city, state, zip code), type, number of rooms, monthly rent, and owner. The management of a property is assigned to a staff member whenever it rented out or is listed for renting. Properties may be listed in the system even if they are not currently rented or available for rent.
  • There are two kinds of property owners, private individuals and businesses. For private individuals, the owner's name, address, and phone number are stored. For businesses, the business name, type of business, address, phone number, and contact name are stored. Both private individuals and businesses are assigned a (globally) unique ID.
  • A prospective renter must first register at a particular branch office. For each such client, a client number (unique to the branch where the client is registered) is assigned and the client's number, name, phone number, preferred type(s) of accommodation, and maximum budget are recorded. Also stored are the staff member and branch office that processed the registration and the date the client joined.
  • When a property is rented out, a lease is drawn up. The lease includes the lease number (unique to the branch drawing up the lease), client number, client name and address, property number and address, monthly rent, method of payment, amount of the initial deposit paid (if any), duration of the lease (e.g. 1 year), and start and end dates of the lease period.

Q5. Convert the following ER diagram to a relational schema. For any case where you have a choice of ways to map a particular construct, choose the mapping that you think is best for this situation and explain your decision. Also be sure to specify all primary key and referential integrity (foreign key) constraints. If there are any aspects of the diagram that cannot be expressed in your relational schema, identify them and explain what the problem is.

228_figure2.png

Q6. Consider the following relation and functional dependencies for storing information about movies and actors:

MOVIE(title, year, length, genre, studio, president, rating, actor, role, birthdate, location)

  • title, year → length, genre, studio, rating           [title and year specify a movie]
  • studio → president                                           [a studio has one president]
  • title, year, actor → role                                    [actor plays one role in a movie]
  • actor →birthdate, location                                 ['actor' uniquely identifies an actor]

(a) What normal form is this relation in? Explain your answer.

(b) Apply normalization until you cannot decompose the relation(s) further. State the reasons behind each decomposition.

Q7. Convert the ER diagram from #1 to a relational schema. For any case where you have a choice of ways to map a particular construct, choose the mapping that you think is best for this situation and explain your decision. Also be sure to specify all primary key and referential integrity (foreign key) constraints. If there are any aspects of the diagram that cannot be expressed in your relational schema, identify them and explain what the problem is.

Q8. Consider the following relation and functional dependencies for storing race results:

RESULTS(name, location, date, racetype, time, class, course)

  • name, location, date, course → time         [one result per competitor, race, and course]
  • location, date → racetype                        [location, date identifies the race]
  • class → course                                       [class determines the course]

Note that it is not the case that course → class i.e. multiple classes may be assigned to the same course.

(a) What normal form is this relation in? Explain your answer.

(b) Apply normalization until you cannot decompose the relation(s) further. State the reasons behind each decomposition. Can you fully satisfy all of the normal forms while maintaining the original constraints? Explain.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92475867

Have any Question?


Related Questions in DBMS

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As