DBMS Topics
HubUnit 1 — Introduction to DBMS & Entity-Relationship ModelAdvantages and Disadvantages of DBMSAggregationCharacteristics of DBMSData IndependenceData ModelsDatabase Users and AdministratorsDBMS LanguagesER DiagramsEntity-Relationship ER ModelIntroduction to DBMSKeys in DBMSRelationships and CardinalitySchema and InstanceSpecialization and GeneralizationUnit 1 Summary — Introduction to DBMS & ER ModelThree-Level Architecture ANSI/SPARC ArchitectureWeak Entity SetUnit 2 — Relational Model & SQLConstraints in SQLCursorsDCL and TCL CommandsDDL CommandsDML CommandsDomain Relational Calculus DRCFunctions and Stored ProceduresJoins in SQLNested Queries SubqueriesRelational AlgebraRelational CalculusRelational ModelSQL IntroductionUnit 2 Summary — Relational Model & SQLTriggers in SQLTuple Relational Calculus TRCViews in SQLArmstrong's Axioms & Closure of AttributesBoyce-Codd Normal Form BCNFClosure of AttributesDependency PreservationFifth Normal Form 5NFFirst Normal Form 1NFFourth Normal Form 4NFFunctional DependencyLossless DecompositionMultivalued DependencyNormal Forms — OverviewNormalization — IntroductionSecond Normal Form 2NFUnit 3 Summary — NormalizationThird Normal Form 3NFUnit 4 — Transaction Management & Concurrency ControlACID PropertiesCheckpointsConcurrency Control & SerializabilityDeadlock in DBMSLock-Based Protocols & Two-Phase LockingLog-Based RecoveryRecovery SystemSerializabilityShadow PagingUnit 4 Summary — Transaction Management & Concurrency ControlTimestamp-Based ProtocolTransaction ManagementTransaction StatesTwo-Phase Locking 2PLUnit 5 — Storage & IndexingB+ TreeB-TreeCost EstimationDynamic HashingFile OrganizationHashing TechniquesIndexing — IntroductionMulti-Level IndexingQuery OptimizationQuery ProcessingSingle-Level IndexingStatic HashingUnit 5 Summary — Storage & IndexingUnit 6 — Advanced Topics in DBMSBig Data and DBMSCloud DatabaseData MiningData WarehouseDatabase SecurityDistributed DatabaseDistributed Query ProcessingDistributed DBMS Architecture, Fragmentation & ReplicationMongoDB — IntroductionNoSQL DatabaseReplication in Distributed DatabasesUnit 6 Summary — Advanced Topics in DBMSViva Voce — DBMSImportant Viva Questions — DBMSInterview Questions — DBMSViva Answers — DBMSDBMS Multiple Choice Questions MCQsDBMS Lab Programs
Unit 2 Summary — Relational Model & SQL
Last Updated : 21 May, 2026
Unit 2135 words10 headingsTables includedExamples included
Quick Reference
Relational Model Key Points
Relation = Table
Tuple = Row
Attribute = Column
Domain = Valid values for an attribute
Degree = Number of columns
Cardinality = Number of rows
Relational Algebra Operations
| Operation | Symbol | SQL Equivalent |
|---|---|---|
| Selection | σ | WHERE |
| Projection | π | SELECT columns |
| Union | ∪ | UNION |
| Intersection | ∩ | INTERSECT |
| Difference | − | EXCEPT |
| Cartesian Product | × | FROM A, B (no join) |
| Natural Join | ⋈ | JOIN (on common columns) |
| Rename | ρ | AS (alias) |
SQL Command Categories
| INSERT | Add new rows |
| SELECT | Read / retrieve rows |
| UPDATE | Modify existing rows |
| DELETE | Remove rows |
Constraints Summary
| Constraint | Purpose | NULL? |
|---|---|---|
| NOT NULL | Mandatory value | No |
| UNIQUE | No duplicates | Yes (one) |
| PRIMARY KEY | Row identity | No |
| FOREIGN KEY | Referential integrity | Yes |
| CHECK | Custom rule | Yes |
| DEFAULT | Auto-fill value | — |
JOIN Types
| INNER JOIN | Matched rows only |
| LEFT JOIN | All left + matched right |
| RIGHT JOIN | All right + matched left |
| FULL OUTER | All from both |
| CROSS JOIN | All combinations |
| SELF JOIN | Table joined with itself |
Subquery Types
| Type | Returns | Operator |
|---|---|---|
| Scalar | 1 value | =, <, > |
| Column | List of values | IN, NOT IN |
| Correlated | Re-evaluated per row | EXISTS, NOT EXISTS |
| Derived | Table | Used in FROM |
Procedure vs. Function
Procedure
- CALL procedure_name()
- Can return 0 or more values via OUT params
- Can use COMMIT / ROLLBACK
Function
- SELECT function_name() or use in expressions
- Must return one value
- Used for calculations
Cursor Lifecycle
DECLARE→
OPEN→
FETCH in loop→
CLOSE
Important SQL Clauses Execution Order
1FROM / JOIN
2WHERE
3GROUP BY
4HAVING
5SELECT
6DISTINCT
7ORDER BY
8LIMIT
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Unit 2 Summary — Relational Model & SQL.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this DBMS topic.
Search Terms
dbms, database management system, database notes, sql, unit, summary, unit 2 summary — relational model & sql
Related DBMS Topics
Continue learning this concept
Unit 2Unit 2 — Relational Model & SQLThis unit covers the formal foundations of relational databases and the Structured Query Language SQL. Starting from the mathematical basis of relational algebra and calcUnit 2Relational ModelThe relational model was proposed by Dr. E.F. Codd of IBM in 1970 in his landmark paper "A Relational Model of Data for Large Shared Data Banks." It is based on the matheUnit 2Domain Relational Calculus DRCDomain Relational Calculus DRC is a non-procedural query language where variables range over individual attribute values domains rather than entire tuples.Unit 2Relational AlgebraRelational algebra is a formal, procedural query language for the relational model. It provides the theoretical foundation for SQL. Operations take one or two relations aUnit 2Relational CalculusRelational calculus is a non-procedural declarative query language for the relational model. Unlike relational algebra which specifies HOW to retrieve data, relational caUnit 2Tuple Relational Calculus TRCTuple Relational Calculus TRC is a non-procedural query language where each query is expressed as: