Lastname 123 where would you store a students grade

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 Relationships Many Many-to-Many Relationships 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 store the information about student grades? grades? 344511 Systems Analysis S_Num Intro. to Database to Database CR# CR# 1322 Course 1321 What are the are the primary and foreign keys of the Enroll table? 33 BUSI 335 Copyright © 2009-10 Y.M. Cheung, William Tan and Carson Woo Relationships in Relational Databases Databases 34 Referential Integrity Student Student# 1234567 1234567 9385093 2040544 Enroll Student Name John Smith John Smith Mary Cox Mike Luck Address West Mall West Mall Main Mall East Mall Title #Credits Database 3.0 MS Access 1.5 IS Analysis 3.0 Course Enroll Student# 1234567 1234567 1234567 2040544 Course Course# Comm437 BAIT503 Comm436 Course# Grade BAIT503 BAIT503 88 88 Comm437 78 BAIT503 70 Can you give a grade to 8080808 for taking BAIT503 in Enroll table? 8080808 BAIT503 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.

Ask a homework question - tutors are online