Database Lab#04
Database Lab#04
Lab#04
1
Data base lab
Lab#4.1
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, each of whom is identified by a unique member
number and is described by an e-mail address, name, password, home address,
and phone number.
• A member may be a buyer or a seller. 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, a description,
starting bid price, bidding increment, the start date of the auction, and the end
date of the auction.
• Items are also categorized based on a fixed classification hierarchy (for
example, a modem may be classified as COMPUTER → HARDWARE → MODEM).
• Buyers make bids for items they are interested in. Bid price and time of bid are
recorded. The bidder at the end of the auction with the highest bid price is
declared the winner, and a transaction between buyer and seller may then
proceed.
• The buyer and seller may record feedback regarding their completed
transactions. Feedback contains a rating of the other party participating in the
transaction (1–10) and a comment
2
Data base lab
member no phone no
password
Member
email
Home address
address
O
Account no
shiping
address
Buyer seller routing no
feedback
Bids place
item no
title
Item descripation
increament
start date
category end date price
3
Data base lab
Lab#4.2
• The database keeps track of three types of persons: employees, alumni and
students. A person can belong to one, two, or all three of these types. Each
person has a name, SSN, sex, address, and birth date.
• Every 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.
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. Each student has a major department.
• Each faculty has a rank, whereas each staff member has a staff position. 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.
Research assistants have their research project stored, whereas teaching
assistants have the current course they work on.
• 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
4
Data base lab
person
Salary
major deptt year of degree
O
major Deptt
name of D D
degree
Faculity Student
Stuff Under graduate
assistant
Graduate
Rank
D
Stuff position Class
Degree progam