Академический Документы
Профессиональный Документы
Культура Документы
1.
A rental car agency classifies the vehicles it rents into four categories:
compact, midsize, full-size, and sport utility. The agency wants to record the
following data for all vehicles: Veh_ID, Make, Model, Year, and Color. There
are no unique attributes for any of the four classes of vehicle. The entity type
vehicle has a relationship (named Rents) with a customer entity type. None
of the four vehicle classes has a unique relationship with an entity type.
Would you consider creating a supertype/subtype relationship for this
problem? Why or why not?
2.
A bank has three types of accounts: checking, saving, and loan. Following are
the attributes for each type of account:
Checking: Acct_no, Date_opened, Balance, service_charge
Savings: Acct_no, Date_opened, Balance, Interest_Rate
Loan: Acct_no, Date_opened, Balance, Interest_rate, Payment
Assume that each bank account must be a member of exactly one of these
subtypes. Using generalisation, develop an EER model segment to represent
this situation. Remember to include a subtype discriminator.
3.
4.
At a weekend retreat, the entity type PERSON has three subtypes: CAMPER,
BIKER, and RUNNER. Draw a separate EER diagram segment for each of the
following situations:
a.
At a given time, a person must be exactly one of these subtypes.
b.
A person may or may not be one of these subtypes. However, a
person who is one of these subtypes cannot at the same time be one
of the other subtypes.
c.
A person may or may not be one of these subtypes. On the other
hand, a person may be any two (or even three) of these subtypes at
the same time.
d.
At a given time, a person must be at least one of these subtypes.
5.
The MIS department of our business wants to build a database to track all our
hardware and software. We won workstations, network servers, and
peripherals. The department wants to keep track of software packages as
well as the licenses for those packages. Some software licenses are for single
machines. We can install them on network servers, but we can permit only
as many network users as we own licenses. We also own network licenses. A
single network license authorizes a specific number of users. No network
licenses may be installed on either workstations or servers. Network licenses
may be installed only on servers. We want to keep track of where software
licenses are installed. Some licenses may not be installed anywhere at any
given time. We must also be able to prove the legality of any software we
have installed. Each license must be traced to either a purchase order, a gift,
or a loan. We may also have certain software on order. We order packages,
but we receive licenses. Construct the data model and attribute it through
brainstorming.
6.
Most students have bank accounts. Construct a data model that shows the
relationships that exist among customers, different types of accounts (e.g.,
checking, savings, loan, funds), and transactions (e.g., deposits, withdrawals,
payments, ATMS). Attribute your model such that it could be used to produce
a consolidated bank statement.
7.
To schedule classes, your school needs to know about courses that can be
offered, instructors and their availability, equipment requirements for
courses, and rooms (and their equipments). From the courses, that can be
scheduled, the schedulers select the courses that will be scheduled. For each
of those courses, they schedule one or more classes (sometimes called
sections or divisions). The schedulers must assign classes to instructors,
rooms, and time slots. The schedulers are constrained by the reality that (1)
some courses cannot conflict because may students take them during the
same terms, (2) instructors cannot be in two places at the same time, and (3
rooms cannot be double-booked. Construct a data model to help the
schedulers.
3.
Address
City/State/Zip
Name
SSN
PERSON
Telephone
Person_Type:
Person_Type
O
E?
D?
V?
E?=Y
V?=Y
D?=Y
EMPLOYEE
VOLUNTEER
Date_Hired
Skill
DONOR
Donates
ITEM
d
RUNNER
CAMPER
BIKER
b.
PERSON
d
CAMPER
RUNNER
BIKER
c.
PERSON
CAMPER
RUNNER
BIKER
d.
PERSON
RUNNER
CAMPER
BIKER
2.
Date_Opened
Account
_Type
ACCOUNT
Acct_No
Balance
Account_Type=
d
C
CHECKING
Service
_Change
SAVINGS
Interest
_Rate
LOAN
Payment
Interest
_Rate
5.
ASSET
WORKSTATION
HARDWARE
SOFTWARE
ASSET
ASSET
SERVER
has
PERIPHERAL
LICENSE
has installed
NETWORK
NON-NETWORK
LICENSE
LICENSE
has installed
has installed
was obtained via
LOAN
GIFT
PURCHASE
ORDER
6.
has
ACCOUNT
Key Data
Account-ID [PK1]
Non-Key Data
Account-Origination-Date
Account-Status
CUSTOMER
Key Data
Customer-ID [PK1]
Non-Key Data
Customer-Name
Customer-Address
Customer-Telephone-No
SSN
SAVINGS
CHECKING
ACCOUNT
Non-Key Data
Savings-Interest-Rate
Savings-Minimum-Balance-LImit
Savings-Current-Balance
Savings-YTD-Deposit-Amount
Savings-YTD-Withdrawl-Amount
Savings-YTD-Accum-Interest
ACCOUNT
Non-Key Data
Checking-minimum-balance
Checking-YTD-Deposits
Checking-YTD-Withdrawals
Checking-Current-Balance
LOAN
ACCOUNT
Non-Key Data
Original-Loan-Amount
Loan-Length
Loan-Interest-Rate
Principle-Amount-Due
Payment-Due
YTD-Interest-Paid
ACCOUNT
executes
TRANSACTION
Key Data
Transaction-ID [PK1]
Account-ID [PK2] [FK]
Customer-ID [PK3] [FK]
Non-Key Data
Transaction-Date
Transaction-Time
DEPOSIT
Key Data
Transaction-ID [PK1] [FK]
Account-ID [PK2] [FK]
Non-Key Data
Deposit-Amount
WITHDRAWAL
Key Data
Transaction-ID [PK1] [FK]
Account-ID [PK2] [FK]
Non-Key Data
Withdrawal-Amount
is involved with
PAYMENT
Key Data
Transaction-ID [PK1] [FK]
Account-ID [PK2] [FK]
Non-Key Data
Payment-Amount
7.
BUILDING
has
ROOM
ROOM
has
EQUIPMENT
is for
FEATURES
FEATURES
is associated with
ROOM
SCHEDULE
is taught at
is for
INSTRUCTOR
is for
TIME SLOT
EQUIPMENT
SCHEDULE
REQUIREMENTS
is associated with
INSTRUCTOR
is for
is assigned
SECTION
COURSE
contains