1. Introduction (Overview)
A Database Management System (DBMS) is software that helps us store, manage, and retrieve data efficiently.
In simple words, DBMS is a tool that organizes data properly so that it can be easily accessed and updated.
Examples: MySQL, Oracle, PostgreSQL, MongoDB.
2. Database System vs File System
File System
- Data stored in files
- No proper structure
- Data redundancy
- Low security
Database System
- Data stored in tables
- Well structured
- Less redundancy
- High security
Conclusion: Database system is better than file system.
3. Database System Concept and Architecture
A database system consists of database, DBMS software, users, and applications.
Three-Level Architecture
- External Level: User view
- Conceptual Level: Logical structure
- Internal Level: Physical storage
4. Data Model, Schema, and Instance
Data Model
A data model defines how data is structured in the database.
Example: Relational model, Hierarchical model.
Schema
Schema is the structure or design of the database.
Example: Student(RollNo, Name, Marks)
Instance
Instance is the actual data present in the database at a particular time.
Example: (101, Ayaz, 85)
5. Data Independence
Data independence means changes at one level of database do not affect other levels.
Logical Data Independence
Change in logical schema does not affect user view.
Physical Data Independence
Change in physical storage does not affect logical schema.
6. Database Languages and Interfaces
DBMS provides languages to interact with the database.
- DDL
- DML
- DCL
- TCL
7. Data Definition Language (DDL)
DDL is used to define the structure of the database.
- CREATE
- ALTER
- DROP
- TRUNCATE
8. Data Manipulation Language (DML)
DML is used to insert, update, delete, and retrieve data.
- INSERT
- UPDATE
- DELETE
- SELECT
9. Overall Database Structure
A database consists of tables, rows, columns, and relationships.
Tables are connected using keys.
10. Data Modeling Using Entity Relationship (ER) Model
ER Model is used to design the database visually using entities, attributes, and relationships.
11. ER Model Concepts
Entity
An entity is a real-world object.
Example: Student, Teacher.
Attribute
Attributes describe an entity.
Example: RollNo, Name.
Relationship
Relationship shows the connection between entities.
Example: Student enrolls in Course.
12. Notation for ER Diagram
- Rectangle – Entity
- Oval – Attribute
- Diamond – Relationship
- Double Oval – Multivalued Attribute
13. Mapping Constraints
Mapping constraints define how entities are related.
- One-to-One
- One-to-Many
- Many-to-Many
14. Keys
Super Key
A super key uniquely identifies a record.
Candidate Key
A candidate key is a minimal super key.
Primary Key
A primary key uniquely identifies each record in a table.
15. Generalization
Generalization is a top-down approach where similar entities are combined.
Example: Student and Teacher combined into Person.
16. Aggregation
Aggregation is used when a relationship has its own attributes.
17. Reduction of ER Diagram to Tables
ER diagram is converted into tables.
- Entity → Table
- Attribute → Column
- Relationship → Foreign Key
18. Extended ER (EER) Model
Extended ER Model includes advanced features like specialization and aggregation.
19. Relationship of Higher Degree
Relationship involving more than two entities is called higher degree relationship.
Example: Supplier supplies Product to Store.
Quick Revision Points
- DBMS manages data efficiently
- Schema is structure, Instance is data
- DDL defines structure, DML manipulates data
- ER model is used for database design
- Primary key uniquely identifies records

No comments:
Post a Comment