Requirement Gathering
Requirement Gathering
REQUIREMENT GATHERING:
We assign to make simple database of any company or organization. And we decide to make a library database of superior university. First of all we went to a library where we met with a librarian and we tell him that we want to make a Database. Can you tell us about the method which you use and tell us that how to record or store the data. Which things you need to store the data correctly? We will give you computerized database record. Librarian tells us that we have different books of different categories. We store these books manually at a separate registers and we also write the name, ID, address of the books. We also write the author name in that register. We have another register in which we write the student ID, student name, student father name, department, Email ID, cell number and address also. We have another register in which we write the full information of teachers like as teacher ID, teacher name, cell number, Email, teacher father name and address etc. We define some entities:
STUDENT_INFORMATION TEACHERS_INFORMATION BOOKS_ISSUE BOOKS_RECEIVED BOOK_CATEGORIES STOCK_BOOKS SHOW RELATION IN TABLES GRAPH:
2. ER DIAGRAMS:
We also asked from the librarian about the methodology that how to store the database of different students in different tables and how to manage all the records of the students. After the collection of information from the librarian we make the different entities to make a database. After that we make different tables of different entities in which we insert the information of the different students and the teachers and these entities are most important for the database. There is a stock of books
STUDENT_INFORMATION
Std_Id Std_Name Std_Father_Name Department Std_Email Std_Cell_No Std_Address AutoNumber Text Text Text Text Number Text
The above table shows all the information of the student. In this table we insert ID of the student, student name, student father name, department, Email ID, cell no and address etc. in this table student ID is the primary key it is not change. We must mention the data type of the each column.
TEACHER_INFORMATION
Tech_ ID Tech_Name Tech_Father_Name Department Tech_Email Tech_Cell_No Tech_Address AutoNumber Text Text Text Text Number Text
The above table shows that all the information of the teachers. It is another entity table in which we write the teacher ID. Teacher ID is a unique number that cannot be change.
BOOK_STOCK
Book_ ID Book_Name Book_Author Book_Edition Tech_Email Number Text Text Text Number
3. Define Keys:
a. Primary Key: A primary key is a column in a table that uniquely identifies the rows in that table. The values positioned in primary key columns must be unique for each row no duplicates can be allowed. In addition, nulls are not allowed in primary key columns. In three different tables we define primary key. Std-ID, Teac-ID, Book-ID b. Foreign keys: Foreign key are columns that identify primary key column. Order No is the primary key of the table orders below and Customer No is a foreign key that points to the primary key in the customers table. Foreign key example is: when Student ID is used for Stock relation Then Std-ID converts it into foreign key/reference key. c. Composite Key: A composite key is consisting of more than one attribute. For example in a table one attribute is ID and other is Name. When we built a primary key that take IDName it is called a Composite key.
Before normalization we remove the full functional dependency and create the partial dependency. For example in one relation more than one key attribute are used we create more than one relation for removing a full functional dependency.
Full Dependency
Std_Id
Std_Name
Std_Email
Tech_Id
Tech_Name
Tech_Email
Book_Id
Book_Name
Book_Edition
Partial Dependency
Partial Dependency
Partial Dependency
Student Table
Teachers Table
Books Stock
Second Normal Form: In second normalization the table must be in first normal form. All non key attributes must depend on key attribute.
Depatrment Table