Exam Pattern & Cheat Sheet

CSE 303 · Database Management · Midterm · Full marks 50 · 1 hr 30 min · answer all · partial grading is ON. Four parts, worked end-to-end in this chapter.

The paper at a glance

PartCLOTopicWhat it asksSolved →
1CLO1DB ConceptsDefine DB & DBMS · relational/NoSQL/cloud examples · map DB users to rolesPart 1
2CLO2Languages & Rel. AlgebraDDL/DCL/DML/TCL table · Cartesian product · inner & outer joins · selectPart 2
3CLO3ER DiagramKeys · attribute types · strong/weak entity · relationships · full ER diagramPart 3
4CLO6SQLCREATE + INSERT · ALTER · CASE update · SELECT · GROUP BY/HAVING · EXCEPT · COUNTPart 4
Parts 3 & 4 share the same university schema — learn it once, it powers both. Part 1 and the CREATE-TABLE marks are the fastest, most certain points: bank them first.

Every mnemonic on one screen

PISMDB characteristics: Persistent · Integrated · Shared · Managed.
RI·IACSFile-processing drawbacks: Redundancy/inconsistency · Isolation · Integrity · Atomicity · Concurrency · Security.
σ π ∪ − × ρ6 relational-algebra basics: Select · Project · Union · Difference · Cartesian product · Rename. Joins are built from × + σ.
PLVAbstraction levels (bottom→top): Physical/internal → Logical/conceptual → View/external.
Super ⊇ Cand ⊇ PKKeys nest: a Super key that is minimal = Candidate key; one chosen candidate = Primary key. Foreign key = value must exist as a PK elsewhere.

One-page reference

Database languages → commands

AcronymNamePurposeCommands (≥3)
DDLData DefinitionDefine / change schemaCREATE · ALTER · DROP · TRUNCATE · RENAME
DMLData ManipulationWork with rowsSELECT · INSERT · UPDATE · DELETE
DCLData ControlAccess / permissionsGRANT · REVOKE
TCLTransaction ControlManage transactionsCOMMIT · ROLLBACK · SAVEPOINT

Relational-algebra operators

SymbolNameDoes
σSelectKeeps rows matching a condition
πProjectKeeps columns (drops duplicates)
∪ · − · ∩Set opsUnion · difference · intersection (union-compatible)
×Cartesian productEvery row of r paired with every row of s
Natural join× then match same-named attribute(s)
⟕ ⟖ ⟗Outer joinsLeft / right / full — keep unmatched rows as NULL
ρRenameRefer to a relation / column by another name

ER notation

ShapeMeans
Rectangle / double rectangleEntity / weak entity
Diamond / double diamondRelationship / identifying relationship
Oval · double oval · dashed ovalAttribute · multivalued · derived
Underline · dashed underlineKey · discriminator (weak-entity partial key)
Double line to entityTotal participation (single line = partial)

SQL clause order

SELECT → FROM → JOIN → WHERE → GROUP BY → HAVING → ORDER BY
WHERE filters rows before grouping · HAVING filters groups after aggregation.

Exam-day strategy

Partial grading is on — write something for every part. Bank Part 1 and the SQL CREATE-TABLE marks first (fast, certain), then invest time in the relational-algebra result tables and the ER diagram, where a small slip costs the most. Whenever a question says “write / draw the resultant table,” actually draw it — those are separate marks.