Changes between Version 2 and Version 3 of Logical and Physical Design - Database creation (with SQL Scripts)


Ignore:
Timestamp:
11/19/22 23:45:55 (22 months ago)
Author:
201101
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Logical and Physical Design - Database creation (with SQL Scripts)

    v2 v3  
    1 In progress...
     1= ''Логички и физички дизајн''
     2
     3== Релациска шема (со мапирачка трансформација)
     4'''Регуларни ентитети:''' Login, User, Receptionist, Server, Guests, Chef, Prepared_Meal, Meal, Product, Payment, On_site, Online, Reservation, Villa, Service, Beverage, Rooms, Events, Activities
     5
     6* '''Примарни клучеви''': underline and bold
     7* '''Надворешни клучеви''': bold, со ознака '''*'''
     8* '''Not null атрибути''': bold
     9* '''Останати атрибути''': без ознака
     10
     111. Reservation ('''__reservation_id__''', '''start_date''', '''end_date''', '''number_guests''', '''adults''', children, '''villa_id*''', '''payment_id*''', '''room_id*''')
     12        * '''*'''Референцира villa_id кон Villa
     13        * '''*'''Референцира payment_id кон Payment
     14        * '''*'''Референцира room_id од Room
     152. Events('''__event_id__''', '''event_type''', '''price''', '''number_of_interested_guests''')
     163. Activities('''__activity_id__''', '''activity_type''', '''price''', '''number_of_interested_guests''', '''location''')
     174. Rooms('''__room_id__''', room_type, price,availability, villa_id*)
     18        * '''*'''Референцира villa_id од Villa
     195. Service('''__service_id__''', '''service_type''', '''price''', '''user_id*''', '''room_id*''')
     20        * '''*'''Референцира user_id од Server
     21        * '''*'''Референцира room_id од Rooms
     226. Payment('''__payment_id__''', '''total_payment''', '''pay_date''', '''rec_id''', '''customer_id''', '''user_id*''')
     23        * '''*'''Референцира user_id од Guests
     247. Villa('''__villa_id__''', '''location''', '''name''', villa_view_type)
     258. Beverage('''__beverage_id__''', '''beverage_type''', '''price''')
     269. Product('''__product_id__''', '''number_of_products''', '''product_type''')
     2710. Meal('''__meal_id__''', '''price''', '''meal_type''')
     2811. Log in('''__login_id__''', '''password''', '''username''', '''user_id*''')
     29        * '''*'''Референцира user_id од User
     3012. User('''__user_id__''', '''EMBG''', '''address''', '''email''', '''phone_number''')
     3113. Server('''__user_id*__''', '''shift''', '''salary''')
     32        * '''*'''Референцира user_id од User
     3314. Receptionist('''__user_id*__''', '''shift''', '''salary''')
     34        * '''*'''Референцира user_id од User
     3515. Chef('''__user_id*__''', '''shift''', '''salary''')
     36        * '''*'''Референцира user_id од User
     3716. Guests('''__user_id*__''', '''passport_number''')
     38        * '''*'''Референцира user_id од User
     3917. Prepared_Meal('''__prepared_meal_id__''', '''meal_id*''',  '''user_id*''')
     40        * '''*'''Референцира meal_id од Meal
     41        * '''*'''Референцира user_id од Chef
     4218. On_Site('''__payment_id*__''', '''currency''', '''payment_type''', '''user_id*''')
     43        * '''*'''Референцира user_id од Receptionist
     44        * '''*'''Референцира payment_id од Payment
     4519. Online('''__payment_id*__''',  '''card_number''')
     46
     4720. reservation_for_events ('''__reservation_id*, event_id*__''')
     48        * '''*'''Референцира reservation_id од Reservation
     49        * '''*'''Референцира event_id од Event
     5021. reservation_for_activity('''__reservation_id*, activity*__''')
     51        * '''*'''Референцира reservation_id од Reservation
     52        * '''*'''Референцира activity_id од Activities
     5322. reservation_for_prepared_meal('''__reservation_id*, (prepared_meal_id*, meal_id*)__''', '''quantity''')
     54        * '''*'''Референцира reservation_id од Reservation
     55        * '''*'''Референцира meal_id  и prepared_meal_id од  Prepared_Meal
     5623. service_for_beverages('''__service_id*, beverage_id*__''', '''quantity''')
     57        * '''*'''Референцира service_id од Service
     58        * '''*'''Референцира beverage_id од Beverage
     5924. meal_madeof_product('''__meal_id*,product_id*__''')
     60        * '''*'''Референцира meal_id од Meal
     61        * '''*'''Референцира product_id од Product
     6225. guests_make_reservation('''__user_id*,reservation_id*__''')
     63        * '''*'''Референцира user_id од Guests
     64        * '''*'''Референцира reservation_id од Reservation
     65
    266
    367== Креирање на табели
     
    973== Трансформација од ЕР Дијаграм во релациска шема
    1074
    11 = MAPIRACKA TRANSFORMACIJA