Version 3 (modified by 3 weeks ago) ( diff ) | ,
---|
Логички и физички дизајн - Креирање база податоци (со SQL DDL)
Ознаки
- Со * се означени надворешни клучеви
- Примарните клучеви се подвлечени и болдирани
Табели
Ентитети
- USER (user_id, user_name, user_surname, user_email, user_mobile_no, city_id*)
- * референцира до CITY (city_id)
- VEHICLE (vehicle_id, vehicle_carry_weight, driver_id*, warehouse_id**)
- * референцира до DRIVER (user_id)
- ** референцира до WAREHOUSE (warehouse_id)
- DELIVERY (delivery_id, delivery_status, delivery_date_created, delivery_date, vehicle_id*)
- * референцира до VEHICLE (vehicle_id)
- PRO_FORMA (pro_forma_id, pro_forma_status, pro_forma_deadline, pro_forma_date_created, order_id*)
- * референцира до ORDERS (order_id)
- ARTICLE (article_id, article_price, article_image, article_name, article_weight, category_id*)
- * референцира до CATEGORY (category_id)
- ORDERS (order_id, order_date_created, order_status, delivery_id*, pro_forma_id**)
- * референцира до DELIVERY (delivery_id)
- ** референцира до PRO_FORMA (pro_forma_id)
- CITY (city_id, city_name)
- MANAGER (user_id*', warehouse_id**)
- * референцира до USER (user_id)
- ** референцира до WAREHOUSE (warehouse_id)
- CUSTOMER (user_id*', customer_EDB, customer_company_name, customer_address, customer_working_hours, customer_representative_image)
- * референцира до USER (user_id)
- DRIVER (user_id*', vehicle_id**)
- * референцира до USER (user_id)
- ** референцира до VEHICLE (vehicle_id)
- WAREHOUSE (warehouse_id, warehouse_address, manager_id*, city_id**)
- * референцира до MANAGER (user_id)
- ** референцира до CITY (city_id)
- CATEGORY (category_id, category_name)
- ARTICLE_UNIT (article_id*', order_id**)
- * референцира до ARTICLE (article_id)
- ** референцира до ORDERS (order_id)
Релации
- WAREHOUSE_LOCATION (warehouse_id*, city_id**')
- * референцира до WAREHOUSE (warehouse_id)
- ** референцира до CITY (city_id)
- IN_STOCK (city_id*, warehouse_id**')
- * референцира до CITY (city_id)
- ** референцира до WAREHOUSE (warehouse_id)
DDL скрипта за креирање и бришење на табелите
DML скрипта за полнење на табелите со податоци
Attachments (2)
- kreiranje.sql (4.5 KB ) - added by 3 weeks ago.
- DB_Scheme_SQL.png (96.7 KB ) - added by 3 weeks ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.