Summarizing Database Concepts

Summarizing Database Concepts — Interactive Notes
STANDALONE SUMMARY NOTES

Summarizing Database Concepts

A consolidated review of relational and non-relational databases: how they organize data, create relationships, maintain integrity, scale, and how to choose an appropriate model.

RelationalNon-Relational / NoSQLSide-by-side comparison20-question quiz
RDBMS
DATABASE
NoSQL
01

The Big Picture

A database stores organized data so applications can create, retrieve, update, and manage information. The two pages summarized here use two broad families: relational databases and non-relational databases.

Relational Databases

Organize structured data into tables made of rows and columns. Primary and foreign keys connect related tables.

Tables Keys SQL ACID
AND

Non-Relational Databases

Use flexible models such as key-value, document, column-family, and graph structures.

JSON Documents Graph Scale-out
Main idea

Relational and non-relational are not simply “old versus new.” They organize data differently and are useful for different data shapes, relationships, access patterns, integrity requirements, and scaling needs.

02

Relational Database Summary

The relational model separates subjects into tables and reconnects them through keys. The student example uses Students, Enrollment, and Courses.

Table

A collection of related records arranged as rows and columns.

Primary Key

Uniquely identifies a record, such as Students.StudentID.

Foreign Key

References a key in another table to create a relationship.

Referential Integrity

Protects relationships by ensuring references remain valid.

Relational Student Example

StudentsStudentID 1002 (PK)Hafiz IskandarEnrollmentE501 · 1002 · C101E502 · 1002 · C205StudentID / CourseID = FKCoursesC101 Database FundamentalsC205 Data Management
Entity
Table
Primary Key
Foreign Key
Relationship
03

Relational Design & Reliability

Beyond tables and keys, relational databases use normalization, indexes, SQL, and transaction properties to organize and work with data reliably.

Cardinality

Describes relationship patterns: one-to-one, one-to-many, and many-to-many.

Normalization

Reorganizes data to reduce unnecessary duplication and improve integrity. The notes illustrate 1NF, 2NF, and 3NF.

Indexes

Help the database locate matching records efficiently.

SQL

Retrieves and manipulates relational data; JOIN combines related rows using matching keys.

ACID Transaction Principles

Atomicity

All-or-nothing.

Consistency

Preserves defined rules.

Isolation

Concurrent work does not expose incomplete transactions.

Durability

Committed changes persist.

04

Non-Relational Database Summary

Non-relational databases use models beyond the fixed relational table structure. The summarized page focuses on four major NoSQL families.

Key-Value

A unique key retrieves an associated value. The example uses student:1002 → JSON.

Document

Stores a self-contained JSON-like document containing fields, nested objects, and arrays.

Column-Family

Organizes data around keys and related groups of columns; the teaching example groups student attributes.

Graph

Represents entities as nodes and connections as edges, such as Student — ENROLLED_IN → Course.

One Student, Four NoSQL Views

KEY-VALUE
"student:1002" → {"name":"Hafiz Iskandar","program":"Data Analytics"}

DOCUMENT
{"_id":"student-1002","name":"Hafiz Iskandar","courses":["C101","C205"]}

COLUMN-FAMILY (simplified teaching view)
studentid:[1001,1002,...]   studentname:["Alya Rahman","Hafiz Iskandar",...]

GRAPH
(Hafiz:Student) ── ENROLLED_IN ──> (C101:Course)
                └─ ENROLLED_IN ──> (C205:Course)
05

Relational vs Non-Relational

The comparison below brings the two concept pages together. These are broad tendencies rather than rules that every product implements identically.

ConceptRelationalNon-Relational
Core structureTables, rows, columnsKey-value, document, column-family, or graph
RelationshipsPrimary/foreign keys and joinsEmbedding, application references, grouped data, or graph edges depending on model
SchemaStructured table definitionOften more flexible; depends on NoSQL model/product
DuplicationNormalization commonly reduces redundancyDenormalization may intentionally duplicate data for access patterns
Query styleSQL and joins are central in the notesAccess style depends on the selected model
Integrity focusKeys, constraints, referential integrity, ACIDConsistency and integrity mechanisms vary by system/design
Scaling conceptCan scale in multiple waysThe NoSQL notes emphasize horizontal scaling, partitioning and replication
Best conceptual fitStructured relationships and integrity-sensitive dataFlexible structures, specialized access patterns, connected data, or distributed scale
06

Scaling, Replication & Consistency

Distributed database design introduces concepts that are especially prominent in the non-relational notes, although distributed relational systems can also use them.

Horizontal Scaling

Add more nodes or machines so workload can be distributed.

Partitioning / Sharding

Divide a dataset so different portions can live on different nodes.

Replication

Maintain copies of data on multiple nodes for availability, resilience, or read distribution.

Eventual Consistency

Replicas may temporarily differ while updates propagate, then converge later.

Important distinction

“Relational” describes a data model, while “distributed,” “replicated,” and “partitioned” describe architecture. They are not mutually exclusive categories.

07

Choosing a Database Model

Choose from requirements rather than from the database label alone. Use this interactive study aid to connect a workload characteristic with a likely starting point.

Interactive Model Selector

Selection questions

Consider the shape of the data, how records relate, the most important read/write patterns, required transaction and consistency behavior, expected scale, and operational constraints.

08

Unified Concept Map

This final map shows how the major concepts fit together before the knowledge check.

DATABASE CONCEPTSRELATIONALNON-RELATIONALTables · PK/FK · RelationshipsNormalization · SQL · IndexesReferential Integrity · ACIDKey-Value · DocumentColumn-Family · GraphPartitioning · Replication · ConsistencyChoose according to workload requirements
09

Combined Knowledge Check — 20 Questions

Review both relational and non-relational concepts in one quiz.

1. Which database family primarily organizes data into related tables?

Answer: A. Relational

2. What uniquely identifies a row in a relational table?

Answer: B. Primary key

3. What connects a child relational record to a related parent record?

Answer: B. Foreign key

4. Which relationship uses a junction table such as Enrollment?

Answer: B. Many-to-many

5. What helps prevent orphaned foreign-key records?

Answer: A. Referential integrity

6. What is a major goal of normalization?

Answer: B. Reduce redundancy and improve integrity

7. Which language is commonly used to query relational databases?

Answer: B. SQL

8. Which ACID property means all-or-nothing?

Answer: C. Atomicity

9. Which NoSQL model maps a key directly to a value?

Answer: B. Key-value

10. Which format is used in the page's key-value example?

Answer: A. JSON

11. Which NoSQL model stores self-contained structured records?

Answer: A. Document

12. Which NoSQL model groups related columns and is associated with wide/sparse data?

Answer: A. Column-family

13. Which model emphasizes nodes and edges?

Answer: B. Graph

14. Which model is especially natural for deeply connected relationship traversal?

Answer: A. Graph

15. What does horizontal scaling mean?

Answer: A. Add more nodes/machines

16. What does partitioning or sharding do?

Answer: A. Divides data across nodes

17. What does replication do?

Answer: A. Keeps copies of data on multiple nodes

18. What does eventual consistency allow?

Answer: A. Temporary replica differences that later converge

19. When is a relational model often a strong fit?

Answer: A. Structured data with important relationships and integrity rules

20. What should drive database-model selection?

Answer: A. Data shape, access patterns, relationships, scale and consistency needs
SUMMARIZING DATABASE CONCEPTS · RELATIONAL + NON-RELATIONAL · MARBLE LIGHT BLUE EDITION