GATE CS - DATABASES (DBMS):ER and Relational Model
Mastering er and relational model concepts and implementation.
ER and Relational Model for GATE CS
GATE tests keys, ER-to-relational mapping, and integrity constraints more than drawing pretty ER diagrams. Know candidate / primary / foreign keys cold.
ER vocabulary (exam level)
- Entity set, relationship set (1:1, 1:N, M:N), attributes (simple / composite / multi-valued / derived)
- Weak entity: identifying relationship + partial key
- Total vs partial participation
Relational model
Relation = table. Tuple = row. Attribute = column. Schema vs instance.
Keys
| Key | Meaning |
|---|---|
| Superkey | Identifies tuples uniquely (may have extras) |
| Candidate key | Minimal superkey |
| Primary key | Chosen candidate key |
| Foreign key | References a candidate/primary key in another (or same) relation |
Trap: calling any unique column “the key” when a composite candidate key is required.
Mapping ER → tables (rules of thumb)
- Strong entity → relation with its attributes
- 1:N relationship → FK on the N side
- M:N → new relation with FKs to both + relationship attributes
- Weak entity → relation including owner’s PK + partial key
- Multi-valued attribute → separate relation with FK to owner
Integrity
- Entity integrity: primary key ≠ NULL
- Referential integrity: FK NULL or matches referenced key
- Domain constraints on attribute types
Next: Normalization. Hub: GATE.
Progress