Flat Model
In a flat model, all data is stored in a single table or structure.
This can lead to data redundancy but provides simple querying.
| Ship Name | Registry | Class | Crew Member | Position | Species | Department | Ship Status | Mission Count | Last Starbase |
|---|---|---|---|---|---|---|---|---|---|
| USS Enterprise | NCC-1701 | Constitution | James T. Kirk | Captain | Human | Command | Active, Patrol | 167 | Starbase 1, Earth Orbit |
| USS Enterprise | NCC-1701 | Constitution | Spock | First Officer | Vulcan | Science | Active, Patrol | 167 | Starbase 1, Earth Orbit |
| USS Enterprise | NCC-1701 | Constitution | Leonard McCoy | Chief Medical Officer | Human | Medical | Active, Patrol | 167 | Starbase 1, Earth Orbit |
Relational Model
The relational model organizes data in related tables, reducing redundancy
through normalization and establishing relationships via foreign keys.
Ships Table
| Ship ID | Name | Registry | Class |
|---|---|---|---|
| 1 | USS Enterprise | NCC-1701 | Constitution |
Officers Table
| Officer ID | Ship ID | Name | Position | Species |
|---|---|---|---|---|
| 1 | 1 | James T. Kirk | Captain | Human |
| 2 | 1 | Spock | First Officer | Vulcan |
Document Model
The document model nests related data in a hierarchical structure,
making it intuitive to read and efficient for retrieving complete objects.
{
"name": "USS Enterprise",
"registry": "NCC-1701",
"class": "Constitution",
"crew": {
"captain": {
"name": "James T. Kirk",
"position": "Captain",
"species": "Human"
},
"first_officer": {
"name": "Spock",
"position": "First Officer",
"species": "Vulcan"
}
}
}
Column Model (Tidy Data Frame)
The column model organizes data with each variable as a column and each observation as a row,
following tidy data principles. This structure optimizes for analytical queries and allows
efficient column-wise operations and compression.
Starfleet Personnel Data Frame
| date | crew_member | ship_name | position | species | years_service | missions_completed | efficiency_rating | response_time_ms | department_budget_credits |
|---|---|---|---|---|---|---|---|---|---|
| 2265-03-15 | James T. Kirk | USS Enterprise | Captain | Human | 15.3 | 167 | 98.4 | 342 | 1250000 |
| 2265-03-15 | Spock | USS Enterprise | First Officer | Vulcan | 18.7 | 182 | 99.8 | 218 | 980000 |
| 2265-03-15 | Leonard McCoy | USS Enterprise | Chief Medical Officer | Human | 12.4 | 143 | 97.2 | 386 | 1100000 |
Graph Model (RDF)
The RDF (Resource Description Framework) model represents data as a graph of triples:
subject, predicate, and object. This allows for flexible relationship modeling and
semantic queries.
USS Enterprise
hasRegistry
→
NCC-1701
USS Enterprise
hasCaptain
→
James T. Kirk
James T. Kirk
hasSpecies
→
Human
James T. Kirk
leadsUnit
→
Command Dept
USS Enterprise
hasFirstOfficer
→
Spock
Spock
hasSpecies
→
Vulcan