Chapter 7: Database Concepts || Informatics Practices (IP) || Class 11th || NCERT CBSE || NOTES IN ENGLISH || 2024-25

  


Chapter 7: Database Concepts

Introduction:

As we collect and store data, it becomes challenging to manage it efficiently using manual or basic file systems. A Database Management System (DBMS) helps us organize, store, and manage data electronically, making it easier to retrieve and update information as needed. This chapter explains how a DBMS works, its advantages over file systems, and key concepts in relational databases.


1. File System:

  • Definition: A file system is a way of storing data in a computer where each file acts as a container for data (text, images, code, etc.).

  • Example: A school may keep student attendance and personal information in separate files. Each file holds specific types of data, like student names, guardian details, and attendance records.

1.1 Limitations of File System:

  • Difficulty in Access: Retrieving data requires creating new programs each time, making access slow and challenging.

  • Data Redundancy: Same data may appear in multiple files, using unnecessary storage.

  • Data Inconsistency: Changes in one file may not reflect in others, leading to mismatched data.

  • Data Isolation: Related data stored in different files is hard to connect.

  • Data Dependence: Changes to the file structure may require updates to all related programs.

  • Controlled Data Sharing: Limiting access (read or write) to specific users is difficult.


2. Database Management System (DBMS):

  • Definition: A DBMS is software that helps us create, store, manage, and retrieve data efficiently, overcoming the limitations of file systems.

  • Examples of DBMS: MySQL, Oracle, SQL Server, Microsoft Access.

2.1 Benefits of DBMS:

  • Reduces data redundancy.

  • Ensures consistency and reliability of data.

  • Simplifies data access and retrieval.

  • Offers security with controlled access to data.


3. File System to DBMS:

  • Moving from file systems to a DBMS involves organizing data into a structured database where data is stored in tables and linked using relationships.

3.1 Example (School Database):

  • In a school database, tables like Student, Guardian, and Attendance are connected by common fields (e.g., Roll Number or Guardian ID). This setup prevents redundancy by storing data in a single, unified system.


4. Key Concepts in DBMS:

To use a DBMS effectively, it’s essential to understand terms like schema, metadata, queries, and data manipulation.

4.1 Database Schema:

  • The schema is the design of the database, describing tables, fields, and their relationships.

4.2 Data Constraint:

  • Constraints limit the type of data that can be entered (e.g., only 10-digit numbers in a phone field).

4.3 Metadata or Data Dictionary:

  • Metadata is “data about data,” storing the structure and rules of the database.

4.4 Database Instance:

  • A database instance is a snapshot of the database at a particular time.

4.5 Query:

  • A query is a command that requests specific information from the database.

4.6 Data Manipulation:

  • Data can be added (insertion), deleted, or updated within the database.

4.7 Database Engine:

  • The database engine is the core component that processes and manages data within a DBMS.


5. Relational Data Model:

The Relational Data Model is the most popular type of DBMS, organizing data into tables (relations) that are connected through relationships.

5.1 Attributes, Tuples, and Domains:

  • Attributes: The columns in a table (e.g., Name, Age).

  • Tuples: The rows in a table, each representing a record.

  • Domain: The set of possible values for an attribute.

5.2 Degree and Cardinality:

  • Degree: Number of attributes (columns) in a table.

  • Cardinality: Number of records (rows) in a table.

5.3 Properties of a Relation:

  1. Each attribute has a unique name.

  2. Tuples are unique and unordered.

  3. Data in each attribute must be of the same type (domain).


6. Keys in a Relational Database:

Keys help identify records in a database uniquely and link tables together.

6.1 Candidate Key:

  • A candidate key is an attribute that can uniquely identify records in a table.

6.2 Primary Key:

  • The primary key is a unique identifier chosen from candidate keys (e.g., Student ID).

6.3 Composite Primary Key:

  • When a single attribute cannot uniquely identify records, multiple attributes are combined as a primary key.

6.4 Foreign Key:

  • A foreign key is an attribute that links one table to another by referring to its primary key.


Conclusion:

A Database Management System (DBMS) provides a systematic way to organize, store, and retrieve data, addressing the shortcomings of traditional file systems. The relational data model, with concepts like tables, keys, and relationships, allows efficient data handling and minimizes redundancy. Understanding these concepts is essential for working with modern databases and using data effectively.


Recap:

  1. File System: Useful but limited in handling large, complex data.

  2. DBMS: Organizes data into related tables, reducing redundancy and improving access.

  3. Relational Model: Data is stored in tables linked by keys and relationships.

  4. Keys: Primary keys uniquely identify records, and foreign keys connect tables.




0 comments: