1/228
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
🔹 1. Data Modeling & ER Diagrams
Entity: A real-world object we store data about.
Attribute: A property or characteristic of an entity.
Relationship: Logical link between entities.
Keys:
Candidate Key: Any attribute set that could serve as a primary key.
Primary Key: Main key chosen to uniquely identify records.
Alternate Key: Candidate key not chosen as the primary.
Surrogate Key: Artificial key (e.g., auto-increment ID).
Composite Key: A key with more than one attribute.
Foreign Key (FK): Links records between tables.
Cardinality:
Min Cardinality: Minimum participation in a relationship.
Max Cardinality: Maximum participation.
Crow’s Foot Notation: Used to visually represent cardinality.
Special Entities:
Strong Entity: Exists independently with full primary key.
Weak Entity: Depends on strong entity; uses identifying relationship.
🔹 2. Functional Dependency & Normalization
Functional Dependency: A → B means A determines B.
Determinant: Left side of dependency.
Normalization Goals: Reduce redundancy, fix CUD anomalies.
Normal Forms:
1NF: Eliminate repeating groups.
2NF: No partial dependency (only if composite PK).
3NF: No transitive dependency (non-key depends on non-key).
CUD Anomalies:
Insertion: Can't add data due to missing related info.
Update: Inconsistency due to redundancy.
Deletion: Unintentional data loss.
🔹 3. Database Design
Conceptual Model: High-level (entities, relationships).
Logical Model: Schema-level (attributes, FKs).
Physical Model: Implementation-level (data types, constraints).
Data Types (MySQL Examples):
String: VARCHAR, CHAR
Numeric: INT, DECIMAL(8,2)
Date/Time: DATE, DATETIME
Field Constraints:
Default value