section - the university of vermontdnovak/141/student-class-example-full-solutions.pdf · bsad 141,...
TRANSCRIPT
BSAD 141, Fall 2017 In-class ERD exercise (Tuesday, 10/24)
Student / Course Section example: This example builds directly on the M:M example we discussed in class last week and is the last in-class example that involves normalizing data. You are given a bunch of data that are loosely organized into Excel tables. The data are not normalized. They are kind of a mess and you should notice that there are quite a few redundancies in the data. If we were to scale the example up by adding more data, it would quickly become very difficult to manage and use the data in their current form. 1. Normalize the data by Identify the specific entities (people, places, things, events) about
which data are collected. These entities will become the entity sets or tables in your ERD and subsequently in the Access RDBMS. You want to separate the attributes and data associated with each entity and put those data in the appropriate tables.
For example: you have information specifically related to students. 2. By looking at the data and thinking about the relationships between the different entities,
you should be able to come up with logical or sensible relationships between the tables in your ERD.
For example: how would you relate the entity course to entity course section? A specific course can have many course sections, but each course section belongs to only one course. i.e. the course BSAD 141 can have many course sections associated with it (BSAD 141 A, BSAD 141 B, BSAD 141 C, etc…), but each course section (A, B, C, etc…) belongs to the one course BSAD 141. Each course section has its own CRN, has a unique meeting time, is taught by a particular professor, etc.
3. DRAW (with pen or pencil) the ERD describing the relationships between all of the entities.
Using the data I provided you, list the attributes associated with each table. USE PROPER NOTATION!!!
a) ID the PK for each entity (if there is not a PK that should be used, you could create one)
b) List the attributes (fields) for each entity under/by each table c) ID and resolve any M:M relationships d) ID ALL FKs
Course Course Section
Can have
Each belongs to
1
M
4. Once you have completed the written ERD, implement the ERD in MS Access. Pay attention to how you format the attribute field. For example, you should format numeric data as numbers, dates as time/data, etc.
Make sure you can correctly link all tables using “relationships” menu item and make sure you check “enforce referential integrity”.
Some pointers for Access (we have discussed these in class):
1. Build your tables and relationships 1st – don’t start putting data in the tables before all tables a built and the relationships are set
2. Make sure all tables have an appropriate PK field. It could be a composite key in some
cases.
3. Place all FK attributes in appropriate tables
4. Create the relationships in Access
5. ONLY ENTER DATA AFTER YOU ARE SURE THE TABLE STRUCTURE AND KEYS ARE CORRECT AND MATCH YOUR ERD
6. Enter data on the ONE SIDE of the relationship first
Stu_# Stu_L_Name Stu_F_Name Stu_Add Crse_Title Section CRN Crse_Start Crse_End Prof_L_Name Meet_Day Building Room_# Grade
4455 Wier Bob 23 Green St. BSAD 141 A 333 10:00 AM 11:15 AM Novak T, TH Kalkin 004 A-
6688 Smith Sally 62 Yellow St. BSAD 141 A 333 10:00 AM 11:15 AM Novak T, TH Kalkin 004 C
2222 Simpson Lisa 80 Red Road BSAD 141 A 333 10:00 AM 11:15 AM Novak T, TH Kalkin 004 A
1111 Burns Monty 15 Reactor Rd. BSAD 141 A 333 10:00 AM 11:15 AM Novak T, TH Kalkin 004 B
4455 Wier Bob 23 Green St. BSAD 180 A 123 11:30 AM 12:45 PM Thomas T, TH Kalkin 003 B
6688 Smith Sally 62 Yellow St. BSAD 180 A 123 11:30 AM 12:45 PM Thomas T, TH Kalkin 003 B
2222 Simpson Lisa 80 Red Road BSAD 180 A 123 11:30 AM 12:45 PM Thomas T, TH Kalkin 003 A
1111 Burns Monty 15 Reactor Rd. BSAD 180 A 123 11:30 AM 12:45 PM Thomas T, TH Kalkin 003 C
4455 Wier Bob 23 Green St. BSAD 173 B 222 9:00 AM 10:15 AM Lucas M, W Kalkin 004 B+
6688 Smith Sally 62 Yellow St. BSAD 173 B 222 9:00 AM 10:15 AM Lucas M, W Kalkin 004 B-
2222 Simpson Lisa 80 Red Road BSAD 173 B 222 9:00 AM 10:15 AM Lucas M, W Kalkin 004 A
1111 Burns Monty 15 Reactor Rd. BSAD 173 B 222 9:00 AM 10:15 AM Lucas M, W Kalkin 004 C+
Building Room_# Seat_Cap Audio/Visual
Kalkin 004 60 yes
Kalkin 003 50 yes
Votey 103 100 no
Kalkin 001 50 yes
Prof_ID Prof_L_Name Prof_F_Name Office_# Phone_# Crse_Title Section CRN Crse_Start Crse_End Meet_Day
P11 Novak David 310 656-4043 BSAD 141 A 333 10:00 AM 11:15 AM T, TH
P11 Novak David 310 656-4043 BSAD 141 B 334 11:30 AM 12:45 PM T, TH
P20 Thomas Mike 313 A 656-0000 BSAD 180 A 123 11:30 AM 12:45 PM T, TH
P20 Thomas Mike 313 A 656-0000 BSAD 280 A 555 5:00 PM 6:15 PM T, TH
P1 Do Hung 306 656-1111 BSAD 173 A 220 1:00 PM 3:30 PM F
P8 Lucas Marilyn 218 656-2222 BSAD 173 B 222 9:00 AM 10:15 AM M, W
Crse_Title Section CRN Crse_Start Crse_End Meet_Day Building Room_#
BSAD 141 A 333 10:00 AM 11:15 AM T, TH Kalkin 004
BSAD 141 B 444 11:30 AM 12:45 PM T, TH Kalkin 004
BSAD 180 A 123 11:30 AM 12:45 PM T, TH Kalkin 003
BSAD 280 A 555 5:00 PM 18:15 T, TH Kalkin 001
BSAD 173 B 222 9:00 AM 10:15 AM M, W Kalkin 004
Crse_Name Crse_Title Crse_description Credits
Introduction to Management Information
Systems BSAD 141
Introduces business information systems and how they enable
better managerial decision-making. Discusses problems in analyzing,
designing, and implementing such systems. 3
Managerial Finance BSAD 180
The financial function in the corporation. Techniques for evaluating
current use of resources and proposed resource acquisitions or
dispositions. 3
Production and Operations Analysis BSAD 173
Introduces decisions related to the design, management, and
improvement of activities that create and deliver a firm's products
and services. 3
Principles of Management and Org Behavior BSAD 120
How people in organizations think and behave. Focuses on how
leadership and motivation affect individuals and teams in the
workplace and a global business context. 3
Financial Accounting BSAD 60
Introduction to the accounting system and generally accepted
accounting principles that govern income determination and
financial position presentation. 3
Professor
Course
Section
Room
ScheduleLine Item
StudentTeaches
Taught in
Part of
Has
Lists
Can be Listed on Lists
Can hold
Is taughtby
Can be Listed on
M
M
1
1
M
M
1
1
1
M
Professor tableProf_ID (PK)Prof_L_NameProf_F_NameProf_PhoneOffice#
Course tableCrse_Title (PK)Crse_Name
Crse_DescCredits
Student tableStu_I# (PK)Stu_L_NameStu_F_NameStu_Address
Room tableRoom# (PK)Building (PK)
Seat_CapacityAudio/Visual
CompositePK
Section tableCRN (PK)Section_LetterCrse_Start_TimeCrse_End_TimeCrse_Meet_DayCrse_Title (FK to Course Table)Prof_ID (FK to Professor table)Room#Building
CompositeFK to room table
Schedule Line Item tableCRN (PK) (Also FK to Section table)Stu_# (PK) (Also FK to Student table)Grade
CompositePK
Section Table (Note that this table has 3 foreign keys – Prof_ID to Professor, Course_Title to Course, and the composite of Room# and Building to
Room) Design View
Schedule Line Item table (Note that this table has a composite PK and 2 foreign keys – CRN to section, and Stu_# to student) Design View
The relationships in Access look like:
Now, once you have created all the tables using the appropriate attributes, have identified your primary keys in each table, and have included all
foreign keys in the appropriate tables, you can enter data.
ALWAYS enter data on the parent side of the relationship FIRST. So, start with the tables that are on the 1 (one) side of the relationship: Professor,
Course, Room, and Student. This prevents referential integrity violations.
Next, enter data in the Section table (because CRN is a foreign key in Schedule Line Item). And, lastly enter data in the Schedule Line Item table.