A Vehicle Manufacturer Database (Cont.)
Persons
This entity has a name, age and domicile, and possesses a private fleet.
Employees
It is with specific qualifications, salary, and family members.
|
|
SubsEmpl |
CompanyID |
NameSubs |
Empl |
|
|
The problems are
- Aggregations
such as
SubsEmpl
relationship, and
- Specialization
such as employees in comparison to persons
require individual relation schemata equipped with special integrity constraints.
The Query Problem
Defining queries against this schema becomes complicated. For example, the following query is composed to know whether an employee named Pokemon is employed in the Detroit subsidiary of the Ford company:
SELECT EmplNo
FROM Company, Subsidiary, SubsEmpl, Employee
WHERE Company.Name = 'Ford' AND
Company.CompanyID = Subsidiary.CompanyID AND
Subsidiary.Location = 'Detroit' AND
Subsidiary.CompanyID = SubsEmpl.CompanyID AND
Subsidiary.NameSubs = SubsEmpl.NameSubs AND
SubsEmpl.Empl = Employee.EmplNo AND
Employee.Name = 'Pokemon';
|
“I don’t want to achieve immortality through my work.
I want to achieve it by not dying.”
— Woody Allen
|