Database
Database
Faridipur, Sultanpur
Database Management System
In a Hierarchical Database, the data elements are linked in the form of an inverted tree structure
with the root at the top, and the branches formed below. There is a parent-child relationship among
the data elements of a hierarchical database. A parent data element is the one that has one or more
subordinate data elements. The data elements that are below a parent data elements are its children
data elements.
For example, let us take the example of a hierarchical database of an organization’s employees.
Employees are categorized by the department in which they work, and within a department, they
are categorized by their job function, such as manager, engineers, technicians, and support staff.
In a RELATIONAL DATABASE, the data elements are organized in the form of multiple tables
with rows and columns. Each table of the database is stored as a separate file. Each table column
represent a data field, and each row a data record (all know as tuple).
The data in one table is related to data in another table with a common field.
For example, a sample library database is comprised of three tables. The first table contains the
data of library members, the second table contains the data of borrowed books, and the third
table contains the data of books in the library.
Each new member is assigned a membership number and issued a library card with this number
on it. The member’s name, address, and membership number are added in member data table.
When a member borrows a book, the membership number of the borrower, the book’s ISBN
number (which serves as a unique identification number for a book), and the due date for returning
the book are added to the second table. The first and second tables are related by the ‘Membership
No.’ common field, and the second and third tables are related by the “Book No.” common field.
Now let us assume that the librarian wants a report of overdue books as of 10-11-2001, and wants
the list to contain the borrower’s details and the book’s details for each overdue book. To
produce such a report, the database search routine will first search for the due date field in the
borrowed book data table to surface the three overdue books. The database management system
will then use the ‘Membership No’ filed to cross-reference the book’s details of each overdue book
from the member’s data table, and the ‘Book No.’ field to cross-reference the book’s details of