VISUAL REFERENCE

Schema Design Visual Map

Master the visual language of database modeling. Understand relationships, constraints, and optimization strategies.

Design

Normalization (1NF-3NF)

1NF (Atomic)2NF (Keys)3NF (Split)

1NF: Atomic values. 2NF: No partial dependencies. 3NF: No transitive dependencies.

Querying

SQL Joins

ABINNER JOIN

Inner (Match), Left (All Left + Match), Right (All Right + Match), Full (Everything).

Performance

Index Types

Clustered (Data)Non-Clustered

Clustered (Physical Sort) vs Non-Clustered (Logical Pointer). B-Tree is default.

Constraints

Primary Key (PK)

Users Tableid (PK)INTusernameVARCHAR

Unique identifier for a row. Cannot be NULL. Ensures entity integrity.

Constraints

Foreign Key (FK)

Departmentid (PK)Employeedept_id (FK)

A field that links to the Primary Key of another table. Enforces referential integrity.

Constraints

Composite Key

OrderItemsorder_id (PK,FK)item_id (PK,FK)COMPOSITE

A Primary Key made of multiple columns. Used in junction tables (M:N relationships).

Optimization

Denormalization

Read Optimized(Redundant Data)

Adding redundancy (e.g., storing 'count' on parent) to avoid expensive joins on reads.

Relationships

1:N Relationship

UserOrders1:N

A row in Table A links to multiple rows in Table B (e.g., User -> Orders).