This action might not be possible to undo. Are you sure you want to continue?
Assignment # 2
Major CS CS Department CS
Data Structures CS3320 4 CS Discrete Maths MATH2410 3 MATH Database CS3380 3 CS SECTION Section_identifier Course_number Semester Year Instructor 85 MATH2410 Fall 04 King 92 CS1310 Fall 04 Anderson 102 CS3320 Spring 05 Knuth 112 MATH2410 Fall 05 Chang 119 CS1310 Fall 05 Anderson 135 CS3380 Fall 05 Stone GRADE_REPORT Student_number Section_identifier Grade 17 112 B 17 119 C 8 85 A 8 92 A PREREQUISITE Course_number Prerequisite_number CS3380 CS3320 CS3380 MATH2410 CS3320 CS1310
R 2009- -096
to redundant data. The ideal candidates for redundant duplication are table columns that meet the following criteria: y y y The introduction of redundancy will eliminate the need to repeatedly join two tables together.Class Assignment Assignment # 2 Q1. the introduction of redundancy is a function of the size of the redundant column and the frequency with which the column is updated.Name . Select * from STUDENT where name= Smith and student_number >10 Select course_number . it defeats the purpose of relational database designs. Update STUDENT as set name= Smith 2.Grade_report.GRADE_REPORT where student. 4. The data column is small. requires that you make changes to multiple fields of a database. A change or modification. While this is the expected behaviour for flat file database designs and spreadsheets.-096 2 . 2.student From Update:1. STUDENT. Essentially. R 2009. instructor from SECTION where semester=fall Select * from GRADE_REPORT where Student_number between 5 and 20 Select student.student number . Identify some informal queries and update operations that you would expect to apply to the database shown below. student. Select:1. What is data redundancy? What are the disadvantages of having redundancy within a database? Data Redundancy:Data redundancy is a data organization issue that allows the unnecessary duplication of data within your Microsoft Access database. Update SECTION as set instructor = Stone and semester= fall Q2. 3. The data column is static and rarely updated.
programs do not have to be modified when types of unrelated data are added to or deleted from the database. thereby eliminating the storage of redundant data. Class . Less storage: Theoretically. complex requests can be handled much more rapidly then if the data were located in separate.-096 3 . Also. which would increase user productivity. 2. or when physical storage changes. The principal advantages of a DBMS are the followings: Flexibility: Because programs and data are independent. Name all relationships shown in the above database. all occurrences of data items need be stored only once. Table 1 (STUDENT):1. Multiple access: Database software allows data to be accessed in a variety of ways (such as through various key fields) and often. Name. Fast response to information requests: Because data are integrated into a single database. the total time taken to process requests may be shorter. Q4. State 5 advantages of DBMS? Benefits of DBMS (Database Management Systems) are followings: A true DBMS offers several advantages over file processing.Class Assignment Assignment # 2 Q3. R 2009. by using several programming languages (both 3GL and nonprocedural 4GL programs). Lower user training costs: Users often find it easier to learn such systems and training costs may be reduced. faster response means better customer service. Major combined can be a candidate key. In many businesses. System developers and database designers often use data normalization to minimize data redundancy. non-integrated files. Primary key of this table is Student Number.
3.-096 4 . Table 5 (PREREQUISITE):1. Q5. Referential Integrity:The referential integrity constraint is specified between two relation and is used to maintain the consistency among tuples in the two relations. Example:- R 2009. 2. Informally. Grade combined can be primary key. This also specifies that there may not be any duplicate entries in primary key column. Student_number. Course_number is a foreign key from table 2. Course_name .Class Assignment Table 2 (COURSE):- Assignment # 2 1. 2. the referential integrity constraint states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation. Give some examples of integrity constraints that you think should hold on the database shown above. Table 3 (SECTION):1. Table 4 (GRADE_REPORT):1. Department is a Foreign key from table 1. Student_number. Example:In every above table field of PK is unique and cannot be null. 2. Having null value for the primary key implies that we cannot identify some tuples. 2. credit_ hours. Primary key is Course_number. This is because the primary key value is used to identify individual tuples in a relation. Course_number and Prerequisite_number combined can be a Primary key. section_identifier . Entity integrity:The entity integrity constraint states that no primary key value can be null. department combined can be a candidate key. Section_identifier is a primary key. Section_identifier are foreign keys from table4 and table 3 respectively. Course_number is a foreign key table 2.
-096 5 . must be the Primary key of the referred table but foreign key can be partially null. R 2009.Class Assignment Assignment # 2 Every FK defined in question 4.