Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction: The software is to be developed for automation of course registration system in foundation university institute of engineering and management sciences. The data base has to be normalized and redundancies had to be minimized but not at the cost of data integrity.The database has been normalized up to 3 normal forms. The automation of this registration form will minimize the time required by the students to fill up the forms and also reduce the resource usage.
What is normalization?
Normalization is the process of efficiently organizing data in a database. There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) and ensuring data dependencies make sense (only storing related data in a table). Both of these are worthy goals as they reduce the amount of space a database consumes and ensure that data is logically stored.
What is redundancy?
Data Redundancy: If data can be found in two places in a single database (direct redundancy) or calculated using data from different parts of the database (indirect redundancy) then redundancy exists If redundancy exists If redundancy exists then this can cause problems during normal database operations. When data is inserted the database the data must be duplicated where ever redundant versions of that data exists. When data is updated, all redundant data must be simultaneously updated to reflect that change. What is data integrity? y Entity integrity: The rows represent entities, each row must be uniquely identified. Primary key are used to identify those rows. Referential integrity: This constraint involves the foreign keys. Foreign keys tie the relations/tables together, so it is vitally important that the links are correct.
What is simple data table? Simple data table is a table that contains data in a very simplified and human readable form. It is not related to the actual database of computer, it normally gives the raw idea about what is being done in the organization. This simple data table It is possible that the functional dependencies have to be extracted by looking a real data from the database. This is problematic as it is possible that the data does not contain enough information to extract all the dependencies, but it is a starting point.
Regno
Name
Father s Name
Program
Batch
Semester
Subject
Repeat/Fresh
Prereqs
Credit Hours
Passed
3997
Aa
Bcse
Fall 2009
CA
Fresh
Electronics
3997
Aa
Bcse
Fall 2009
124
OS
Fresh
ISE
3997
Aa
Bcse
Fall 2009
125
SE
Fresh
ISE
4000
Bb
Bcse
Fall 2009
123
Ca
Fresh
Electronics
4000
Bb
Bcse
Fall 2009
124
Os
Fresh
ISE
4000 4003
B C
Bb Cc
Bcse Bcse
4 4
125 123
Se Ca
Fresh Fresh
ISE
3 3
Y Y
Electronics
4003
Cc
Bcse
Fall 2009
124
Os
Fresh
ISE
4003
Cc
Bcse
Fall 2009
125
Se
Fresh
ISE
R( Regno, Name, Father s Name, Program, Batch, Semester, Repeat/Fresh, Course Code, Subject, Prereqs, Credit hours, Passed) Sometimes the starting point for understanding a problem s data requirements is given using functional dependencies. A functional dependency is two lists of attributes separated by an arrow. Given values for the LHS uniquely identifies a single set of values for the RHS attributes. Sometimes data does not contain enough information to extract the functional dependencies
A A A B B B C C c
Fall 2009 Fall 2009 Fall 2009 Fall 2009 Fall 2009 Fall 2009 Fall 2009 Fall 2009 Fall 2009
CA OS SE Ca Os Se Ca Os Se
3 3 3 3 3 3 3 3 3
Y Y Y Y Y Y Y Y y
Sometimes the starting point for understanding a problem s data requirements is given using functional dependencies.A functional dependency is two lists of attributes separated by an arrow. Given values for the LHS uniquely identifies a single set of values for the RHS attributes. Sometimes data does not contain enough information to extract the functional dependencies. R( Regno, Name, Father s Name, Program, Batch, Semester, Repeat/Fresh, Course Code, Subject, Prereqs, Credit hours, Passed) Regno-> Name, Father s Name, Program, Batch, Semester, Repeat/ Fresh
The table must not have repeating groups. To remove the repeating groups: flatten the table and extend the key Or decompose the relation
Decomposing a relation: Better approach is to decompose a relation rather than flatten the table.. Law to decompose is Put redundant group of attributes in one table and non redundant group of attributes in another table.
name A B C
Father name Aa Bb Cc
Semester 4 4 4
th th th
Regno
Coursecode
coursetitle
Fresh/repeat
Credit hours
prereqs
Prereq passed
CA OS SE CA OS SE
3 3 3 3 3 3
Y Y Y Y Y Y
We have two tables. Biodata( Regno, Name, FatherName, Program, Batch, Semester, Repeat/fresh) Courses(Regno, CourseCode, subject, prereq, credithours, passed) Without repeating groups relations are in First Normal Form .
name A B C
Father name Aa Bb Cc
Regno
Coursecode
coursetitle
Credit hours
Pre-reqs code
Prereq passed
1 2
321 321
qwe fffg
4 4
123
y f
Prereqs ca sc
Third Normal Form A relation is in 3NF if it contains no repeating groups, no partial functional dependencies, and no transitive functional dependencies
Regno 3998 4000 4003 name A B C Father name Aa Bb Cc Program id 1 1 1 Batch id 1 1 1 Semester 4th 4th 4th
Program id 1 2 3
Batch id 1 2 3
Batch name Fall year 2007 Fall year 2008 Fall year 2009
Regno 1 2 1
Prereq passed y F y
credithours 3
Pre-reqs code 1 2
Computer archietecture 3
Prereq code
prereqs
Pf,itc
calculus
Data Types:
Batch Id table
Biodata table
Course table
Class Diagram
Queries SELECT courseDetail.CourseCode, courseDetail.Coursetitle, courseDetail.credithours, prereqDetail.prereqs, course.prereqpasd FROM prereqDetail INNER JOIN (courseDetail INNER JOIN course ON courseDetail.CourseCode=course.coursecode) ON prereqDetail.prereqcode=courseDetail.prereqcode WHERE (((course.Regno)=[reg]));
SELECT Biodata.Regno, Biodata.Fnme, Biodata.Semester, Batch.BatchNme FROM Batch INNER JOIN Biodata ON Batch.Batchid = Biodata.batchid WHERE (((Biodata.Regno)=[@reg]));
________________________________________________________________