نظري 1
نظري 1
1. Introduction to Databases
• DBMS (Database Management System): A software system that manages databases, ensuring
efficient data access and management.
• Modern Databases: Multimedia, Geographic Information Systems (GIS), genome databases, data
warehouses, mobile databases, and real-time databases.
• Big Data & NoSQL: Emerging technologies for handling large-scale data.
4. Database Characteristics
• Self-Describing Nature: Stores metadata for flexibility.
5. Database Users
• Actors on the Scene:
6. DBMS Functionalities
• Data Definition: Define structures and constraints.
• Real-Time Constraints: DBMS overhead may not meet fast response needs.
1. Data Models
• Definition: A set of concepts used to define the structure, operations, and constraints of a
database.
• Categories:
o Self-Describing Models: Store both data and schema together (e.g., XML, NoSQL).
• Difference:
3. Three-Schema Architecture
• Purpose: Ensures program-data independence and multiple data views.
• Levels:
4. Data Independence
• Logical Data Independence: Change the conceptual schema without affecting external views.
• Physical Data Independence: Change internal storage without modifying the conceptual
schema.
5. DBMS Languages
• DDL (Data Definition Language): Defines schemas and constraints.
• Embedded DML: Used within general programming languages (e.g., SQL in Java, C).
6. DBMS Interfaces
8. Database Architectures
• Centralized DBMS: All data and processing in one system.
• Client-Server DBMS:
9. Classification of DBMSs
• Based on Data Model:
o Traditional: Network, Hierarchical.
• Based on Usage:
Database State:
Distinction:
• Conceptual design is done using ER diagrams, while logical design maps the ER model to a
relational schema.
2. ER Model Concepts
• Entity: An object in the database (e.g., Employee, Department).
• Entity Set: The collection of all entities of a type stored in the database.
3. Types of Attributes
• Simple: Cannot be divided (e.g., Age, SSN).
• Composite: Can be broken into sub-parts (e.g., Address → Street, City, Zip).
• Cardinality Constraints:
5. Weak Entities
• Definition: An entity that does not have a unique key and depends on another entity.
6. ER Diagram Notation
• Entities → Represented by rectangles.
• Weak Entities → Double rectangles, with double diamonds for identifying relationships.
7. Recursive Relationships
• When an entity relates to itself in different roles.
8. Higher-Degree Relationships
• Binary Relationship: Connects two entities (most common).
• Ternary Relationship: Involves three entities (e.g., SUPPLIER provides PART to PROJECT).
"A relationship type identifies the relationship name and the participating entity types."
"A relationship set is the current state of a relationship type in the database."
2. IS-A Relationship
3. Attribute Inheritance
3. Specialization
• Definition: Dividing a superclass into more specific subclasses.
4. Generalization
• Reverse of specialization → Combines multiple entity types into a common superclass.
• Completeness Constraint:
o Total (double line): Every entity in the superclass must belong to a subclass.
o Partial (single line): Some entities may not belong to any subclass.
• EER Diagrams:
o Use rectangles for entities, ovals for attributes, and diamonds for relationships.