-
Notifications
You must be signed in to change notification settings - Fork 0
Database schema
Shady Ashraf Abdelhameed edited this page Jan 31, 2025
·
1 revision
The database schema is designed to support the management of Walks, Regions, and Difficulty Levels. It includes three main tables: Walks, Regions, and Difficulty. Each table has specific columns to store relevant data, and relationships are established using foreign keys.
Represents individual walking trails.
| Column Name | Type | Nullable | Description |
|---|---|---|---|
Id |
Unique Identifier (GUID) | No | Unique ID for each walk. |
Name |
string | No | Name of the walk. |
Description |
string | No | Brief description of the walk. |
LengthInKm |
double | No | Length of the walk in kilometers. |
WalkImageUrl |
string | Yes | URL of the walk image. |
RegionId |
Unique Identifier (GUID) | No | ID of the associated region. |
DifficultyId |
Unique Identifier (GUID) | No | ID of the associated difficulty level. |
Represents geographical regions where walks are located.
| Column Name | Type | Nullable | Description |
|---|---|---|---|
Id |
Unique Identifier (GUID) | No | Unique ID for each region. |
Code |
string | No | Short code for the region (e.g., TOM). |
Name |
string | No | Full name of the region. |
RegionImageUrl |
string | Yes | URL of the region image. |
Represents the difficulty levels of walks.
| Column Name | Type | Nullable | Description |
|---|---|---|---|
Id |
Unique Identifier (GUID) | No | Unique ID for each difficulty level. |
Name |
string | No | Name of the difficulty level (e.g., Easy, Medium, Hard). |
-
Walks and Regions:
- Each walk is associated with a specific region through the
RegionIdforeign key. - A region can have multiple walks, but a walk is linked to only one region.
- Each walk is associated with a specific region through the
-
Walks and Difficulty:
- Each walk has an associated difficulty level through the
DifficultyIdforeign key. - A difficulty level can be associated with multiple walks, but a walk has only one difficulty level.
- Each walk has an associated difficulty level through the

-
Walks:
- Represents individual walking trails.
- Attributes:
Id,Name,Description,LengthInKm,WalkImageUrl,RegionId,DifficultyId.
-
Regions:
- Represents geographical regions where walks are located.
- Attributes:
Id,Code,Name,RegionImageUrl.
-
Difficulty:
- Represents the difficulty levels of walks.
- Attributes:
Id,Name.
-
Regions ↔ Walks:
- One-to-many relationship.
- A region can have multiple walks, but a walk belongs to only one region.
-
Difficulty ↔ Walks:
- One-to-many relationship.
- A difficulty level can be associated with multiple walks, but a walk has only one difficulty level.