# Database Design Principles

## Normalization

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

### First Normal Form (1NF)
- Eliminate duplicative columns from the same table
- Create separate tables for each group of related data
- Identify each row with a unique column or set of columns (primary key)

### Second Normal Form (2NF)
- Meet all requirements of 1NF
- Remove subsets of data that apply to multiple rows and place them in separate tables
- Create relationships between these new tables and their predecessors through foreign keys

### Third Normal Form (3NF)
- Meet all requirements of 2NF
- Remove columns that are not dependent on the primary key

## ER Diagrams

Entity-Relationship (ER) diagrams are graphical representations of database designs. They include:

- **Entities**: Objects or concepts that contain data
- **Attributes**: Properties of entities
- **Relationships**: Connections between entities

## Indexing

Indexes improve database performance by allowing the database server to find and retrieve specific rows much faster.

### Types of Indexes:
- **Primary Key**: Unique identifier for each row
- **Unique Index**: Prevents duplicate entries in a column
- **Composite Index**: Index on multiple columns
- **Full-Text Index**: For searching text contents efficiently