Uber
Production database schema for an Uber-like ride-sharing platform featuring driver and vehicle management, real-time ride lifecycle tracking, GPS route logging, dynamic surge pricing, fare estimation, payment processing, mutual rating system, driver earnings, promotions, and support ticket management.
ride-sharinggig-economygeolocationpaymentsreal-time
MySQL11 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique user identifier for both riders and drivers
User email for login and notifications
Bcrypt hashed password
User first name
User last name
Mobile phone number for SMS verification
Profile photo URL
Account type: rider, driver, or both
Whether phone/email is verified
Account creation timestamp
Last profile update timestamp
IXUQCK|💬
MySQL12 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique driver profile identifier
User account for this driver
Driver's license number
Driver license expiration date
Driver status: offline, available, on_trip
Average driver rating out of 5.0
Total completed trip count
Percentage of ride requests accepted
Current GPS latitude position
Current GPS longitude position
Profile creation timestamp
Last update timestamp
IXUQCK|💬
MySQL12 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique vehicle identifier
Driver who owns this vehicle
Vehicle manufacturer e.g. Toyota
Vehicle model e.g. Camry
Vehicle manufacturing year
Vehicle color
Vehicle license plate number
Category: UberX, UberXL, UberBlack, etc.
Number of passenger seats
Whether vehicle is currently approved
Vehicle registration timestamp
Last update timestamp
IXUQCK|💬
MySQL8 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique document record identifier
Vehicle this document belongs to
Document type: insurance, registration, inspection
URL to uploaded document scan
Document expiration date
Verification status: pending, approved, rejected
Upload timestamp
Last review timestamp
IXUQCK|💬
MySQL8 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique ride type identifier
Ride type name e.g. UberX, UberXL
Ride type description for passengers
Fixed base fare per trip
Rate charged per kilometer
Rate charged per minute
Maximum passengers for this ride type
Ride type creation timestamp
IXUQCK|💬
MySQL22 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique ride identifier
Passenger who requested the ride
Driver assigned to the ride
Vehicle used for the ride
Category of ride requested
Ride status: requested, accepted, arriving, in_progress, completed, cancelled
Pickup location description
Pickup GPS latitude
Pickup GPS longitude
Destination location description
Destination GPS latitude
Destination GPS longitude
Total trip distance in kilometers
Total trip duration in minutes
Base fare charged for this ride
Final total fare including all fees
Surge pricing multiplier applied
When ride was requested
When driver accepted the request
When ride pickup started
When ride was completed
When ride was cancelled if applicable
IXUQCK|💬
MySQL6 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique GPS tracking point identifier
Ride being tracked
GPS latitude at this point
GPS longitude at this point
Speed at tracking point in km/h
Timestamp of GPS recording
IXUQCK|💬
MySQL7 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique rating record identifier
Ride this rating is for
User who submitted the rating
User being rated
Rating score 1-5 stars
Optional written feedback
Rating submission timestamp
IXUQCK|💬
MySQL10 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique payment record identifier
Ride this payment is for
Passenger who was charged
Total charged amount
ISO currency code
Payment method: card, cash, wallet, promo
Payment status: pending, completed, failed, refunded
External payment gateway transaction ID
When payment was processed
Payment record creation timestamp
IXUQCK|💬
MySQL9 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique driver earnings record
Driver who earned
Ride the earnings are from
Gross fare before platform commission
Platform commission deducted
Net driver earnings after commission
Any bonus or incentive amount added
When earnings were transferred to driver
Earnings record creation timestamp
IXUQCK|💬
MySQL10 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique promotion identifier
Promo code string entered by user
Discount type: percentage or fixed_amount
Discount amount or percentage value
Minimum ride fare to apply promotion
Maximum total uses, null for unlimited
Current number of redemptions
Promotion validity start date
Promotion expiry date
Promotion creation timestamp
IXUQCK|💬
MySQL6 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique promo usage record
Promotion that was used
User who redeemed the promotion
Ride the promotion was applied to
Actual discount amount applied
When promotion was redeemed
IXUQCK|💬
MySQL8 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique saved place identifier
User who saved this location
Place label: Home, Work, or custom
Full address of saved place
GPS latitude of saved location
GPS longitude of saved location
When place was saved
Last update timestamp
IXUQCK|💬
MySQL9 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique support ticket identifier
User who submitted the ticket
Related ride if applicable
Issue category: fare_dispute, driver_issue, lost_item, etc.
Ticket subject line
Detailed issue description
Ticket status: open, in_progress, resolved, closed
Ticket creation timestamp
Last update timestamp
IXUQCK|💬
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Created with ERD Studio
Tables in this template
usersUsers
11 colsdriver_profilesDriver Profiles
12 colsvehiclesVehicles
12 colsvehicle_documentsVehicle Documents
8 colsride_typesRide Types
8 colsridesRides
22 colsride_trackingRide Tracking
6 colsratingsRatings
7 colspaymentsPayments
10 colsdriver_earningsDriver Earnings
9 colspromotionsPromotions
10 colspromo_usagesPromo Usages
6 colssaved_placesSaved Places
8 colssupport_ticketsSupport Tickets
9 colsRelated Templates
View all templates →GitHub
CloneCode hosting platform with repositories, issues, pull requests, and CI/CD
PostgreSQL16 tables
developer-toolsgitcollaboration+2
Web App
Netflix
CloneVideo streaming platform with content catalog, profiles, subscriptions, and recommendations
PostgreSQL15 tables
streamingvideosubscription+2
Web App
Spotify
CloneMusic streaming platform with tracks, artists, albums, playlists, and social features
PostgreSQL18 tables
musicstreamingplaylist+2
Web App
Discord
CloneCommunity platform with servers, channels, roles, voice, and bots
PostgreSQL15 tables
gamingcommunityvoice+2
Web App