Example 1 Manufacturers have a name, which we may assume is

Transcription

Example 1 Manufacturers have a name, which we may assume is
Example 1
Manufacturers have a name, which we may assume is unique, an address, and a phone number.
Products have a model number and a type (e.g., television set). Each product is made by one
manufacturer, and different manufacturers may have different products .
Customers are identified by their unique social security number. They have email addresses, and
physical addresses.
An order has a unique order number, and a date. An order is placed by one customer.
For each order, there are one or more products ordered, and there is a quantity for each product on the
order.
Example 2
A doctor asks you to support the patient administration with a small database application.
Each patient has a unique social security number, a name (first name, second name and surname), date
of birth, age (it can be calculated automatically when the birth date is entered) and an address. If a
father in a family has health insurance, the other members of the family are co-insured by the father.
For co-insured patients it must be stored by whom they are co-insured.
A unique name, an address, and a telephone number must be stored for each health insurance. There
are several kinds of therapies. Each therapy has a unique number, a name, a length and a cost.
Patients might need an appointment for therapy. In this case the appointment has a unique date, a
unique time, type of therapy and a small text which describes the reason of the therapy.
Example 3
A company database needs to store information about employees (uniquely identified by ssn, with
salary and phone as attributes), departments (uniquely identified by department number, with
department name and budget as attributes), and children of employees (with name and age as
attributes). Employees work in departments, each department is managed by an employee. A child must
be identified uniquely by name when parent (who is an employee, assume that only one parent works
for the company) is known. We are not interested in information about a child once the parent leaves
the company.