This preview shows page 1. Sign up to view the full content.
Unformatted text preview: dent’s grade for
a particular course? 31 BUSI 335 Copyright © 2009-10 Y.M. Cheung, William Tan and Carson Woo 32 Better Structure for M:N
Relationships CR# S_Num S_Name CR# 321452 Samuel Johnston 1321 321452 Samuel Johnston 1322 344511 Lindsay Odger 1322 344511 Lindsay Odger 1321 Table Name: Student Table Name: Course
Course S_Num 1321 Intro. to Database 321452 1321 Intro. to Database 1322 Systems Analysis 321452
344511 Copyright © 2009-10 Y.M. Cheung, William Tan and Carson Woo Samuel Johnston
Johnston 1322 Systems Analysis 344511 Lindsay Odger Table Name: Course Table Name: Student S_Num 1321 321452 1321 344511 1322 321452 1322 344511 Table Name: Enroll • To implement the M:N relationship, we convert
the relationship into 1:M relationships by
introducing a linking table. • What are the problems with this record structure?
are the problems with this record structure?
BUSI 335 S_Name 321452 Where will you
grades? 344511 Systems Analysis S_Num Intro. to Database
to Database CR# CR# 1322 Course 1321 What are the
foreign keys of
table? 33 BUSI 335 Copyright © 2009-10 Y.M. Cheung, William Tan and Carson Woo Relationships in
Databases 34 Referential Integrity Student
2040544 Enroll Student Name
Mike Luck Address
East Mall Title
3.0 Course Enroll
2040544 Course Course#
70 Can you give a grade to 8080808 for taking BAIT503 in Enroll table?
Can you delete the student record, 1234567, from Student table?
To avoid a mistake like this - specify primary and foreign keys.
avoid mistake like this specify primary and foreign keys
BUSI 335 Copyright © 2009-10 Y.M. Cheung, William Tan...
View Full Document
This document was uploaded on 03/04/2014 for the course COMM 335 at The University of British Columbia.
- Spring '12