bookings.CustomerID ─────────(FK)────── customers.CustomerID (PK) │ │ │ (who made the booking) │ (customer details) └── Links booking to customer └── Name, contact info, address, etc.
SchemaPlus also creates foreign key constraints for rails' t.references or t.belongs_to, which take the singular of the referenced table name and implicitly create the column suffixed with _id. You ...