0% found this document useful (0 votes)
4 views4 pages

DBMS Assignment Answers

The document outlines the advantages and disadvantages of hierarchical and network database models, detailing their structures and data access methods. It describes various data models in DBMS, including relational and object-oriented models, and explains normalization processes and integrity rules in relational databases. Additionally, it covers SQL commands, database architecture, crash types and recovery methods, transaction states, and user and physical protection measures in DBMS.

Uploaded by

anonymousbeaster
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

DBMS Assignment Answers

The document outlines the advantages and disadvantages of hierarchical and network database models, detailing their structures and data access methods. It describes various data models in DBMS, including relational and object-oriented models, and explains normalization processes and integrity rules in relational databases. Additionally, it covers SQL commands, database architecture, crash types and recovery methods, transaction states, and user and physical protection measures in DBMS.

Uploaded by

anonymousbeaster
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

DBMS Assignment Answers

1. Advantages and Disadvantages of Hierarchical and Network Models


Hierarchical Model
Advantages:
- Simple structure and easy to understand.
- Efficient for one-to-many relationships.
- Fast data access due to tree-like structure.
Disadvantages:
- Rigid structure; hard to reorganize.
- Redundancy due to repeated data.
- Complex to manage many-to-many relationships.

Network Model
Advantages:
- Can represent complex relationships (many-to-many).
- More flexible than hierarchical model.
- Data access is faster due to multiple paths.
Disadvantages:
- More complex to design and maintain.
- Requires navigational access to retrieve data.

2. Types of Data Models in DBMS


1. Hierarchical Model: Tree-like structure; each child has only one parent.
2. Network Model: Graph structure; supports many-to-many relationships.
3. Relational Model: Uses tables (relations); based on mathematical set theory.
4. Object-Oriented Model: Integrates object-oriented programming features.
5. Entity-Relationship Model (ER Model): High-level conceptual model.
6. Document Model: Stores data as documents (used in NoSQL systems).
7. Key-Value Model: Data is stored as key-value pairs.

3. Normalization and BCNF


Normalization is the process of organizing data to minimize redundancy and improve
integrity.

Normal Forms:
- 1NF: Atomic values.
- 2NF: No partial dependency.
- 3NF: No transitive dependency.
BCNF (Boyce-Codd Normal Form): A stricter version of 3NF.

Example:
Relation: Course(Student_ID, Student_Name, Course_Name, Instructor)
Problem: Redundancy if a student enrolls in multiple courses.
To achieve BCNF:
Split into:
1. Student_Course(Student_ID, Course_Name)
2. Course_Instructor(Course_Name, Instructor)

4. Integrity Rules in Relational Databases


1. Entity Integrity: Each table must have a primary key. The primary key cannot be null.
2. Referential Integrity: Foreign key in one table must match the primary key in another
table or be null.

5. Comparison of Relational, Hierarchical, and Network Models


Relational Model: Uses tables; supports any type of relationship; flexible; easy to use.
Hierarchical Model: Tree-like; supports one-to-many; rigid and less flexible.
Network Model: Graph-based; supports many-to-many; more complex than relational.

6. SQL Commands with Syntax and Examples


DDL (CREATE TABLE):
CREATE TABLE Student (ID INT, Name VARCHAR(50));
ALTER TABLE:
ALTER TABLE Student ADD Age INT;

DML (INSERT):
INSERT INTO Student VALUES (1, 'John');
UPDATE:
UPDATE Student SET Name = 'Jane' WHERE ID = 1;

DCL (GRANT):
GRANT SELECT ON Student TO user1;

TCL:
COMMIT: Saves changes.
ROLLBACK: Undoes changes.
7. Architecture of a Database System
Three Schema Architecture:
1. External Level (View Level): Defines user-specific views.
2. Conceptual Level (Logical Schema): Describes structure and relationships.
3. Internal Level (Physical Schema): Defines physical storage.

8. Types of Crashes and Crash Recovery in DBMS


Types of Crashes:
1. Transaction Failure
2. System Crash
3. Disk Failure

Recovery Methods:
1. Log-Based Recovery
2. Shadow Paging
3. Checkpointing

9. Transaction States and Serializability


Transaction States:
1. Active
2. Partially Committed
3. Committed
4. Failed
5. Aborted

Serializability:
Ensures same result as serial execution.
Types:
- Conflict Serializability
- View Serializability

10. User and Physical Protection in DBMS


User Protection:
- Authentication
- Authorization
- Encryption

Physical Protection:
- Backups
- RAID
- Firewalls

You might also like