Database Concepts
Database Concepts — Study Notes
NCERT-aligned · 9 notes · 3 shown free
8.1 INTRODUCTION
Explanation8.1 INTRODUCTION
Data is fundamental to various applications and managing it efficiently is essential. This section introduces the concept of storing and managing data electronically by illustrating a practical example of a school maintaining student data, attendance records, and guardian details. The class teacher marks daily attendance in a register, recording 'P' for present and 'A' for absent against each student's roll number for every working day. For a class strength of 50 students and 26 working days in a month, the teacher must manually record 50 × 26 entries monthly, which is tedious and error-prone. Manual record keeping faces limitations such as repetitive data entry, inconsistency due to errors in writing names or skipping records, risk of data loss if the register is damaged or lost, and errors in manual calculations when consolidating attendance. The office staff also maintains student and guardian details manually for correspondence purposes. Searching, modifying, or deleting data in such a manual system is difficult and inefficient. To overcome these challenges, storing attendance and student details electronically in separate data files on a computer system is desirable. This allows easy copying of student details when promoted, quick data retrieval, addition of new student details, modification of existing data, and deletion of records when students leave. This section sets the stage for understanding electronic data management systems and their advantages over manual record keeping.
- Manual record keeping is tedious and prone to errors.
- Attendance for 50 students over 26 days requires 1300 manual entries monthly.
- Manual systems face data loss, inconsistency, and difficulty in modification.
- Electronic storage of data in files can overcome manual system limitations.
- Separate data files for attendance and student details improve management.
- Electronic data management enables easy addition, modification, and deletion.
- 📌 Data: Facts or information stored for use.
- 📌 Manual record keeping: Data entry and maintenance using pen and paper.
- 📌 Attendance register: A manual record of student presence or absence.
8.2 FILE SYSTEM
Explanation8.2 FILE SYSTEM
A file system is a method to store data in containers called files on a computer's storage device. Files can contain various types of data such as text, program code, comma-separated values (CSV), pictures, audio/video, and web pages. Files can be accessed directly and searched for desired data. However, accessing data from files through software requires writing application programs that understand the file structure and can retrieve or manipulate data. Continuing the school example, student details and attendance are stored in two separate files: STUDENT and ATTENDANCE. The STUDENT file contains six columns: RollNumber, SName (student name), SDateofBirth, GName (guardian name), GPhone (guardian phone), and GAddress (guardian address). The ATTENDANCE file contains AttendanceDate, RollNumber, SName, and AttendanceStatus (P or A). These files are maintained separately by office staff and teachers respectively. Although file systems allow data storage, they have limitations such as difficulty in accessing data in required formats, data redundancy where the same data is duplicated across files, data inconsistency when duplicated data does not match, data isolation due to lack of links between files, data dependence where changes in file structure require changes in application programs, and difficulty in controlled data sharing among different user categories. These limitations motivate the need for more advanced data management systems like DBMS. **Table on page 3 (7×6)** | Roll Number | SName | SDateof Birth | 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 | 7110047139 | Flat no. 5, Darjeeling Appt., Shimla | | 3 | Taleem Shah | 2002-02-28 | Himanshu Shah | 9818184855 | 26/77, West Patel Nagar, Ahmedabad | | 4 | John Dsouza | 2003-08-18 | Danny Dsouza | | S -13, Ashok Village, Daman | | 5 | Ali Shah | 2003-07-05 | Himanshu Shah | 9818184855 | 26/77, West Patel Nagar, Ahmedabad | | 6 | Manika P. | 2002-03-10 | Sujata P. | 7802983674 | HNO-13, B- block, Preet Vihar, Madurai | **Table on page 3 (7×4)** | 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 | **Table on page 4 (6×4)** | 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 | **Table on page 17 (8×2)** | Roll no | Preference | | --- | --- | | 9 | Cricket | | 13 | Football | | 17 | Badminton | | 17 | Football | | 21 | Hockey | | 24 | NULL | | NULL | Kabaddi | **Table on page 19 (7×4)** | Table: UNIFORM | | | | | --- | --- | --- | --- | | Attribute | UCode | UName | UColor | | Constraints | Primary Key | Not Null | - | | Table: COST | | | | | --- | --- | --- | --- | | Attribute | UCode | Size | Price | | Constraints | Composite Primary Key | | >0 | **Table on page 19 (7×3)** | UCode | UName | UColor | | --- | --- | --- | | 1 | Shirt | White | | 2 | Pant | Grey | | 3 | Skirt | Grey | | 4 | Tie | Blue | | 5 | Socks | Blue | | 6 | Belt | Blue | **Table on page 19 (17×3)** | UCode | Size | COST Price | | --- | --- | --- | | 1 | M | 500 | | 1 | L | 580 | | 1 | XL | 620 | | 2 | M | 810 | | 2 | L | 890 | | 2 | XL | 940 | | 3 | M | 770 | | 3 | L | 830 | | 3 | XL | 910 | | 4 | S | 150 | | 4 | L | 170 | | 5 | S | 180 | | 5 | L | 210 | | 6 | M | 110 | | 6 | L | 140 | | 6 | XL | 160 | **Table on page 20 (6×5)** | Roll No | Name | Class | Section | Registration ID | | --- | --- | --- | --- | --- | | 11 | Mohan | XI | 1 | IP-101-15 | | 12 | Sohan | XI | 2 | IP-104-15 | | 21 | John | XII | 1 | CS-103-14 | | 22 | Meena | XII | 2 | CS-101-14 | | 23 | Juhi | XII | 2 | CS-101-10 | **Table on page 20 (7×3)** | ProjectNo | PName | SubmissionDate | | --- | --- | --- | | 101 | Airline Database | 12/01/2018 | | 102 | Library Database | 12/01/2018 | | 103 | Employee Database | 15/01/2018 | | 104 | Student Database | 12/01/2018 | | 105 | Inventory Database | 15/01/2018 | | 106 | Railway Database | 15/01/2018 |
- File system stores data in files on computer storage devices.
- Files can contain text, program code, CSV, multimedia, etc.
- Data access requires application programs to read files.
- STUDENT and ATTENDANCE files store school data separately.
- File systems suffer from data redundancy, inconsistency, and isolation.
- Data dependence and lack of controlled sharing are major issues.
- 📌 File: Container to store data on a computer.
- 📌 File system: Method to organize and store files on storage devices.
- 📌 Data redundancy: Duplication of same data in multiple files.
8.2.1 Limitations of a File System
Explanation8.2.1 Limitations of a File System
File systems become difficult to manage as the number of files and volume of data increase. The major limitations include: (A) Difficulty in Access: Files do not provide mechanisms to retrieve data directly. Accessing data requires application progr
Practice Questions — Database Concepts
Includes NCERT exercise questions with answers
Q1.Which of the following is not an advantage of using DBMS?
Answer:
DBMS increases data redundancy
Q2.A non key attribute, whose values are derived from the primary key of some other table is known as
Answer:
Foreign Key
Q3.A candidate key that is not primary key is known as
Answer:
Alternate Key
Q4.All attribute combination inside a relation that can serve as primary key is known as
Answer:
Candidate Key
Q5.A set of one or more attribute(s) that can uniquely identify records in a table is known as
Answer:
Primary Key
Q6.Number of columns in a table is known as
Answer:
Degree
Q7.Number of rows in a table is known as
Answer:
Cardinality
Q8.A column of a database relation is also known as
Answer:
Attribute
All 13 Chapters in Computer Science
Computer Science · Class 12