= Логички и физички дизајн === Релациска шема (со мапирачка трансформација) > Primary key: __underline [[br]] > Foreign key: * [[br]] > not null: '''bold''' [[br]] ---- * user_table('''__user_id__''', '''username''', '''name_user''', '''email''', '''password''', phone_number, user_id*(administrator)) * administrator('''__user_id__'''*(user)) * customer('''__user_id__'''*(user)) * delivery_man('''__user_id__'''*(user)) * service_man('''__user_id__'''*(user)) * warehouseman('''__user_id__'''*(user)) * warehouse('''__warehouse_id__''', '''warehouse_location''') * vehicle('''__vehicle_id__''', '''vehicle_model''', '''vehicle_service''', '''delivery_man_id'''*(delivery_man)) * delivery('''__delivery_id__''', '''delivery_status''', '''delivery_address''', '''delivery_man_id'''*(delivery_man)) * review('''__review_id__''', '''review_rating''', '''review_description''', '''customer_id'''*(customer), '''product_id'''*(product)) * order_table('''__order_id__''', '''order_status''', '''order_date''', '''customer_id'''*(customer)) * category('''__category_id__''', '''category_name''') * subcategory('''__subcategory_id__''', '''subcategory_name''', '''category_id'''*(category)) * manufacturer('''__manufacturer_id__''', '''manufacturer_name''') * product('''__product_id__''', '''product_name''', '''product_description''', '''product_price''', '''product_image''', '''manufacturer_id'''*(manufacturer), '''service_man_id'''*(service_man)) * vehicle_is_used_for_delivery('''__vehicle_id__'''*(vehicle), '''__delivery_id__'''*(delivery)) * product_is_in_stock_in_warehouse('''__product_id__'''*(product), '''__warehouse_id__'''*(warehouse),'''quantity''') * order_table_contains_product('''__order_id__'''*(order_table), '''__product_id__'''*(product)) * product_is_in_category('''__product_id__'''*(product), '''__category_id__'''*(category)) === DDL скрипта за бришење и креирање на табелите > [attachment:kreiranje_v2.sql kreiranje] === DML скрипта за полнење на табелите со податоци > [attachment:polnenje_v1.sql polnenje] === Релациски дијаграм [[Image(schema_v2.jpg)]]