Modern data management requires moving from manual record-keeping systems to electronic databases to store, organize, and retrieve information efficiently.
Using manual registers (e.g., a school attendance register) presents several operational challenges:
A file is a logical container on a computer storage device used to store data. File contents can include plain \text, program code, comma-separated values ( CSV ), images, audio, video, or web pages.
While files allow electronic storage, accessing and manipulating data within them requires custom application programs to parse and process the file contents.
Example: School Student and Attendance Files
Consider two separate files maintained on a computer system:
Table 7.1: STUDENT File (Maintained by Office Staff)
| RollNumber | SName | SDateofBirth | GName | GPhone | GAddress |
|---|---|---|---|---|---|
| 1 | Atharv Ahuja | 2003-05-15 | Amit Ahuja | 5711492685 | G-35, Ashok Vihar, Delhi |
| 2 | Daizy Bhutia | 2002-02-28 | Baichung Bhutia | 3612967082 | Flat no. 5, Darjeeling Appt., Shimla |
| 3 | Taleem Shah | 2002-02-28 | Himanshu Shah | 4726309212 | 26/77, West Patel Nagar, Ahmedabad |
| 4 | John Dsouza | 2003-08-18 | Danny Dsouza | NULL | S -13, Ashok Village, Daman |
| 5 | Ali Shah | 2003-07-05 | Himanshu Shah | 4726309212 | 26/77, West Patel Nagar, Ahmedabad |
| 6 | Manika P. | 2002-03-10 | Sujata P. | 3801923168 | HNO-13, B- block, Preet Vihar, Madurai |
Table 7.2: ATTENDANCE File (Maintained by Class Teacher)
| AttendanceDate | RollNumber | SName | AttendanceStatus |
|---|---|---|---|
| 2018-09-01 | 1 | Atharv Ahuja | P |
| 2018-09-01 | 2 | Daizy Bhutia | P |
| 2018-09-01 | 3 | Taleem Shah | A |
| 2018-09-01 | 4 | John Dsouza | P |
| 2018-09-01 | 5 | Ali Shah | A |
| 2018-09-01 | 6 | Manika P. | P |
| 2018-09-02 | 1 | Atharv Ahuja | P |
| 2018-09-02 | 2 | Daizy Bhutia | P |
| 2018-09-02 | 3 | Taleem Shah | A |
| 2018-09-02 | 4 | John Dsouza | A |
| 2018-09-02 | 5 | Ali Shah | P |
| 2018-09-02 | 6 | Manika P. | P |
As the volume of data and the number of files grow, a traditional file system exhibits several critical limitations:
A Database Management System (DBMS) is a software suite designed to create, manage, store, modify, and retrieve data from a database. It acts as an interface between the database and end-users or application programs, providing an abstract view of the data by hiding physical storage details.
Technical Profile: Database Management System (DBMS)
| Application Domain | Database Contents & Managed Entities |
|---|---|
| Banking | Customer information, account details, loan details, transaction histories, etc. |
| Crop Loan | Kisan credit card data, farmer's personal data, land area, cultivation details, loan history, repayment schedules. |
| Inventory Management | Product details, supplier information, stock levels, customer orders, delivery tracking. |
| Organisation Resource Management | Employee records, salary details, department structures, branch locations, performance metrics. |
| Online Shopping | Item descriptions, user login credentials, shopping carts, user preferences, transaction logs. |
To convert the school file system into a relational database, we apply normalization principles to eliminate redundancy:
"Shifting from a file system to a DBMS involves a trade-off between operational efficiency and initial setup costs."
Socio-Technical Analysis & Core Systemic Impact: Shifting to a DBMS incurs high initial costs, including purchasing sophisticated hardware and software licenses, training users to write queries, and ongoing recurrent costs for database administrators, regular backups, and disaster recovery operations. However, it guarantees data integrity, security, and concurrent access control.
To manage data efficiently, a DBMS relies on several foundational concepts and structural definitions:
The Relational Data Model represents data in the form of inter-related tables called relations . It is the most widely used data model in modern commercial databases.
Let us analyze the GUARDIAN relation schema and its properties:
GUARDIAN(GUID, GName, GPhone, GAddress)
| GUID | GName | GPhone | GAddress |
|---|---|---|---|
| 444444444444 | Amit Ahuja | 5711492685 | G-35, Ashok Vihar, Delhi |
| 111111111111 | Baichung Bhutia | 3612967082 | Flat no. 5, Darjeeling Appt., Shimla |
| 101010101010 | Himanshu Shah | 4726309212 | 26/77, West Patel Nagar, Ahmedabad |
| 333333333333 | Danny Dsouza | NULL | S -13, Ashok Village, Daman |
| 466444444666 | Sujata P. | 3801923168 | HNO-13, B- block, Preet Vihar, Madurai |
Keys are attributes or sets of attributes used to uniquely identify tuples within a relation and establish relationships between tables.
A relation can have one or more attributes that take unique values across all tuples. Any such attribute (or minimal set of attributes) that can uniquely identify a row is called a Candidate Key .
Example: In the GUARDIAN table, both GUID and GPhone are candidate keys because no two guardians will share the same ID or phone number.
The specific candidate key chosen by the database designer to uniquely identify the tuples in a relation is called the Primary Key . It must be unique and cannot contain NULL values.
Any candidate keys that are not chosen as the primary key are called Alternate Keys .
Example: If GUID is selected as the primary key for GUARDIAN , then GPhone becomes the alternate key.
If no single attribute in a relation can uniquely identify a tuple, a combination of two or more attributes is selected to act as the primary key. This is called a Composite Primary Key .
Example: In the ATTENDANCE table, RollNumber is repeated on different dates, and AttendanceDate is repeated for different students. However, the combination of {RollNumber, AttendanceDate} is unique for every record and serves as the composite primary key.
A Foreign Key is an attribute in a relation whose values are derived from the primary key of another relation. It is used to establish a link or relationship between the two tables.
Example: In the STUDENT table, the attribute GUID is a foreign key referencing the GUID primary key in the GUARDIAN table. This links each student to their respective guardian.
The relationships between tables are represented visually using schema diagrams, where arrows originate from the foreign key and point to the referenced primary key:
STUDENT (
RollNumber
, SName, SDateofBirth, GUID)
| |
| +---> GUARDIAN (
GUID
, GName, GPhone, GAddress)
v
ATTENDANCE (
AttendanceDate
,
RollNumber
, AttendanceStatus)