Model the tables for a given scenario.
Define a normalized relational model that stores scenarios, their entities, and relationships between entities. Then write a query that reports every entity, including entities with no relationships.
scenario_name, entity_name, and relationship_countscenario_name, then entity_name ascending| Column | Type | Description |
|---|---|---|
| scenario_idPK | INT | Unique scenario identifier |
| scenario_name | VARCHAR(100) | Name of the modeled scenario |
| scenario_status | VARCHAR(20) | Optional lifecycle status |
| Column | Type | Description |
|---|---|---|
| entity_idPK | INT | Unique entity identifier |
| scenario_id | INT | Scenario containing the entity |
| entity_name | VARCHAR(100) | Entity name |
| primary_key_name | VARCHAR(100) | Modeled primary key attribute name |
| Column | Type | Description |
|---|---|---|
| relationship_idPK | INT | Unique relationship identifier |
| source_entity_id | INT | Entity at the source end |
| target_entity_id | INT | Entity at the target end |
| relationship_name | VARCHAR(100) | Name of the relationship |
| relationship_type | VARCHAR(30) | Optional cardinality classification |