Unit summary
A database is an organised collection of related data and a DBMS manages it, replacing file systems that suffer from redundancy and inconsistency. Data models (hierarchical, network, relational, object-oriented) describe structure. Keys identify rows (super, candidate, primary, alternate, foreign, composite, surrogate) and constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK) protect data. The ER model draws entities, attributes and relationships with cardinality; weak entities depend on owners. An ER diagram becomes tables: entities to tables, 1:N by a foreign key, M:N by a new table.
Glossary
| Term | Meaning |
|---|---|
| Database | Organised collection of related data |
| DBMS | Software that manages a database |
| Redundancy | Unwanted repetition of data |
| Candidate key | A minimal set of columns that identifies a row |
| Primary key | The chosen candidate key; unique and not NULL |
| Foreign key | A column that refers to a primary key of another table |
| Entity | An identifiable real-world object |
| Cardinality | How many entities take part in a relationship |
| Weak entity | An entity without its own key, depending on an owner |
| Schema | The structure of a table or database |
Question bank
Short answer questions
- Define DBMS and list its advantages.
- Name four attribute types in the ER model.
- Differentiate candidate key and primary key.
- What is referential integrity?
- What is a weak entity set?
Long answer questions
- Differentiate file system and DBMS with a table.
- Explain the types of data models.
- Explain all keys with an example.
- Draw an ER diagram for a library and convert it to tables.
- Explain extended ER features.
Sources
- Official BCA syllabus Database Management Systems, course code CC202, Unit I
