Class 11th Informatics Practices Notes: Exam Preparation Made Easy Unit-3
Unit 3: Database concepts and the Structured Query Language
*Introduction to Database Concepts*
- A database is a collection of organized data that can be easily accessed, managed, and updated.
- Need for databases:
- To store and manage large amounts of data
- To provide quick access to data
- To ensure data consistency and accuracy
- To provide data security
*Database Management System (DBMS)*
- A DBMS is a software system that allows you to define, create, maintain, and manipulate databases.
- Functions of DBMS:
- Data definition: defining the structure of the database
- Data manipulation: inserting, updating, and deleting data
- Data retrieval: querying and retrieving data
- Data security: controlling access to data
- Data backup and recovery: ensuring data safety
*Key Features of DBMS*
- Data independence: separating data from applications
- Data redundancy control: minimizing data duplication
- Data integrity: ensuring data accuracy and consistency
- Data security: controlling access to data
- Backup and recovery: ensuring data safety
*Types of DBMS*
- Hierarchical DBMS
- Network DBMS
- Relational DBMS (RDBMS)
- Object-oriented DBMS (OODBMS)
*Relational Database Management System (RDBMS)*
- Based on relational model
- Uses tables to store data
- Uses SQL (Structured Query Language) for data manipulation and retrieval.
Here are some notes on the Relational Data Model:
*Domain*:
- A set of allowed values for an attribute
- Defines the data type and range of values for an attribute
- Example: Age domain: 0-120
*Tuple*:
- A single row in a relation
- Represents a single record or entry
- Example: (John, 25, New York) is a tuple in a relation
*Relation*:
- A table with rows and columns
- Represents a collection of tuples
- Example: Employee relation: | Name | Age | City |
*Candidate Key*:
- A minimal set of attributes that uniquely identify each tuple
- Can be used as a primary key
- Example: Employee ID, Name, and Age can be candidate keys
*Primary Key*:
- Used to reference tuples in other relations
- Example: Employee ID is the primary key in the Employee relation
*Alternate Key*:
- A candidate key that is not selected as the primary key
- Can be used as a secondary identifier
- Example: Name and Age can be alternate keys in the Employee relation
Additional notes:
- A relation can have multiple candidate keys, but only one primary key.
- A primary key is used to enforce data integrity and prevent duplicate tuples.
- Alternate keys can be used for querying and indexing purposes.
Comments
Post a Comment