Re: DB design basic question
From: --CELKO-- (jcelko212_at_earthlink.net)
Date: 01/15/05
- Next message: Hugo Kornelis: "Re: Insert with multiple subqueries - possible?"
- Previous message: Joe Hatem: "Re: using SQLserver, ADO, Delphi: performance issue"
- In reply to: Francois: "DB design basic question"
- Messages sorted by: [ date ] [ thread ]
Date: 15 Jan 2005 06:45:10 -0800
CREATE TABLE ManagerAssignments
(mgr_emp_id INTEGER NOT NULL PRIMARY KEY
REFERENCES Personnel(emp_id)
ON UPDATE CASCADE
ON DELETE CASCADE,
dept_nbr INTEGER NOT NULL
REFERENCES Departments(dept_nbr)
ON UPDATE CASCADE
ON DELETE CASCADE,
..);
The primary key could also be on the department number, so you can pick
which way gives you the best performance. You can now add other
constraints to this table that have to do with a department manager,
add a trigger to be sure all departments have a manager, etc..
- Next message: Hugo Kornelis: "Re: Insert with multiple subqueries - possible?"
- Previous message: Joe Hatem: "Re: using SQLserver, ADO, Delphi: performance issue"
- In reply to: Francois: "DB design basic question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|