mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> for assistance with diagram creation and documentation prose updates.
37 lines
935 B
Plaintext
37 lines
935 B
Plaintext
erDiagram
|
|
Country ||--o{ StateProvince : "has"
|
|
StateProvince ||--o{ City : "has"
|
|
City ||--o{ BreweryLoc : "located in"
|
|
|
|
%% Cross-schema: defined in full in brewery.mmd
|
|
Brewery ||--o| BreweryLoc : "has location"
|
|
|
|
Country {
|
|
uniqueidentifier CountryID PK
|
|
nvarchar CountryName
|
|
char ISO3166_1 UK
|
|
}
|
|
|
|
StateProvince {
|
|
uniqueidentifier StateProvinceID PK
|
|
nvarchar StateProvinceName
|
|
char ISO3166_2 UK
|
|
uniqueidentifier CountryID FK
|
|
}
|
|
|
|
City {
|
|
uniqueidentifier CityID PK
|
|
nvarchar CityName
|
|
uniqueidentifier StateProvinceID FK
|
|
}
|
|
|
|
BreweryLoc {
|
|
uniqueidentifier BreweryPostLocationID PK
|
|
uniqueidentifier BreweryPostID "FK, UK"
|
|
nvarchar AddressLine1
|
|
nvarchar AddressLine2 "nullable"
|
|
nvarchar PostalCode
|
|
uniqueidentifier CityID FK
|
|
geography Coordinates "nullable"
|
|
}
|