= ''Логички и физички дизајн'' == Релациска шема (со мапирачка трансформација) '''Регуларни ентитети:''' Login, User, Receptionist, Server, Guests, Chef, Prepared_Meal, Meal, Product, Payment, On_site, Online, Reservation, Villa, Service, Beverage, Rooms, Events, Activities * '''Примарни клучеви''': underline and bold * '''Надворешни клучеви''': bold, со ознака '''*''' * '''Not null атрибути''': bold * '''Останати атрибути''': без ознака 1. ''Reservation'' ('''__reservation_id__''', '''start_date''', '''end_date''', '''number_guests''', '''adults''', children, '''villa_id*''', '''payment_id*''', '''room_id*''') * '''*'''Референцира villa_id кон Villa * '''*'''Референцира payment_id кон Payment * '''*'''Референцира room_id од Rooms 2. ''Events'' ('''__event_id__''', '''event_type''', '''price''', '''number_of_interested_guests''') 3. ''Activities'' ('''__activity_id__''', '''activity_type''', '''price''', '''number_of_interested_guests''', '''activity_location''') 4. ''Rooms'' ('''__room_id__''', '''room_type''', '''price,availability''', '''villa_id*''') * '''*'''Референцира villa_id од Villa 5. ''Service'' ('''__service_id__''', '''service_type''', '''price''', '''user_id*''', '''room_id*''') * '''*'''Референцира user_id од Waiter * '''*'''Референцира room_id од Rooms 6. ''Payment'' ('''__payment_id__''', '''total_payment''', '''pay_date''', '''rec_id''', '''customer_id''', '''user_id*''') * '''*'''Референцира user_id од Guests 7. ''Villa'' ('''__villa_id__''', '''location''', '''name''', villa_view_type) 8. ''Beverage'' ('''__beverage_id__''', '''beverage_type''', '''price''') 9. ''Product'' ('''__product_id__''', '''number_of_products''', '''product_type''') 10. ''Meal'' ('''__meal_id__''', '''price''', '''meal_type''') 11. ''Log_in'' ('''__login_id__''', '''vreme_na_najava''' , '''user_id*''') * '''*'''Референцира user_id од User_table 12. ''User_table'' ('''__user_id__''', '''EMBG''', '''full_name''', '''address''', '''password''', '''username''', '''email''', '''phone_number''') 13. ''Waiter'' ('''__user_id*__''', '''shift''', '''salary''') * '''*'''Референцира user_id од User_table 14. ''Receptionist'' ('''__user_id*__''', '''shift''', '''salary''') * '''*'''Референцира user_id од User_table 15. ''Chef'' ('''__user_id*__''', '''shift''', '''salary''') * '''*'''Референцира user_id од User_table 16. ''Guests'' ('''__user_id*__''', '''passport_number''') * '''*'''Референцира user_id од User_table 17. ''Prepared_Meal'' ('''__prepared_meal_id__''', '''meal_id*''', '''user_id*''') * '''*'''Референцира meal_id од Meal * '''*'''Референцира user_id од Chef 18. ''On_Site'' ('''__payment_id*__''', '''currency''', '''payment_type''', '''user_id*''') * '''*'''Референцира user_id од Receptionist * '''*'''Референцира payment_id од Payment 19. ''Online'' ('''__payment_id*__''', '''card_number''') 20. ''reservation_for_events'' ('''__reservation_id*, event_id*__''') * '''*'''Референцира reservation_id од Reservation * '''*'''Референцира event_id од Event 21. ''reservation_for_activity'' ('''__reservation_id*, activity*_id''') * '''*'''Референцира reservation_id од Reservation * '''*'''Референцира activity_id од Activities 22. ''reservation_for_prepared_meal'' ('''__reservation_id*, (prepared_meal_id*, meal_id*)__''', '''quantity''') * '''*'''Референцира reservation_id од Reservation * '''*'''Референцира meal_id и prepared_meal_id од Prepared_Meal 23. ''service_for_beverages'' ('''__service_id*, beverage_id*__''', '''quantity''') * '''*'''Референцира service_id од Service * '''*'''Референцира beverage_id од Beverage 24. ''meal_made_of_product'' ('''__meal_id*,product_id*__''') * '''*'''Референцира meal_id од Meal * '''*'''Референцира product_id од Product 25. ''guests_make_reservation'' ('''__user_id*,reservation_id*__''') * '''*'''Референцира user_id од Guests * '''*'''Референцира reservation_id од Reservation 26. ''reservation_for_service'' ('''__service_id*, reserevation_id*__''') * '''*'''Референцира service_id од Service * '''*'''Референцира reservation_id од Reservation == Креирање на табели [attachment:DDL2.sql] == Полнење на пример податоци [attachment:DML2.sql] == Дијаграм [[Image(dijagram3.jpg)]]