- LPU MCA Semester 1
- CAP570
- Unit 1
CAP570 · Unit 1: Basics of database
Overview, importance, applications and types of databases
10 practice questions · in the MTE and ETE syllabus
Key points
- A DBMS controls storage, sharing, security and recovery of data
- File systems suffer redundancy and inconsistency
- Hierarchical allows one parent, network allows many
- Match the database type to the workload
A database is an organised collection of related data, and a database management system (DBMS) is the software that defines, stores, retrieves, secures and shares it. Compared with a file-processing system, a DBMS reduces redundancy and the inconsistency it causes, lets many users work at once under concurrency control, enforces integrity rules, provides backup and recovery, and gives programs data independence.
| Type | Idea | Typical use |
|---|---|---|
| Hierarchical | tree, one parent per record | org charts, file systems |
| Network | records linked by pointers, many parents | complex linked records |
| Relational | tables joined by key values | banking, ERP |
| Object-oriented | objects with data and methods | CAD, multimedia |
| NoSQL | document, key-value, column, graph | web scale, flexible data |
Applications include banking, railway and airline reservation, universities, retail, healthcare and social media.
Exam trap: a spreadsheet is not a DBMS; it lacks central control, concurrency management and integrity enforcement.
Try two questions
A hostel office and a library office each keep the student's address. After a change only the hostel record is updated. Which problem has appeared?
- Loss of physical data independence
- A violation of atomicity inside one transaction
- Data inconsistency caused by redundant copies
- Deadlock between two offices
Show the answer
C. Duplicate storage let the two copies drift apart, which is the classic file-system inconsistency.
Why not A: No storage format changed here; the two copies simply disagree.
Why not B: Atomicity concerns one transaction completing fully; here two separate files disagree.
Why not D: Deadlock needs processes waiting on each other for locks, which did not happen.
Which statement correctly contrasts a hierarchical database with a relational database?
- Hierarchical data is stored in tables while relational data forms a tree of records
- Both models store each record under several parents to model many-to-many links
- A hierarchical model joins rows using SQL queries, while the relational model follows stored parent pointers
- Hierarchical data forms a tree with one parent per child, relational data uses key-linked tables
Show the answer
D. A hierarchical database arranges records in a tree, each child having exactly one parent; the relational model uses tables related by keys.
Why not A: This swaps the two models.
Why not B: A strict hierarchy allows only one parent per record.
Why not C: The relational model uses key-based joins; hierarchical uses parent-child links.