wiki:Logical and Physical Design - Database creation (with SQL Scripts)

Version 3 (modified by 201101, 22 months ago) ( diff )

--

Логички и физички дизајн

Релациска шема (со мапирачка трансформација)

Регуларни ентитети: 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 од Room
  2. Events(event_id, event_type, price, number_of_interested_guests)
  3. Activities(activity_id, activity_type, price, number_of_interested_guests, 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 од Server
    • *Референцира 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, password, username, user_id*)
    • *Референцира user_id од User
  12. User(user_id, EMBG, address, email, phone_number)
  13. Server(user_id*, shift, salary)
    • *Референцира user_id од User
  14. Receptionist(user_id*, shift, salary)
    • *Референцира user_id од User
  15. Chef(user_id*, shift, salary)
    • *Референцира user_id од User
  16. Guests(user_id*, passport_number)
    • *Референцира user_id од User
  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)
  1. reservation_for_events (reservation_id*, event_id*)
    • *Референцира reservation_id од Reservation
    • *Референцира event_id од Event
  2. reservation_for_activity(reservation_id*, activity*)
    • *Референцира reservation_id од Reservation
    • *Референцира activity_id од Activities
  3. reservation_for_prepared_meal(reservation_id*, (prepared_meal_id*, meal_id*), quantity)
    • *Референцира reservation_id од Reservation
    • *Референцира meal_id и prepared_meal_id од Prepared_Meal
  4. service_for_beverages(service_id*, beverage_id*, quantity)
    • *Референцира service_id од Service
    • *Референцира beverage_id од Beverage
  5. meal_madeof_product(meal_id*,product_id*)
    • *Референцира meal_id од Meal
    • *Референцира product_id од Product
  6. guests_make_reservation(user_id*,reservation_id*)
    • *Референцира user_id од Guests
    • *Референцира reservation_id од Reservation

Креирање на табели

Полнење на пример податоци

Дијаграм

Трансформација од ЕР Дијаграм во релациска шема

Attachments (6)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.