| | 96 | |
| | 97 | === Tables === |
| | 98 | |
| | 99 | 0. **CATEGORY** (**__{{{id}}}__*** , {{{name}}}, {{{parent_category_id*}}}) |
| | 100 | |
| | 101 | 1. **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 | |
| | 106 | 2. **IMAGE** (__**{{{product_code*}}}**__ (PRODUCT), __**{{{image}}}**__) |
| | 107 | |
| | 108 | 3. **COLOR** (**__{{{product_code*}}}__** (PRODUCT), **__{{{color}}}__**) |
| | 109 | |
| | 110 | 4. **STORE** (**__{{{store_ID}}}__**, {{{name}}}, {{{date_of_founding}}}, {{{physical_address}}}, {{{store_email}}}, {{{rating}}}) |
| | 111 | |
| | 112 | 5. **PERSONAL** (**__{{{id}}}__**, ''{{{first_name}}}'', ''{{{last_name}}}'', {{{ssn}}}, {{{email}}}, {{{password}}}) |
| | 113 | * permissions (complex, multi-valued attribute, see table **PERMISSIONS**) |
| | 114 | |
| | 115 | 6. **PERMISSIONS** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{type}}}__**, {{{authorisation}}}) |
| | 116 | |
| | 117 | 7. **BOSS** (**__{{{boss_ID*}}}__** (PERSONAL)) |
| | 118 | |
| | 119 | 8. **EMPLOYEES** (**__{{{employee_ID*}}}__** (PERSONAL), {{{date_of_hire}}}) |
| | 120 | |
| | 121 | 9. **CLIENT** (**__{{{client_ID}}}__**, ''{{{first_name}}}'', ''{{{last_name}}}'', {{{email}}}, {{{password}}}) |
| | 122 | * delivery_address (multi-valued attribute, see table **DELIVERY_ADDRESS**) |
| | 123 | |
| | 124 | 10. **DELIVERY_ADDRESS** (**__{{{client_ID}}}__** (CLIENT), **__{{{address}}}__**, {{{city}}}, {{{postcode}}}, {{{country}}}, {{{is_default}}}) |
| | 125 | |
| | 126 | 11. **ORDER** (**__{{{order_num}}}__**,{{{client_ID*}}} (CLIENT), {{{quantity}}}, {{{status}}}, {{{last_date_mod}}}, {{{payment_method}}}, {{{discount}}}) |
| | 127 | |
| | 128 | 12. **REPORT** (**__{{{date}}}__**, **__{{{store_ID*}}}__** (STORE), {{{overall_profit}}}, {{{sales_trend}}}, {{{marketing_growth}}}, {{{owner_signature}}}) |
| | 129 | * monthly_profit (multi-valued attribute, see table **MONTHLY_PROFIT**) |
| | 130 | |
| | 131 | 13. **MONTHLY_PROFIT** (**__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (REPORT), {{{month_and_year}}}, {{{profit}}}) |
| | 132 | |
| | 133 | 14. **REQUEST** (**__{{{request_num}}}__**, {{{date_and_time}}}, {{{problem}}}, {{{notes_of_communication}}}, {{{costumer_satisfaction}}}) |
| | 134 | |
| | 135 | 15. **MAKES_REQUEST** (**__{{{client_ID*}}}__** (CLIENT), **__{{{order_num*}}}__** (ORDER)) |
| | 136 | |
| | 137 | 16. **ANSWERS** (**__{{{request_num*}}}__** (REQUEST), **__{{{personal_ID*}}}__** (PERSONAL)) |
| | 138 | |
| | 139 | 17. **FOR_STORE** (**__{{{request_num*}}}__** (REQUEST), **__{{{store_ID*}}}__** (STORE)) |
| | 140 | |
| | 141 | 18. **REVIEW** (**__{{{order_num*}}}__** (ORDER), {{{comment}}}, {{{rating}}}, {{{last_mod_date}}}) |
| | 142 | |
| | 143 | 19. **CHANGE** (**__{{{date_and_time}}}__**, **__{{{product_code*}}}__** (PRODUCT), {{{changes}}}) |
| | 144 | |
| | 145 | 20. **MAKES_CHANGE** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{change_date_time*}}}__** (CHANGE)) |
| | 146 | |
| | 147 | 21. **MADE_ON** (**__{{{product_code*}}}__** (PRODUCT), **__{{{change_date_time*}}}__** (CHANGE)) |
| | 148 | |
| | 149 | 22. **WORKS_IN_STORE** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{store_ID*}}}__** (STORE)) |
| | 150 | |
| | 151 | 23. **WORKED** (**__{{{personal_ID*}}}__** (PERSONAL), **__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (REPORT), {{{wage}}}, {{{pay_method}}}, ''{{{week}}}'', ''{{{total_week}}}'') |
| | 152 | |
| | 153 | 24. **SELLS** (**__{{{product_code*}}}__** (PRODUCT), **__{{{store_ID*}}}__** (STORE), {{{discount}}}) |
| | 154 | |
| | 155 | 25. **INCLUDES** (**__{{{order_num*}}}__** (ORDER), **__{{{product_code*}}}__** (PRODUCT)) |
| | 156 | |
| | 157 | 26. **APPROVES** (**__{{{boss_ID*}}}__** (BOSS), **__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (REPORT), {{{owner_signature}}}) |
| | 158 | |
| | 159 | 27. **EXCHANGES_DATA** (**__{{{report_date*}}}__** (REPORT), **__{{{store_ID*}}}__** (STORE), {{{monthly_profit}}}, {{{date}}}, {{{sales}}}, {{{damages}}}) |
| | 160 | |
| | 161 | 28. **REFUND** (**__{{{refund_id}}}__**, {{{order_num*}}} (ORDER), {{{amount}}}, {{{reason}}}, {{{status}}}) |