Changes between Version 5 and Version 6 of RelationalModel


Ignore:
Timestamp:
04/23/26 00:38:07 (10 days ago)
Author:
231082
Comment:

diagrams update

Legend:

Unmodified
Added
Removed
Modified
  • RelationalModel

    v5 v6  
    33== Relational Diagram
    44
    5 The diagram was produced using Visual Paradigm (desktop version, Community Edition) in Crow's foot notation. A supplementary diagram in Barker's notation was also produced using Oracle SQL Developer Data Modeler, providing a logical model and an engineered relational model.
     5=== Visual Paradigm (Crow's foot notation)
    66
    7 [[Image(RelationalModel-CMS-FINAL.svg, 1720px)]]
     7Two versions of the Visual Paradigm diagram are provided. The identifying relationships version uses composite natural primary keys and identifying relationships everywhere a natural key is sufficient, making the full extent of key propagation visible. The surrogate keys version replaces excessively long composite keys with surrogate `id` attributes, making the diagram substantially easier to read. Both versions are semantically equivalent. See the Primary Key Strategy section for detailed reasoning.
    88
    9 The following two diagrams were produced in Oracle SQL Developer Data Modeler using Barker's notation as a supplementary model. The Visual Paradigm diagram above is the mandatory deliverable. The Data Modeler diagrams are provided because they overcome several limitations of Visual Paradigm documented in the section below, and allow the model to be expressed with proper per-side participation, bilateral relationship naming, correct data types, non-transferability, and direct recursive relationship lines without intermediate entities.
     9==== Identifying Relationships version
    1010
    11 === ''Logical Diagram (Barker's notation)''
     11[[Image(RelationalModel-CMS-IdentifyingRelationships.svg, 1720px)]]
    1212
    13 [[Image(RelationalModel-CMS-Logical-FINAL.svg, 1720px)]]
     13==== Surrogate Keys version
    1414
    15 === ''Relational Diagram (Barker's notation)''
     15[[Image(RelationalModel-CMS-SurrogateKeys.svg, 1720px)]]
    1616
    17 [[Image(RelationalModel-CMS-Relational-FINAL.svg, 1720px)]]
     17=== Oracle SQL Developer Data Modeler (Barker's notation)
     18
     19The following two diagrams were produced in Oracle SQL Developer Data Modeler using Barker's notation as a supplementary model. The Visual Paradigm diagrams above are the mandatory deliverable. The Data Modeler diagrams are provided because they overcome several limitations of Visual Paradigm documented in the section below, and allow the model to be expressed with proper per-side participation, bilateral relationship naming, correct data types, non-transferability, and direct recursive relationship lines without intermediate entities.
     20
     21==== Logical Diagram
     22
     23[[Image(RelationalModel-CMS-Logical.svg, 1720px)]]
     24
     25==== Relational Diagram
     26
     27[[Image(RelationalModel-CMS-Relational.svg, 1720px)]]
    1828
    1929Attached files:
    20 - `RelationalModel-CMS-FINAL.svg` — Visual Paradigm diagram, exported as image (mandatory)
    21 - `RelationalModel-CMS-FINAL.vpp` — Visual Paradigm model file (mandatory)
    22 - `RelationalModel-CMS-Logical-FINAL.svg` — Oracle SQL Developer Data Modeler Logical diagram, exported as image
    23 - `RelationalModel-CMS-Relational-FINAL.svg` — Oracle SQL Developer Data Modeler Relational diagram, exported as image
     30- `RelationalModel-CMS-SurrogateKeys.svg` — Visual Paradigm diagram with surrogate primary keys, exported as image (mandatory)
     31- `RelationalModel-CMS-SurrogateKeys.vpp` — Visual Paradigm model file, surrogate keys version (mandatory)
     32- `RelationalModel-CMS-IdentifyingRelationships.svg` — Visual Paradigm diagram with composite natural primary keys and identifying relationships, exported as image (mandatory)
     33- `RelationalModel-CMS-IdentifyingRelationships.vpp` — Visual Paradigm model file, identifying relationships version (mandatory)
     34- `RelationalModel-CMS-Logical.svg` — Oracle SQL Developer Data Modeler Logical diagram, exported as image
     35- `RelationalModel-CMS-Relational.svg` — Oracle SQL Developer Data Modeler Relational diagram, exported as image
    2436
    2537== Descriptive Documentation and Argumentation
     
    2739=== ''Diagram review and professor consultation''
    2840
    29 The Visual Paradigm diagram is the mandatory deliverable for this phase and was presented to the supervising professor during the required consultation. The professor's remarks were subsequently implemented in both the Visual Paradigm and the Oracle SQL Developer Data Modeler diagrams. The two diagrams are conceptually equivalent and nearly visually identical. The only structural differences between them stem from tool behaviour, described in the tooling limitations section below.
     41The Visual Paradigm diagram is the mandatory deliverable for this phase and was presented to the supervising professor during the required consultation. The professor's remarks were subsequently implemented in both the Visual Paradigm and the Oracle SQL Developer Data Modeler diagrams.
     42
     43The two diagrams are conceptually equivalent and nearly visually identical. The only structural differences between them stem from tool behaviour: `Survey_Response`, `Course_Equivalence`, `Course_Prerequisite`, and `Announcement_Replies` are represented as entity boxes in Visual Paradigm but as relationship lines in Data Modeler. `Teaches` was previously also in this category, but has been promoted to a deliberate entity in Data Modeler following the decision to connect `Announcement` to `Teaches` rather than separately to `Course_Edition` and `Member`.
    3044
    3145=== Member / Student / Teacher (ISA specialisation)
     
    8599- Relationship names are limited to one per relationship rather than one per participating entity end.
    86100
    87 - `Teaches`, `Survey_Response`, and `Course_Equivalence` appear as entity boxes in the Visual Paradigm diagram due to the tool's handling of many-to-many relationships. In the Data Modeler diagram these three are correctly represented as pure relationship lines (connections) between their respective entities, since Data Modeler does not require intermediate entity boxes for M:N relationships. This is the only structural difference between the two diagrams and is a tooling artefact, not a modeling decision.
     101- `Survey_Response` and `Course_Equivalence` appear as entity boxes in the Visual Paradigm diagram due to the tool's handling of many-to-many relationships. In the Data Modeler diagram these two are correctly represented as pure relationship lines. `Teaches` was always an entity box in Visual Paradigm due to tool limitations, and has now been promoted to a deliberate entity in Data Modeler as well, because `Announcement` references it directly and it therefore requires a referenceable surrogate primary key.
    88102
    89103These limitations are the reason a supplementary Barker's notation diagram was produced in Oracle SQL Developer Data Modeler, which supports proper per-side participation, bilateral relationship naming, native data types, non-transferability, and direct representation of M:N relationships without forced intermediate entities.
     104
     105=== Primary Key Strategy
     106
     107Two distinct situations were encountered when determining the primary key structure for each entity, and each was handled differently.
     108
     109==== Rule 1 — Surrogate key replacing an excessively long composite natural key
     110
     111In several entities, the natural primary key assembled from foreign key attributes of parent entities would have consisted of between five and twenty attributes. This accumulation arises from chains of identifying relationships: when entity C identifies itself through entity B, which in turn identifies itself through entity A, C inherits the full composite key of both. In the surrogate keys diagram, entities in this situation are assigned a single surrogate `id` attribute as their sole primary key. The columns that would have formed the composite natural key are retained and covered by a `UNIQUE NOT NULL` constraint, preserving the same semantic guarantee — the database still rejects duplicates — but without propagating the key further down the chain. As a consequence, all such relationships are non-identifying, reflected in the surrogate keys diagram by dashed relationship lines throughout.
     112
     113==== Rule 2 — Surrogate key as a genuine additional identifier
     114
     115In certain entities that arise from many-to-many relationships, the foreign keys of the two participating entities are not sufficient to form a unique primary key on their own. This occurs when the same pair of entities may legitimately appear in the relationship more than once — for example, a student may attempt the same exam multiple times, so `(student_id, exam_id)` alone does not uniquely identify an attempt. In these cases a surrogate `id` is added not to reduce key length but because no natural key exists. The foreign keys are retained and covered by an appropriate `UNIQUE` or partial uniqueness constraint where the business rules require it. This rule applies in both diagram versions.
     116
     117==== The two diagram versions
     118
     119The identifying relationships version applies only Rule 2, using composite natural primary keys and identifying relationships everywhere a natural key is sufficient. This makes the full extent of key propagation visible and serves as a reference point for understanding the motivation for Rule 1. The surrogate keys version applies both Rule 1 and Rule 2, replacing all excessively long composite keys with surrogate keys and making all such relationships non-identifying. Both versions are semantically equivalent in terms of what data they can represent and what integrity constraints they enforce.
     120
     121==== Performance considerations
     122
     123Identifying relationships with composite primary keys offer a physical storage benefit in database engines that use clustered indexes (such as MySQL/InnoDB or SQL Server), where child rows sharing the same parent key value are stored physically adjacent on disk, accelerating range scans. However, PostgreSQL uses a heap-based storage model and does not maintain physical row ordering by primary key automatically. This benefit therefore does not apply in our context. Query performance for parent–child lookups is instead provided by the B-tree indexes that PostgreSQL creates automatically for every `UNIQUE` constraint, which are functionally equivalent for the access patterns of this system. The identifying relationships diagram is nonetheless provided to make the clustering argument visible and to demonstrate awareness of this tradeoff in database engines where it does apply.