Changes between Version 14 and Version 15 of P2


Ignore:
Timestamp:
12/30/25 12:54:45 (16 hours ago)
Author:
235018
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • P2

    v14 v15  
    20204. **STORE** (**__{{{store_ID}}}__**, {{{name}}}, {{{date_of_founding}}}, {{{physical_address}}}, {{{store_email}}}, {{{rating}}})
    2121
    22 5. **PERSONAL** (**__{{{SSN}}}__**, **{{{name}}}**, ''{{{first_name}}}'', ''{{{last_name}}}'', {{{email}}}, {{{password}}})
     225. **PERSONAL** (**__{{{id}}}__**, **{{{name}}}**, ''{{{first_name}}}'', ''{{{last_name}}}'', {{{ssn}}}, {{{email}}}, {{{password}}})
    2323   * permissions (complex, multi-valued attribute, see table **PERMISSIONS**)
    2424
    25 6. **PERMISSIONS** (**__{{{personal_SSN*}}}__** (PERSONAL), **__{{{type}}}__**, {{{authorisation}}})
    26 
    27 7. **BOSS** (**__{{{boss_SSN*}}}__** (PERSONAL))
    28 
    29 8. **EMPLOYEES** (**__{{{employee_SSN*}}}__** (PERSONAL), {{{date_of_hire}}})
     256. **PERMISSIONS** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{type}}}__**, {{{authorisation}}})
     26
     277. **BOSS** (**__{{{boss_ID*}}}__** (PERSONAL))
     28
     298. **EMPLOYEES** (**__{{{employee_ID*}}}__** (PERSONAL), {{{date_of_hire}}})
    3030
    31319. **CLIENT** (**__{{{client_ID}}}__**, **{{{name}}}**, ''{{{first_name}}}'', ''{{{last_name}}}'', {{{email}}}, {{{password}}})
     
    454515. **MAKES_REQUEST** (**__{{{client_ID*}}}__** (CLIENT), **__{{{order_num*}}}__** (ORDER))
    4646
    47 16. **ANSWERS** (**__{{{request_num*}}}__** (REQUEST), **__{{{personal_SSN*}}}__** (PERSONAL))
     4716. **ANSWERS** (**__{{{request_num*}}}__** (REQUEST), **__{{{personal_ID*}}}__** (PERSONAL))
    4848
    494917. **FOR_STORE** (**__{{{request_num*}}}__** (REQUEST), **__{{{store_ID*}}}__** (STORE))
     
    535319. **CHANGE** (**__{{{date_and_time}}}__**, **__{{{product_code*}}}__**, {{{changes_made}}})
    5454
    55 20. **MAKES_CHANGE** (**__{{{personal_SSN*}}}__** (PERSONAL), **__{{{change_date_time*}}}__** (CHANGE))
     5520. **MAKES_CHANGE** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{change_date_time*}}}__** (CHANGE))
    5656
    575721. **MADE_ON** (**__{{{product_code*}}}__** (PRODUCT), **__{{{change_date_time*}}}__** (CHANGE))
    5858
    59 22. **WORKS_IN_STORE** (**__{{{personal_SSN*}}}__** (PERSONAL), **__{{{store_ID*}}}__** (STORE))
    60 
    61 23. **WORKED** (**__{{{personal_SSN*}}}__** (PERSONAL), **__{{{report_date*}}}__** (REPORT),  **__{{{store_ID*}}}__** (REPORT), {{{wage}}},  {{{pay_method}}},  **{{{working_hours}}}**, ''{{{week}}}'', ''{{{total_week}}}'')
     5922. **WORKS_IN_STORE** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{store_ID*}}}__** (STORE))
     60
     6123. **WORKED** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{report_date*}}}__** (REPORT),  **__{{{store_ID*}}}__** (REPORT), {{{wage}}},  {{{pay_method}}},  **{{{working_hours}}}**, ''{{{week}}}'', ''{{{total_week}}}'')
    6262
    636324. **SELLS** (**__{{{product_code*}}}__** (PRODUCT), **__{{{store_ID*}}}__** (STORE), {{{discount}}})
     
    656525. **INCLUDES** (**__{{{order_num*}}}__** (ORDER), **__{{{product_code*}}}__** (PRODUCT))
    6666
    67 26. **APPROVES** (**__{{{boss_SSN*}}}__** (BOSS), **__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (REPORT), {{{owner_signature}}})
     6726. **APPROVES** (**__{{{boss_ID*}}}__** (BOSS), **__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (REPORT), {{{owner_signature}}})
    6868
    696927. **EXCHANGES_DATA** (**__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (STORE), {{{monthly_profit}}}, {{{date}}}, {{{sales}}}, {{{damages}}})
     
    9494
    9595== Final result ==
     96
     97=== Tables ===
     98
     990. **CATEGORY** (**__{{{id}}}__*** , {{{name}}}, {{{parent_category_id*}}})
     100
     1011. **PRODUCT** (**__{{{code}}}__**, {{{price}}}, {{{availability}}}, **{{{dimensions}}}**, ''{{{weight}}}'', ''{{{width_X_length_X_depth}}}'', {{{aprox_production_time}}}, {{{description}}},
     102**{{{cathegory_id*}}}** (CATEGORY), {{{store_ID*}}} (STORE))
     103   * image (multi-valued attribute, see table **COLORS**)
     104   * color (multi-valued attribute, see table **IMAGE**)
     105
     1062. **IMAGE** (__**{{{product_code*}}}**__ (PRODUCT), __**{{{image}}}**__)
     107
     1083. **COLOR** (**__{{{product_code*}}}__** (PRODUCT), **__{{{color}}}__**)   
     109
     1104. **STORE** (**__{{{store_ID}}}__**, {{{name}}}, {{{date_of_founding}}}, {{{physical_address}}}, {{{store_email}}}, {{{rating}}})
     111
     1125. **PERSONAL** (**__{{{id}}}__**, ''{{{first_name}}}'', ''{{{last_name}}}'', {{{ssn}}}, {{{email}}}, {{{password}}})
     113   * permissions (complex, multi-valued attribute, see table **PERMISSIONS**)
     114
     1156. **PERMISSIONS** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{type}}}__**, {{{authorisation}}})
     116
     1177. **BOSS** (**__{{{boss_ID*}}}__** (PERSONAL))
     118
     1198. **EMPLOYEES** (**__{{{employee_ID*}}}__** (PERSONAL), {{{date_of_hire}}})
     120
     1219. **CLIENT** (**__{{{client_ID}}}__**, ''{{{first_name}}}'', ''{{{last_name}}}'', {{{email}}}, {{{password}}})
     122   * delivery_address (multi-valued attribute, see table **DELIVERY_ADDRESS**)
     123
     12410. **DELIVERY_ADDRESS** (**__{{{client_ID}}}__** (CLIENT), **__{{{address}}}__**, {{{city}}}, {{{postcode}}}, {{{country}}}, {{{is_default}}})
     125
     12611. **ORDER** (**__{{{order_num}}}__**,{{{client_ID*}}} (CLIENT), {{{quantity}}}, {{{status}}}, {{{last_date_mod}}}, {{{payment_method}}}, {{{discount}}})
     127
     12812. **REPORT** (**__{{{date}}}__**, **__{{{store_ID*}}}__** (STORE), {{{overall_profit}}}, {{{sales_trend}}}, {{{marketing_growth}}}, {{{owner_signature}}})
     129    * monthly_profit (multi-valued attribute, see table **MONTHLY_PROFIT**)
     130
     13113. **MONTHLY_PROFIT** (**__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (REPORT), {{{month_and_year}}}, {{{profit}}})
     132
     13314. **REQUEST** (**__{{{request_num}}}__**, {{{date_and_time}}}, {{{problem}}}, {{{notes_of_communication}}}, {{{costumer_satisfaction}}})
     134
     13515. **MAKES_REQUEST** (**__{{{client_ID*}}}__** (CLIENT), **__{{{order_num*}}}__** (ORDER))
     136
     13716. **ANSWERS** (**__{{{request_num*}}}__** (REQUEST), **__{{{personal_ID*}}}__** (PERSONAL))
     138
     13917. **FOR_STORE** (**__{{{request_num*}}}__** (REQUEST), **__{{{store_ID*}}}__** (STORE))
     140
     14118. **REVIEW** (**__{{{order_num*}}}__** (ORDER), {{{comment}}}, {{{rating}}}, {{{last_mod_date}}})
     142
     14319. **CHANGE** (**__{{{date_and_time}}}__**, **__{{{product_code*}}}__**  (PRODUCT), {{{changes}}})
     144
     14520. **MAKES_CHANGE** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{change_date_time*}}}__** (CHANGE))
     146
     14721. **MADE_ON** (**__{{{product_code*}}}__** (PRODUCT), **__{{{change_date_time*}}}__** (CHANGE))
     148
     14922. **WORKS_IN_STORE** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{store_ID*}}}__** (STORE))
     150
     15123. **WORKED** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{report_date*}}}__** (REPORT),  **__{{{store_ID*}}}__** (REPORT), {{{wage}}},  {{{pay_method}}}, ''{{{week}}}'', ''{{{total_week}}}'')
     152
     15324. **SELLS** (**__{{{product_code*}}}__** (PRODUCT), **__{{{store_ID*}}}__** (STORE), {{{discount}}})
     154
     15525. **INCLUDES** (**__{{{order_num*}}}__** (ORDER), **__{{{product_code*}}}__** (PRODUCT))
     156
     15726. **APPROVES** (**__{{{boss_ID*}}}__** (BOSS), **__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (REPORT), {{{owner_signature}}})
     158
     15927. **EXCHANGES_DATA** (**__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (STORE), {{{monthly_profit}}}, {{{date}}}, {{{sales}}}, {{{damages}}})
     160
     16128. **REFUND** (**__{{{refund_id}}}__**, {{{order_num*}}} (ORDER), {{{amount}}}, {{{reason}}}, {{{status}}})
    96162
    97163=== DDL Final Script ===