| | 1 | Логички и физички дизајн – Креирање база податоци (со SQL DDL) |
| | 2 | Релациско мапирање |
| | 3 | Ознаки |
| | 4 | - Примарните клучеви се означени со bold и underline. |
| | 5 | - Надворешните клучеви се означени со FK*, а во заграда е наведена табелата што ја референцираат. |
| | 6 | - Задолжителните атрибути се означени со bold. |
| | 7 | - Кај сложените примарни клучеви, сите атрибути што го сочинуваат клучот се означени. |
| | 8 | Табели |
| | 9 | 1. Customers (customer_id, name, type, tax_id, payment_terms_days) |
| | 10 | |
| | 11 | 2. Locations (location_id, name, city, country, customer_id FK*(Customers)) |
| | 12 | |
| | 13 | 3. Users (user_id, username, email) |
| | 14 | |
| | 15 | 4. Roles (role_id, name) |
| | 16 | |
| | 17 | 5. Has_Role (user_id FK*(Users), role_id FK(Roles)*, assigned_on) |
| | 18 | |
| | 19 | 6. Drivers (driver_id, first_name, last_name, embg, status) |
| | 20 | |
| | 21 | 7. DriverDocuments (driver_id FK*(Drivers), doc_no, doc_type, expires_on) |
| | 22 | |
| | 23 | 8. Vehicles (vehicle_id, plate, vin, vehicle_type, status) |
| | 24 | |
| | 25 | 9. VehicleDocuments (vehicle_id FK*(Vehicles), doc_no, doc_type, expires_on) |
| | 26 | |
| | 27 | 10. Orders (order_id, order_no, order_date, status, customer_id FK*(Customers)) |
| | 28 | |
| | 29 | 11. Loads (order_id FK*(Orders), load_no, cargo_description, weight_kg, agreed_price, status) |
| | 30 | |
| | 31 | 12. Stops (order_id FK*(Loads), load_no FK(Loads)*, seq_no, stop_type, planned_time, actual_time, location_id FK*(Locations)) |
| | 32 | |
| | 33 | 13. Shipments (order_id FK*(Loads), load_no FK(Loads)*, shipment_no, description, weight_kg, status, stop_order_id FK*(Stops), stop_load_no FK*(Stops), stop_seq_no FK*(Stops)**) |
| | 34 | |
| | 35 | 14. StatusHistory (order_id FK*(Loads), load_no FK(Loads)*, changed_at, status, note, user_id FK*(Users)) |
| | 36 | |
| | 37 | 15. Assignments (assignment_id, planned_start, planned_end, status, order_id FK*(Loads), load_no FK*(Loads), driver_id FK*(Drivers), truck_id FK*(Vehicles), trailer_id FK*(Vehicles)) |
| | 38 | |
| | 39 | 16. Expenses (expense_id, expense_date, amount, note, vehicle_id FK*(Vehicles), order_id FK*(Loads), load_no FK*(Loads), assignment_id FK*(Assignments)) |
| | 40 | |
| | 41 | 17. FuelEntries (expense_id FK*(Expenses), liters, price_per_liter, odometer_km) |
| | 42 | |
| | 43 | 18. Services (expense_id FK*(Expenses), service_type, workshop, odometer_km) |
| | 44 | |
| | 45 | 19. Tolls (expense_id FK*(Expenses), road_section, country) |
| | 46 | |
| | 47 | 20. Invoices (invoice_id, invoice_no, issue_date, due_date, customer_id FK*(Customers), user_id FK*(Users)) |
| | 48 | |
| | 49 | 21. Includes (invoice_id FK*(Invoices), order_id FK(Loads)*, load_no FK(Loads)*, amount, description) |
| | 50 | |
| | 51 | 22. Payments (payment_id, payment_date, amount, method, invoice_id FK*(Invoices)) |