Changes between Version 3 and Version 4 of Normalization


Ignore:
Timestamp:
08/29/25 15:56:05 (2 days ago)
Author:
185022
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Normalization

    v3 v4  
    11= Нормализација и подобрување на дизајн
    22
    3 [[PageOutline]]
     3[[PageOutline(2-4, Содржина, inline)]]
    44
    55== Определување функционални зависности
    66
    7 R = {user_id, user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, city_name, region_id, region_name, cust_EDB, cust_company_name, cust_adr, cust_representative_img, wh_id, wh_adr, veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin,veh_reg_date, ctg_id, ctg_name, man_id, man_name, man_adr, man_mobile, man_email, art_id, art_name, art_image, art_weight, price_id, price, price_eff_date, pf_id, pf_deadline, pf_date_created, pf_status_id, pf_status_name, pf_status_desc, del_id, del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, d_status_name, d_status_desc, ord_id, ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, o_status_name, o_status_desc, unit_id, unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, day_id, day_name, cust_day_id, start_time, end_time, t_id, t_value, t_date, t_type, t_expiry, t_validated_at, t_user, img_id, img_path, img_ent_type, img_ent_id}
     7`R = {user_id, user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, city_name, region_id, region_name, cust_EDB, cust_company_name, cust_adr, cust_representative_img, wh_id, wh_adr, veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin,veh_reg_date, ctg_id, ctg_name, man_id, man_name, man_adr, man_mobile, man_email, art_id, art_name, art_image, art_weight, price_id, price, price_eff_date, pf_id, pf_deadline, pf_date_created, pf_status_id, pf_status_name, pf_status_desc, del_id, del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, d_status_name, d_status_desc, ord_id, ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, o_status_name, o_status_desc, unit_id, unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, day_id, day_name, cust_day_id, start_time, end_time, t_id, t_value, t_date, t_type, t_expiry, t_validated_at, t_user, img_id, img_path, img_ent_type, img_ent_id}`
    88
    99=== Функционални зависности
    1010
    11 ==== Users and related entities
    12 
    13 user_id → user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id
    14 
    15 ==== Customer extends User
    16 
    17 user_id → cust_EDB, cust_company_name, cust_adr, cust_representative_img  (where clazz_ = 'customer')
    18 
    19 ==== Manager extends User
    20 
    21 user_id → wh_id  (where clazz_ = 'manager')
    22 
    23 ==== Driver extends User
    24 
    25 user_id → veh_id  (where clazz_ = 'driver')
    26 
    27 ==== Location data
    28 
    29 city_id → city_name, region_id
    30 
    31 region_id → region_name
     11==== Users
     12
     13`user_id → user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id`
     14
     15==== Customer го проширува User
     16
     17`user_id → cust_EDB, cust_company_name, cust_adr, cust_representative_img  (каде што clazz_ = 'customer')`
     18
     19==== Manager го проширува User
     20
     21`user_id → wh_id  (каде што clazz_ = 'manager')`
     22
     23==== Driver го проширува User
     24
     25`user_id → veh_id  (каде што clazz_ = 'driver')`
     26
     27==== City
     28
     29`city_id → city_name, region_id`
     30
     31==== Region
     32
     33`region_id → region_name`
    3234
    3335==== Warehouse
    3436
    35 wh_id → wh_adr, city_id
     37`wh_id → wh_adr, city_id`
    3638
    3739==== Vehicle
    3840
    39 veh_id → veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id
     41`veh_id → veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id`
    4042
    4143==== Categories
    4244
    43 ctg_id → ctg_name
     45`ctg_id → ctg_name`
    4446
    4547==== Manufacturer
    4648
    47 man_id → man_name, man_adr, man_mobile, man_email
     49`man_id → man_name, man_adr, man_mobile, man_email`
    4850
    4951==== Article
    5052
    51 art_id → art_name, art_image, art_weight, ctg_id, man_id
     53`art_id → art_name, art_image, art_weight, ctg_id, man_id`
    5254
    5355==== Price
    5456
    55 price_id → price, price_eff_date, art_id
     57`price_id → price, price_eff_date, art_id`
    5658
    5759==== Pro forma
    5860
    59 pf_id → pf_deadline, pf_date_created, pf_status_id
    60 
    61 pf_status_id → pf_status_name, pf_status_desc
     61`pf_id → pf_deadline, pf_date_created, pf_status_id`
     62
     63==== Pro Forma Status
     64
     65`pf_status_id → pf_status_name, pf_status_desc`
    6266
    6367==== Delivery
    6468
    65 del_id → del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, veh_id
    66 
    67 d_status_id → d_status_name, d_status_desc
     69`del_id → del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, veh_id`
     70
     71==== Delivery Status
     72
     73`d_status_id → d_status_name, d_status_desc`
    6874
    6975==== Order
    7076
    71 ord_id → ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, cust_id, del_id, pf_id
    72 
    73 o_status_id → o_status_name, o_status_desc
     77`ord_id → ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, cust_id, del_id, pf_id`
     78
     79==== Delivery Status
     80
     81`o_status_id → o_status_name, o_status_desc`
    7482
    7583==== Article unit
    7684
    77 unit_id → unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, wh_id, ord_id
     85`unit_id → unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, wh_id, ord_id`
    7886
    7987==== Weekday
    8088
    81 day_id → day_name
     89`day_id → day_name`
    8290
    8391==== Customer weekday
    8492
    85 cust_day_id → cust_id, day_id, start_time, end_time
     93`cust_day_id → cust_id, day_id, start_time, end_time`
    8694
    8795==== Token
    8896
    89 t_id → t_value, t_date, t_type, t_expiry, t_validated_at, t_user
     97`t_id → t_value, t_date, t_type, t_expiry, t_validated_at, t_user`
    9098
    9199==== Image store
    92100
    93 img_id → img_path, img_ent_type, img_ent_id
     101`img_id → img_path, img_ent_type, img_ent_id`
    94102
    95103=== Класификација на атрибути
     
    97105==== Лево - атрибути кои одредуваат други
    98106
    99 cust_day_id, price_id, pf_id, del_id, ord_id, unit_id, t_id, img_id
     107`cust_day_id, price_id, pf_id, del_id, ord_id, unit_id, t_id, img_id`
    100108
    101109==== Лево и десно - атрибути кои одредуваат други и се одредени од други
    102110
    103 user_id, city_id, region_id, wh_id, veh_id, ctg_id, man_id, art_id, d_status_id, o_status_id, pf_status_id, day_id
     111`user_id, city_id, region_id, wh_id, veh_id, ctg_id, man_id, art_id, d_status_id, o_status_id, pf_status_id, day_id`
    104112
    105113==== Десно - атрибути кои се одредени од други
    106114
    107 user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image,
    108 clazz_, user_role, city_name, region_name, cust_EDB, cust_company_name, cust_adr, cust_representative_img, wh_adr, veh_carry_weight, veh_service_interval, veh_kilometers,
    109 veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, ctg_name, man_name,
    110 man_adr, man_mobile, man_email, art_name, art_image, art_weight, price, price_eff_date,
    111 pf_deadline, pf_date_created, pf_status_name, pf_status_desc, del_date_created, del_date,
    112 del_start_km, del_end_km, del_start_time, del_end_time, d_status_name, d_status_desc, ord_date,
    113 ord_sum, ord_fulfillment_date, ord_comment, o_status_name, o_status_desc, unit_expiration_date,
    114 unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, day_name,
    115 start_time, end_time, t_value, t_date, t_type, t_expiry, t_validated_at, t_user, img_path,
    116 img_ent_type, img_ent_id
     115`user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_name, region_name, cust_EDB, cust_company_name, cust_adr, cust_representative_img, wh_adr, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, ctg_name, man_name, man_adr, man_mobile, man_email, art_name, art_image, art_weight, price, price_eff_date, pf_deadline, pf_date_created, pf_status_name, pf_status_desc, del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_name, d_status_desc, ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_name, o_status_desc, unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, day_name, start_time, end_time, t_value, t_date, t_type, t_expiry, t_validated_at, t_user, img_path, img_ent_type, img_ent_id`
    117116
    118117=== Покривачи на примарните клучеви
     
    120119==== Vehicle
    121120
    122 veh_id+ = {veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr, city_id, city_name, region_id, region_name}
     121`veh_id+ = {veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr, city_id, city_name, region_id, region_name}`
    123122
    124123==== User
    125124
    126 user_id+ = {user_id, user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, city_name, region_id, region_name}
     125`user_id+ = {user_id, user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, city_name, region_id, region_name}`
    127126
    128127* Ако тип на корисник е 'customer':
    129128
    130 *user_id+** += {cust_EDB, cust_company_name, cust_adr, cust_representative_img}
     129`user_id+ += {cust_EDB, cust_company_name, cust_adr, cust_representative_img}`
    131130
    132131* Ако тип на корисник е 'manager':
    133132
    134 **user_id+** += {wh_id, wh_adr}
     133`user_id+ += {wh_id, wh_adr}`
    135134
    136135* Ако тип на корисник е 'driver':
    137136
    138 **user_id+** += {veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr}
     137`user_id+ += {veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr}`
    139138
    140139==== Manufacturer
    141140
    142 man_id+ = {man_id, man_name, man_adr, man_mobile, man_email}
     141`man_id+ = {man_id, man_name, man_adr, man_mobile, man_email}`
    143142
    144143==== Article
    145144
    146 art_id+ = {art_id, art_name, art_image, art_weight, ctg_id, ctg_name, man_id, man_name, man_adr, man_mobile, man_email}
     145`art_id+ = {art_id, art_name, art_image, art_weight, ctg_id, ctg_name, man_id, man_name, man_adr, man_mobile, man_email}`
    147146
    148147==== Price
    149148
    150 price_id+ = {price_id, price, price_eff_date, art_id, art_name, art_image, art_weight, ctg_id, ctg_name, man_id, man_name, man_adr, man_mobile, man_email}
     149`price_id+ = {price_id, price, price_eff_date, art_id, art_name, art_image, art_weight, ctg_id, ctg_name, man_id, man_name, man_adr, man_mobile, man_email}`
    151150
    152151==== Pro-forma
    153152
    154 pf_id+ = {pf_id, pf_deadline, pf_date_created, pf_status_id, pf_status_name, pf_status_desc}
     153`pf_id+ = {pf_id, pf_deadline, pf_date_created, pf_status_id, pf_status_name, pf_status_desc}`
    155154
    156155==== Delivery
    157156
    158 del_id+ = {del_id, del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, d_status_name, d_status_desc, veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr, city_id, city_name, region_id, region_name}
     157`del_id+ = {del_id, del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, d_status_name, d_status_desc, veh_id, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr, city_id, city_name, region_id, region_name}`
    159158
    160159==== Order
    161160
    162 ord_id+ = {ord_id, ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, o_status_name, o_status_desc, cust_id, del_id, pf_id, user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, cust_EDB, cust_company_name, cust_adr, cust_representative_img, city_name, region_id, region_name, del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, veh_id, d_status_name, d_status_desc, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr,pf_deadline, pf_date_created, pf_status_id, pf_status_name, pf_status_desc}
     161`ord_id+ = {ord_id, ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, o_status_name, o_status_desc, cust_id, del_id, pf_id, user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, cust_EDB, cust_company_name, cust_adr, cust_representative_img, city_name, region_id, region_name, del_date_created, del_date, del_start_km, del_end_km, del_start_time, del_end_time, d_status_id, veh_id, d_status_name, d_status_desc, veh_carry_weight, veh_service_interval, veh_kilometers, veh_last_service, veh_last_service_km, veh_plate, veh_vin, veh_reg_date, wh_id, wh_adr,pf_deadline, pf_date_created, pf_status_id, pf_status_name, pf_status_desc}`
    163162
    164163==== Article Unit
    165164
    166 unit_id+ = {unit_id, unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, wh_id, wh_adr, city_id, city_name, region_id, region_name, ord_id}
     165`unit_id+ = {unit_id, unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, wh_id, wh_adr, city_id, city_name, region_id, region_name, ord_id}`
    167166
    168167* Ако ord_id не е null, исто така ги вклучува и:
    169 unit_id+ += {ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, o_status_name, o_status_desc, cust_id, del_id, pf_id,
     168`unit_id+ += {ord_date, ord_sum, ord_fulfillment_date, ord_comment, o_status_id, o_status_name, o_status_desc, cust_id, del_id, pf_id,`
    170169
    171170''и сите атрибути одредени од ord_id''
    172171
    173 }
     172`}`
    174173
    175174==== Композитен клуч - Article Unit и Price
    176175
    177 (unit_id, price_id)+ = {unit_id, price_id,
     176`(unit_id, price_id)+ = {unit_id, price_id,`
    178177
    179178''Сите атрибути определни од unit_id''
    180179
    181 unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, wh_id, ord_id,
     180`unit_expiration_date, unit_serial_number, unit_batch_number, unit_manufacture_date, unit_cost_price, wh_id, ord_id,`
    182181
    183182''Сите атрибути определни од price_id''
    184183
    185 price, price_eff_date, art_id,
     184`price, price_eff_date, art_id,`
    186185
    187186''Сите транзитивни атрибути''
    188187
    189 wh_adr, city_id, city_name, region_id, region_name, art_name, art_image, art_weight, ctg_id, man_id, ctg_name, man_name, man_adr, man_mobile, man_email}
     188`wh_adr, city_id, city_name, region_id, region_name, art_name, art_image, art_weight, ctg_id, man_id, ctg_name, man_name, man_adr, man_mobile, man_email}`
    190189
    191190==== Weekday
    192191
    193 cust_day_id+ = {cust_day_id, cust_id, day_id, start_time, end_time,
     192`cust_day_id+ = {cust_day_id, cust_id, day_id, start_time, end_time,`
    194193
    195194''Од day_id:''
    196195
    197 day_name,
     196`day_name,`
    198197
    199198''Од cust_id:''
    200199
    201 user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, cust_EDB, cust_company_name, cust_adr, cust_representative_img,
     200`user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id, cust_EDB, cust_company_name, cust_adr, cust_representative_img,`
    202201
    203202''Од city_id:''
    204203
    205 city_name, region_id, region_name}
     204`city_name, region_id, region_name}`
    206205
    207206==== Token
    208207
    209 t_id+ = {t_id, t_value, t_date, t_type, t_expiry, t_validated_at, t_user,
     208`t_id+ = {t_id, t_value, t_date, t_type, t_expiry, t_validated_at, t_user,`
    210209
    211210''Од t_user (кое е user_id):''
    212211
    213 user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id,
     212`user_name, user_surname, user_pass, user_salt, user_email, user_mobile, user_active, user_image, clazz_, user_role, city_id,`
    214213
    215214''Од city_id:''
    216215
    217 city_name, region_id, region_name}
     216`city_name, region_id, region_name}`
    218217
    219218==== Image Store
    220219
    221 img_id+ = {img_id, img_path, img_ent_type, img_ent_id}
     220`img_id+ = {img_id, img_path, img_ent_type, img_ent_id}`
    222221
    223222=== Анализа според покривачи
     
    229228* Историја на цени и вредност - `unit_id → unit_cost_price`
    230229* Поврзување на слики: `img_id → img_ent_type, img_ent_id`
     230
     231== Проблеми и подобрување на дизајн
     232