July 2010
Intermediate to advanced
840 pages
16h 33m
English
This somewhat complicated relational division is due to Richard Romley at Salomon Smith Barney. The original problem deals with two tables. The first table has a list of managers and the projects they can manage. The second table has a list of Personnel, their departments, and the projects to which they are assigned. Each employee is assigned to one and only one department, and each employee works on one and only one project at a time. But a department can have several different projects at the same time, and a single project can span several departments.
CREATE TABLE MgrProjects (mgr_name CHAR(10) NOT NULL, project_id CHAR(2) NOT NULL, PRIMARY KEY(mgr_name, project_id)); INSERT INTO Mgr_Project VALUES ('M1', 'P1'), ('M1', ...Read now
Unlock full access