100% found this document useful (1 vote)
547 views6 pages

Test Est Test

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 6

Write the business rule(s) that govern the relationship between AGENT and CUSTOMER.

One Agent can have many Customer

Each Customer can have one Agent

Agent has a 1-M relationship with Customer

Given the business rule(s) you wrote in Problem 1, create the basic Crow's Foot ERD.

The DealCo relational diagram shows the initial entities and attributes for the DealCo stores, which
are located in two regions of the country. Identify each relationship type and write all of the business
rules.

One Region can have many Store.

Each store can have one Region

Region has a 1-M relationship with Store.

One Store can have many Employees

Each Employee can have one Store

Store has a 1-M Relationship with Employees

-
One Employee can have many Jobs

Each job can only have One Employee

Employee has a M-1 relationship with Jobs / Jobs has a 1-M relationship with Employee

The DealCo relational diagram shows the initial entities and attributes for the DealCo stores, which
are located in two regions of the country. Create the basic Crow's Foot ERD for DealCo.

The Tiny College relational diagram shows the initial entities and attributes for the college. Identify
each relationship type and write all of the business rules.

COURSE table has a 1:M relationship with Class. Class has a 1:M relationship with ENROLL.
ENROLL has a M:1 relationship with STUDENT.

COURSE can have many Class. Each class has one Course.

Class can have many ENROLL. Each Enroll has One Class

One STUDENT can have many ENROLL. Each ENROLL can have one Student

Create the basic Crow's Foot ERD for Tiny College.


Typically, a hospital patient receives medications that have been ordered by a particular doctor.
Because the patient often receives several medications per day, there is a 1:M relationship between
PATIENT and ORDER. Similarly, each order can include several medications, creating a 1:M
relationship between ORDER and MEDICATION.

a. Identify the business rules for PATIENT, ORDER, and MEDICATION.

PATIENT can have many Order. Each Order has One Patient. One Order can have Many Medication. Each
Medication has one Order. Technically, Each Medication can have many ORDER as well in a real life
scenario.

b. Create a Crow's Foot ERD that depicts a relational database model to capture these business rules.
United Broke Artists (UBA) is a broker for not-so-famous artists. UBA maintains a small database to
track painters, paintings, and galleries. A painting is created by a particular artist and then exhibited in
a particular gallery. A gallery can exhibit many paintings, but each painting can be exhibited in only
one gallery. Similarly, a painting is created by a single painter, but each painter can create many
paintings. Using PAINTER, PAINTING, and GALLERY, in terms of a relational database:

a. What tables would you create, and what would the table components be?

I would create three tables. PAINTER, GALLERY, and PAINTING.

One PAINTER can have many PAINTING. Each PAINTING has ONE PAINTER. One GALLERY can have
MANY PAINTING. EACH PAINTING has one GALLERY.

b. How might the (independent) tables be related to one another?

Independent Tables could be related if they use the same field values. Maybe date of when the painting
is created? Not sure yet.

Using the ERD from Problem 10, create the relational schema. (Create an appropriate collection of
attributes for each of the entities. Make sure you use the appropriate naming conventions to name
the attributes.)

Describe the relationships (identify the business rules) depicted in the Crow's Foot ERD shown in
Figure P2.13.

PROFESSOR can have many CLASS. Each CLASS has one PROFESSOR. PROFESSOR can have many
STUDENT. EACH STUDENT can have one PROFESSOR.
Create a Crow's Foot ERD to include the following business rules for the ProdCo company:

a. Each sales representative writes many invoices.

b. Each invoice is written by one sales representative.

c. Each sales representative is assigned to one department.

d. Each department has many sales representatives.

e. Each customer can generate many invoices.

f. Each invoice is generated by one customer.


Write the business rules that are reflected in the ERD shown in Figure P2.15. (Note that the ERD
reflects some simplifying assumptions. For example, each book is written by only one author. Also,
remember that the ERD is always read from the "1" to the "M" side, regardless of the orientation of
the ERD components.)

One Publisher can publish many books, Each book can be punished by one Publisher.

One Publisher can submit many Contract, Each Contract can be submitted by one Publisher.

One Author can sign many Contract, One contract can be signed by one Author.

One Author can write many books, Each book can be written by one Author.

Write the business rules that are reflected in the ERD shown in Figure P2.17

Each Theater can show each Movie OR One Threater can show Each Movie/ One movie is showed in
Each Theater.

One Movie can receive Each Review/ Each review can receive One Movie

One Reviewer can write each Review/ Each review is written by one reviewer.

You might also like