Model the Data: Entities, Records, and Relationships
Define a precise data model that establishes the meaning, structure, and relationships of every record in the fleet management system. Identify core entities, including Vehicle, Shift, and Trip, and specify their attributes, unique identifiers, and relationships. Establish clear data contracts that ensure consistency, uniqueness, and traceability across sources. Record the provenance of each data point, including its source, timestamp, and validation status. Distinguish unverified identity claims from confirmed mappings, and never treat pending associations as established facts. Define how records are linked, validated, and reconciled when inconsistencies arise. Preserve supporting evidence and audit trails to make every assertion independently inspectable. Use the model to support accurate calculations, investigate anomalies, and enable reliable operational decisions without introducing unsupported assumptions.
We'll cover the following...
- Which entities does the fleet review need?
- What does each record represent?
- How do you link records from a second source?
- How do you keep GarageLog’s G8 separate from V4?
- How do you represent the pending identity claim?
- What changes once the match is confirmed?
- Why keep match state, reported status, and decision state apart?
- Which constraints must every record satisfy?
- How do you repair a flattened review row?
- How do you explain the model when the interviewer pushes back?
- How do you sketch a data model for a V1 on your own?
You now have a bounded first version: the fleet manager reviews a completed shift and chooses where to investigate. The next question is what each record in that version means. Take the row V4, S17, 165, investigate. It looks compact, but it never says what one row represents or what its duration and decision mean.
A precise data model makes those meanings inspectable. It also lets you explain your design without quietly inventing identity, evidence, or authority.
Which entities does the fleet review need?
The agreed action gives the model its purpose: the fleet manager inspects periods in a completed shift and chooses whether and where to investigate. Start with the things that action requires, and nothing more.
What does the row about V4 represent?
An entity is a distinguishable thing the model represents. An attribute describes that thing, and a relationship connects it to another represented thing. Palantir’s own Foundry Ontology uses the same split: an object type defines a real-world entity or event, properties describe it, and a link type defines a relationship between two object types.
For the fleet packet:
Vehicle: The enduring fleet resource, here V4.
Shift: One completed work interval for one vehicle, here S17 from 08:00 to 12:00.
Trip: One recorded trip attributed to one shift, here T31 and T32.
The shift’s start_time is an attribute. Its connection to V4 is a relationship. V4 means the same fleet resource across shifts, while S17 represents only this work interval.
Vehicle needs only vehicle_id here. Driver, GPS, maintenance, or availability fields would add information the packet never supplied. Object-and-relationship reasoning works on paper and needs no proprietary software or platform access.
What does each record represent?
Naming entities is the first step. Each one also needs a contract: what one record means, how it is identified, and how it links to the others.
How do you give Vehicle, Shift, and Trip a model contract?
Record grain states exactly what one record represents. An identifier distinguishes records within a stated scope. An identifier that is unique in one source is not automatically unique across sources.
Use these compact contracts:
Vehicle:
Grain: One enduring fleet resource in the authorized fleet packet.
Fields: Vehicle(vehicle_id).
Instance: Vehicle(V4).
Unknowns: No other vehicle attributes are supplied.
Shift:
Grain: One completed work interval for one vehicle.
Identifier:
shift_id.Fields: Shift(shift_id, vehicle_id, start_time, ...