DBMS Notes for BCA
1. Introduction to DBMS
DBMS: Software that manages databases. Allows users to store, retrieve, and manipulate data.
Database: Organized collection of related data.
Examples: MySQL, Oracle, MS SQL Server, PostgreSQL.
2. Advantages of DBMS
Reduces data redundancy.
Ensures data consistency.
Supports data sharing.
Provides backup and recovery.
Enforces security and authorization.
3. DBMS vs File System
File System vs DBMS:
- Data Redundancy: High (File System), Low (DBMS)
- Security: Low (File System), High (DBMS)
- Backup/Recovery: Manual (File System), Automatic (DBMS)
- Integrity: Poor (File System), Strong (DBMS)
4. Types of DBMS
Hierarchical DBMS
Network DBMS
Relational DBMS (RDBMS)
Object-Oriented DBMS
5. Database Models
Hierarchical Model
Network Model
Relational Model
Entity-Relationship Model (E-R Model)
6. Keys in DBMS
Primary Key: Uniquely identifies a record.
Foreign Key: Refers to a primary key in another table.
Candidate Key: A set of attributes that can qualify as a primary key.
Super Key: A set of one or more attributes that uniquely identify a record.
7. Normalization
Process of organizing data to reduce redundancy.
Normal Forms:
1NF: No repeating groups.
2NF: No partial dependency.
3NF: No transitive dependency.
BCNF: Stronger version of 3NF.
8. SQL (Structured Query Language)
DDL: CREATE, ALTER, DROP
DML: SELECT, INSERT, UPDATE, DELETE
DCL: GRANT, REVOKE
TCL: COMMIT, ROLLBACK, SAVEPOINT
9. E-R Model
Used to design databases.
Includes entities, attributes, and relationships.
Represented using ER Diagrams.
10. Transactions and Concurrency Control
Transaction: A sequence of operations.
ACID Properties:
- Atomicity
- Consistency
- Isolation
- Durability
Concurrency Control: Prevents conflicts when multiple users access data at the same time.
11. Indexing
Improves the speed of data retrieval.
Types: Primary Index, Secondary Index, Clustered, Non-clustered.
12. Database Users
DBA (Database Administrator)
Application Programmers
End Users
System Analysts