Unit 1: Introduction to DBMS
1️⃣ Define Database, DBMS and Explain Features of DBMS
Database: Collection of logically related data stored systematically to serve multiple applications.
DBMS: Software that manages databases, allowing users to store, modify, retrieve, and manage data efficiently.
Features of DBMS:
-
Data Independence: Application programs do not depend on physical data storage.
-
Efficient Data Access: Uses indexes, queries to retrieve data quickly.
-
Data Security: Only authorized users can access.
-
Data Integrity: Maintains accuracy and consistency using constraints.
-
Data Concurrency: Multiple users can access data simultaneously without conflicts.
-
Backup & Recovery: Provides automatic backup and recovery in case of failure.
2️⃣ Difference Between DBMS and File System
| File System | DBMS |
|---|---|
| Data stored in files | Data stored in structured database |
| Redundancy & Inconsistency | Minimizes redundancy & maintains consistency |
| Limited data security | High-level security features |
| Difficult to update & manage | Easy update, retrieval, management |
| No support for concurrent access | Supports multiple concurrent users |
| Example: MS Excel | Example: MySQL, Oracle, PostgreSQL |
3️⃣ Explain DBMS Architecture
Three levels of DBMS Architecture:
-
Internal Level: Physical storage of data, low-level description.
-
Conceptual Level: Logical structure of entire database, hides physical details.
-
External Level: User views or application views of data.
Diagram:
Explanation:
-
External level → user interface
-
Conceptual → database structure for DBMS
-
Internal → physical storage details
4️⃣ Advantages of DBMS
-
Reduced data redundancy
-
Data consistency & integrity
-
Efficient data access via queries
-
Data security & authorization
-
Multi-user concurrent access
-
Backup and recovery facilities
Unit 2: ER Model & Relational Model
1️⃣ Explain Entity, Attribute, Relationship & ER Diagram
Entity: Object or thing in real world (e.g., Student, Employee)
Attribute: Property of an entity (e.g., Name, Age, Roll No)
Relationship: Association among entities (e.g., Student enrolls in Course)
ER Diagram Example:
Types of Attributes:
-
Simple / Composite
-
Single-valued / Multi-valued
-
Derived
Types of Relationships:
-
One-to-One (1:1)
-
One-to-Many (1:N)
-
Many-to-Many (M:N)
2️⃣ Explain Keys in DBMS
Primary Key: Unique identifier for entity (e.g., RollNo)
Candidate Key: Possible key that can act as primary key
Foreign Key: Attribute referencing primary key of another table
Super Key: Any set of attributes that uniquely identifies entity
3️⃣ Relational Model Concepts
Relation: Table with rows (tuples) and columns (attributes)
Tuple: Row of a table (one record)
Attribute: Column of a table (property)
Domain: Set of possible values for an attribute
Example: Student Table
| RollNo | Name | Age |
|---|---|---|
| 101 | Adarsh | 21 |
| 102 | Riya | 20 |
4️⃣ Convert ER Diagram to Relational Schema
ER Diagram Example:
-
Entities: Student(SID, Name), Course(CID, CName)
-
Relationship: Enroll(SID, CID)
-
Student(SID, Name)
-
Course(CID, CName)
-
Enroll(SID, CID)
5️⃣ Advantages of ER Model
-
Easy to understand for users
-
Helps in database design
-
Visual representation of entities, relationships
-
Identifies primary keys and constraints
No comments:
Post a Comment