Professional Documents
Culture Documents
AUER
DATABASE CONCEPTS, 6th Edition
Chapter Two
The Relational Model
All rights reserved. No part of this publication may be reproduced, stored
in a retrieval system, or transmitted, in any form or by any means,
electronic, mechanical, photocopying, recording, or otherwise, without
the prior written permission of the publisher. Printed in the United States
of America.
Project Manager
Primary Key
ProjID MgrID
ProjName MgrName
MgrID
Foreign Key
Department Employee
Primary Key
DeptID EmpID
DeptName DeptID
Foreign Key
Location EmpName
must exist in
The values of the Primary Key EmployeeID
in EMPLOYEE
Figure 2-13:
Enforcing Referential Integrity in Oracle Database 11g Release 2
KROENKE and AUER - DATABASE CONCEPTS (6th Edition)
Copyright © 2013 Pearson Educations, Inc. Publishing as Prentice Hall 2-32
Foreign Keys in
Oracle MySQL 5.5
Determinant
(ProjectID) (ProjectName,
StartDate)
(StudentID) (StudentName,
DormName)
(DormName) (DormCost)
KROENKE and AUER - DATABASE CONCEPTS (6th Edition)
Copyright © 2013 Pearson Educations, Inc. Publishing as Prentice Hall 2-42
Normalization Example
(Cont’d)
(AttorneyID,Cl (ClientName, MeetingDate,
ientID) Duration)
However, if…
(ClientID) (ClientName)
Then ClientName should be placed into its own relation,
resulting in the relations:
(AttorneyID,Cl (MeetingDate, Duration)
ientID)
(ClientID) (ClientName)