Uploaded by naveena.chennupati

ADC assignment1

advertisement
ADVANCE_DATABASE_CONCEPTS
COURSE_NUMBER: CPSC8845
PROFESSOR: SOON_OK_PARK
STUDENT_NAME: NITHIN_REDDY_GADDAM
STUDENT_ID: 1255073
ASSIGNMENT_#1
Figure 1.2 A database that stores student and course information.
#1 - Specify all the relationships among the records of the database shown in
Figure 1.2.
Ans:
STUDENT
STUDENT
X
COURSE
O-M
SECTION
M-O
GRADE_REPORT M-O
PREREQUISITE
-
COURSE
O-M
X
O-M
M-O
SECTION
O-M
O-M
X
O-O
-
GRADE_REPORT
O-M
O-O
O-O
X
-
PREREQUISITE
O-M
X
#2 - Consider Figure 1.2.
a. If the name of the ‘CS’ (Computer Science) Department changes to ‘CSSE’
(Computer Science and Software Engineering) Department and the
corresponding prefix for the course number also changes, identify the
columns in the database that would need to be updated.
Ans.
The columns that are to be updated are:
Major from STUDENT,
Course_number, Department from COURSE,
Course_number from SECTION,
Course_number, Prerequisite_number from PREREQUISITE.
b. Can you restructure the columns in COURSE, SECTION, and PREREQUISITE
tables so that only one column will need to be updated?
Ans.
Yes,
We can restructure the columns in given tables,
COURSE:
Course_name
Intro to Computer Science
Data Structures
Discrete Mathematics
Database
SECTION:
Section_identifier
85
92
102
112
119
135
PREREQUISITE:
Course_number
CS3380
CS3380
CS3320
Course_number
CS1310
CS3320
MATH2410
CS3380
Course_number
MATH2410
CS1310
CS3320
MATH2410
CS1310
CS3380
Semester
Fall
Fall
Spring
Fall
Fall
Fall
Credit_hours
4
4
3
3
Year
07
07
08
08
08
08
Prerequisite_Course_name
Data Structures
Discrete Mathematics
Intro to Computer Science
Instructor
King
Anderson
Knuth
Chang
Anderson
Stone
By Deleting “Department” column from Course and Changing the Column from
Prerequisite_number to Prerequisite_Course_name, we can avoid the unnecessary updates we
have to do to update the information from “CS to CSSE” or “COMPUTER SCIENCE to
COMPUTER SCIENCE AND SOFTWARE ENGINEERING”.
After this, we will have to update only one column and that is “Course_number”.
Download