wiki:RelationalDesign

Version 3 (modified by 201094, 2 years ago) ( diff )

--

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

Ознаки

  • Примарните клучеви се означени со bold и underline
  • Надворешните клучеви се означени со *,#,%,&
  • Задолжителни атрибути, односно not null со bold

Табели

  • users (ID_user, username, password, first_name, last_name, address, contact_number, date_created)
  • workers(ID_worker*(users), position, work_hours_from, work_hours_to, ID_cinema#(cinemas))
  • customers(ID_customer*(users), points)
  • salaries(ID_salary, sum, date_from, date_to, ID_worker*(Workers))
  • films(ID_film, name, duration, actors, genre, age_category, director, description, release_date)
  • cinemas(ID_Cinema, name, location)
  • events(ID_event, theme, duration, repeating, start_dates)
  • projections(ID_projection, date_time_start, type_of_technology, date_time_end, ID_film**(Films), ID_discount#(Discounts), ID_event%(Events))
  • tickets(ID_ticket, price , ID_customer*(Customer), ID_projection&(Projections), ID_discount#(Discounts), ID_seat%(Seats))
  • discounts(ID_discount, validity, code, type, percent)
  • seats(ID_seat, seat_number, ID_room*(Projection_Rooms) , ID_category&(Categories))
  • projection_rooms(ID_room, number_of_seats ,projection_room_number, ID_cinema*(Cinemas))
  • categories(ID_category, name, extra_amount)

DDL скрипта за бришење на табелите и креирање на табелите

kreiranje_v2.sql

DML скрипта за полнење на табелите со податоци

polnenje_v2.sql

Релациски дијаграм изваден од DBeaver

No image "schema_v2.png" attached to RelationalDesign

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.