Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

EER Diagram Exercises

Exercise 1
The requirements for the part of the UNIVERSITY database:

1- The database keeps track of three types of people: employees, alumni, and students. A
person in the system can belong to at least one or more of these types. Each person has a
name, SSN, gender, address, and birth date.
2- Each employee has a salary, and there are three types of employees: faculty, staff, and
student assistants. Each employee belongs to exactly one of these types.
3- For each alumnus, a record of the degree or degrees that he or she earned at the university
is kept, including the name of the degree, the year granted, and the major department.
4- Each student has a major department.
5- Each faculty has a rank, whereas each staff member has a staff position.
6- Student assistants are classified further as either research assistants or teaching assistants,
and the percent of time that they work is recorded in the database.
7- Research assistants have the current course they work on.
8- Students are further classified as either graduate or undergraduate, with the specific
attributes degree program (M.S., Ph.D., M.B.A., and so on) for graduate students and class
(freshman, sophomore, and so on) for undergraduates. A student can not be graduate and
undergraduate at the same time.

Design an EER schema for this application.


Exercise 2
Consider an online auction database system in which members (buyers and sellers) participate in the
sale of items. The data requirements for this system are summarized as follows:

 The online site has members who are identified by a unique member id and are described by
an email address, their name, a password, their home address, and a phone number.

 User accounts are categorized as buyer and seller. A member is a buyer or a seller, can not
be both of them at the same time.

 A buyer has a shipping address recorded in the database. A seller has a bank account
number and routing number recorded in the database.

 Items are placed by a seller for sale and are identified by a unique item number assigned by
the system. Items are also described by an item title, an item description, a starting bid
price, bidding increment, the start date of the auction, and the end date of the auction.

 Items are also categorized as COMPUTER,HARDWARE,MODEM. An item must belong to one


of these categories and it may belong to more then one at the same time.

 Buyers make bids for items they are interested in. A bidding price and time of bid placement
is recorded. The person at the end of the auction with the highest bid price is declared the
winner and a transaction between the buyer and the seller may proceed soon after.

Design an EER schema for this application.


Exercise 3
A well known bicycle company stores its data in a special database. Company has customers and
products.

 All customers have a unique customer_id.


 Customers are categorized as foreign customers or domestic customers. A customer must
be foreign or domestic, and can not belong to both of the categories at the same time.
 Foreign customers are identified by their unique id, currency, company name and address
composed of city state and zipcode.
 Domestic customers are identified by their unique id, name and address. Domestic
customers may have more than one address information.
 Products are identified by unique product_id, model, type and price.
 Only two type of products are produced in this company. These product types are Bike and
Mountain Bike.
 Each bike has color and cycle attributes.
 Each mountain bike has cycling team attribute.
 A product may belong to at least one of this types. Moreover it may belong to both of them
at the same time.
 Customers may request products. And a product may be requested by more than one
customer, also it may not be requested by any customer at all.
 When a product is requested or ordered by a customer; request id, request type and request
content information is stored.

Design an EER diagram for the system.

Than convert EER diagram to a relational database scheme.

You might also like