Please enable JavaScript.
Coggle requires JavaScript to display documents.
Week 6 Summary – ER Modeling - Coggle Diagram
Week 6 Summary – ER Modeling
Purpose of ER Modeling
Used to design a database at a conceptual level.
Represents data as entities, attributes, and relationships.
Key Components
Entities: Objects or things (e.g., Student, Course)..
pelajar/kursus
Attributes: Properties of entities (e.g., Name, ID)
Simple vs Composite: Simple (e.g., Age), Composite (e.g., Name = First + Last).
Single-valued vs Multi-valued: Single (e.g., Email), Multi (e.g., Phone Numbers).
Derived Attributes: Calculated from other attributes (e.g., Age from DOB).
Entity Types:
Strong Entity: Has its own key.
Weak Entity: Depends on a strong entity; no key of its own.
Relationships
Types:
One-to-One (1:1): Each entity instance matches one in another set.
Seorang pelajar ada satu ID Kad.
One-to-Many (1:N): One entity instance matches many in another.
Seorang pensyarah ajar banyak kursus.
Many-to-Many (M:N): Many entities in one set match many in another.
Banyak pelajar ambil banyak kursus
Participation:
Total (double line): All instances involved.
Partial (single line): Not all instances are involved.
Attributes of Relationships: Can have attributes (e.g., Grade in Student–Course relationship).
Keys and Constraints
Primary Key: Unique identifier for an entity.
nombor matrik
Candidate Keys: Multiple options for primary key.
Cardinality: Number of instances in a relationship.
Enhanced ER (EER) Concepts
Generalization: Bottom-up approach (combine subclasses).
Gabung beberapa entiti kepada satu yang umum.
Specialization: Top-down (split superclass into subclasses).
Bahagi entiti besar kepada kecil.
Contoh: Staf boleh jadi Pensyarah atau Kerani.
Categories: Union of entity types.
Aggregation: Treating relationships as higher-level entities.
ER Diagrams
Notation: Rectangles (entities), ellipses (attributes), diamonds (relationships).
Mapping Rules:
Entities become tables.
Attributes become columns.
Relationships use foreign keys.