Changes between Version 1 and Version 2 of RelationModel


Ignore:
Timestamp:
11/30/22 23:19:35 (19 months ago)
Author:
201084
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RelationModel

    v1 v2  
    99=== Табели
    1010
    11 users_table (ID_user, username, e-mail, name_user, password, user_created_on, ID_user*(administrator))
    12 client (ID_ user*(users_table), phone_number_client)
    13 delivery_man (ID_ user*(users_table), employed_from)
    14 warehouseman (ID_ user*(users_table), employed_from, ID_warehouse*(warehouse))
    15 administrator (ID_ user*(users_table), authorized_from, authorized_till)
    16 review (ID_review, review_rating, review_comment, ID_repair*(repair), ID_user*(client))
    17 repair (ID_repair, VIN*(car_sample), ID_repair_shop*(repair_shop), ID_service_book*(service_book))
    18 repair_shop (ID_repair_shop, rs_name, rs_location, rs_phone_number)
    19 car_manufacturer (ID_car_manufacturer, cm_name, cm_country)
    20 car (ID_car, in_production_since, in_production_till, car_type, ID_car_manufacturer*(car_manufacturer))
    21 car_sample (VIN, year_of_production, engine_power, displacement, fuel_type, km_driven, ID_user*(client), ID_car*(car))
    22 service_book (ID_service_book, sb_created_on, VIN*(car_sample))
    23 order_table (ID_order, order_status, order_date), ID_user*(client))
    24 part_manufacturer (ID_part_manufacturer, pm_name, pm_location)
    25 part (ID_part, part_name, part_description, ID_part_manufacturer*(part_manufacturer))
    26 delivery (ID_delivery, delivery_status, delivery_address, ID_user*(delivery_man), ID_order*(order))
    27 warehouse (ID_warehouse, warehouse_location)
    28 price (ID_price, price_from, price_till, amount, ID_part*(part))
    29 category (ID_category, category_name, ID_parent_category*(category))
    30 part_is_from_category (ID_part*(part), ID_category*(category))
    31 repair_shop_is_authorized_for_car_make (ID_repair_shop*(repair_shop), ID_car_manufacturer*(car_manufacturer))
    32 order_contains_part (ID_order*(order), ID_part*(part),quantity)
    33 part_is_in_stock_in_warehouse (ID_part*(part), ID_warehouse*(warehouse),quantity)
    34 part_is_appropriate_for_car (ID_part*(part), ID_car*(car))
     11 - //users_table// (**__ID_user__**, **username**, **e-mail**, **name_user**, **password**, **user_created_on**, ID_user*(administrator))
     12 - //client// (**__ID_user*__**(users_table), phone_number_client)
     13 - //delivery_man// (**__ID_user*__**(users_table), **employed_from**)
     14 - //warehouseman// (**__ID_user*__**(users_table), **employed_from**, **ID_warehouse***(warehouse))
     15 - //administrator// (**__ID_user*__**(users_table), **authorized_from**, **authorized_till**)
     16 - //review// (**__ID_review__**, **review_rating**, review_comment, **ID_repair***(repair), **ID_user***(client))
     17 - //repair// (**__ID_repair__**, **VIN***(car_sample), **ID_repair_shop***(repair_shop), ID_service_book*(service_book))
     18 - //repair_shop// (**__ID_repair_shop__**, **rs_name**, **rs_location**, **rs_phone_number**)
     19 - //car_manufacturer// (**__ID_car_manufacturer__**, **cm_name**, cm_country)
     20 - //car// (**__ID_car__**, **in_production_since**, **in_production_till**, **car_type**, **ID_car_manufacturer***(car_manufacturer))
     21 - //car_sample// (**__VIN__**, **year_of_production**, **engine_power**, **displacement**, **fuel_type**, **km_driven**, **ID_user***(client), **ID_car***(car))
     22 - //service_book// (**__ID_service_book__**, **sb_created_on**, **VIN***(car_sample))
     23 - //order_table// (**__ID_order__**, **order_status**, **order_date**, **ID_user***(client))
     24 - //part_manufacturer// (**__ID_part_manufacturer__**, **pm_name**, pm_location)
     25 - //part// (**__ID_part__**, **part_name**, part_description, **ID_part_manufacturer***(part_manufacturer))
     26 - //delivery// (**__ID_delivery__**, **delivery_status**, **delivery_address**, **ID_user***(delivery_man), **ID_order***(order))
     27 - //warehouse// (**__ID_warehouse__**, **warehouse_location**)
     28 - //price// (**__ID_price__**, **price_from**, price_till, **amount**, **ID_part***(part))
     29 - //category// (**__ID_category__**, **category_name**, ID_parent_category*(category))
     30 - //part_is_from_category// (**__ID_part*__**(part), **__ID_category*__**(category))
     31 - //repair_shop_is_authorized_for_car_make// (**__ID_repair_shop*__**(repair_shop), **__ID_car_manufacturer*__**(car_manufacturer))
     32 - //order_contains_part// (**__ID_order*__**(order), **__ID_part*__**(part),**quantity_order**)
     33 - //part_is_in_stock_in_warehouse// (**__ID_part*__**(part), **__ID_warehouse*__**(warehouse),**quantity**)
     34 - //part_is_appropriate_for_car// (**__ID_part*__**(part), **__ID_car*__**(car))
    3535
    3636
    3737== DDL скрипта за бришење на табелите и креирање на табелите
    3838
    39 '''[attachment:kreiranje_v1.sql]'''
     39'''[attachment:kreiranje_v2.sql]'''
    4040
    4141== DML скрипта за полнење на табелите со податоци
    4242
    43 '''[attachment:polnenje_v1.sql]'''
     43'''[attachment:polnenje_v2.sql]'''
    4444
    4545== Релациски дијаграм изваден од DBeaver
    4646
    47 [[Image(schema_v1.jpg, 100%, center)]]
     47[[Image(schema_v2.jpg, 100%, center)]]