Database
Database
## 1. Fundamental Concepts
- Data independence
- Logical independence
- Physical independence
1. **Three-Schema Architecture**
2. **Client-Server Architecture**
- Two-tier
- Three-tier
- Multi-tier
## 2. Data Models
- Tree structure
- Parent-child relationships
- Many-to-many relationships
- CODASYL specification
1. **Components**
- Relations (Tables)
- Attributes (Columns)
- Tuples (Rows)
2. **Properties**
- Atomic values
- Unique rows
3. **Integrity Constraints**
- Entity integrity
- Referential integrity
- Domain integrity
- User-defined integrity
- Inheritance
- Encapsulation
- Polymorphism
1. **Document Stores**
- MongoDB
- CouchDB
2. **Key-Value Stores**
- Redis
- DynamoDB
3. **Column-Family Stores**
- Cassandra
- HBase
4. **Graph Databases**
- Neo4j
- ArangoDB
## 3. Database Design
1. **Components**
- Entities
- Attributes
- Relationships
- Cardinality
2. **Extended Concepts**
- Weak entities
- Aggregation
- Generalization
- Specialization
2. **Denormalization**
- Performance considerations
- Trade-offs
- Implementation strategies
1. **Storage Structures**
- Files
- Pages
- Records
- Indexes
2. **Access Methods**
- Sequential
- Indexed
- Hashed
- CREATE
- ALTER
- DROP
- TRUNCATE
- RENAME
- SELECT
- INSERT
- UPDATE
- DELETE
- MERGE
- GRANT
- REVOKE
- DENY
- COMMIT
- ROLLBACK
- SAVEPOINT
1. **Views**
- Simple views
- Complex views
- Materialized views
2. **Stored Procedures**
- Parameters
- Error handling
- Return values
3. **Triggers**
- Before/After triggers
- Instead-of triggers
- Event handling
## 5. Transaction Management
- Atomicity
- Consistency
- Isolation
- Durability
1. **Locking Mechanisms**
- Shared locks
- Exclusive locks
- Two-phase locking
- Deadlock handling
2. **Isolation Levels**
- Read uncommitted
- Read committed
- Repeatable read
- Serializable
- Checkpoint mechanisms
- Log-based recovery
- Shadow paging
- Backup strategies
## 6. Database Security
- User identification
- Password management
- Multi-factor authentication
- SSO integration
1. **Access Control**
- Discretionary (DAC)
- Mandatory (MAC)
- Role-based (RBAC)
2. **Privileges**
- System privileges
- Object privileges
- Role management
- Encryption
- Auditing
- Data masking
- Privacy compliance
## 7. Database Performance
1. **Query Processing**
- Parsing
- Optimization
- Execution
2. **Index Optimization**
- B-tree indexes
- Bitmap indexes
- Hash indexes
- Covering indexes
1. **System Parameters**
- Memory allocation
- I/O configuration
- Process management
2. **Query Tuning**
- Execution plans
- Statistics management
- Hints usage
## 8. Advanced Topics
1. **Architecture**
- Homogeneous
- Heterogeneous
- Fragmentation
- Replication
2. **Distribution Techniques**
- Horizontal partitioning
- Vertical partitioning
- Hybrid approaches
1. **Components**
- Fact tables
- Dimension tables
- Star schema
- Snowflake schema
2. **ETL Process**
- Extraction
- Transformation
- Loading
- Data quality
1. **Technologies**
- Hadoop
- Spark
- NoSQL databases
- NewSQL systems
2. **Characteristics**
- Volume
- Velocity
- Variety
- Veracity
- Value
- IaaS
- PaaS
- DBaaS
2. **In-Memory Databases**
- Architecture
- Use cases
- Performance benefits