wiki:RelationalDesign

Version 8 (modified by 191151, 3 years ago) ( diff )

--

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

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

Ознаки

  • примарни клучеви: bold и underline
  • надворешни клучеви: * до името на надворешниот клуч, во заграда табелата кон која покажува
  • not null атрибути: bold

Табели

  • Users (id, email, username, password, full_name, created_at, updated_at, deleted_at, email_verified_at, profile_picture, last_login_at, last_login_ip, user_agent, type)
  • Managers (user_id*(Users))
  • Organizers (user_id*(Users), city, country, stripe_id, card_brand, card_last_four, trial_ends_at)
  • Artists (user_id*(Users), birth_date, city, country, short_description, price_per_hour, Instagram_link, soundcloud_link, apple_music_link, youtube_link, spotify_link, manager_id*(Users), artist_type_id*(Artist_Types))
  • Artist_Types (id, name)
  • Manager_Invites (id, email, name, invitation_token, created_at, updated_at, registered_at, artist_id*(Users))
  • Genres (id, name)
  • Events (id, created_at, updated_at, slug, city, country, title, end_time, start_time, event_date, description, event_type_id*(Event_Types), organizer_id*(Users))
  • Event_Types (id, name)
  • Offers (id, slug, price, payment_type, status, created_at, updated_at, completed_at, artist_id*(Users), event_id*(Events))
  • Offer_comments (id, content, created_at, updated_at, author_id*(Users), offer_id*(Offers))
  • Transactions (id, name, stripe_id, stripe_status, stripe_plan, quantity, trial_ends_at, ends_at, created_at, updated_at, offer_id*(Offers))
  • Artist_Images (id, path, created_at, updated_at, artist_id*(Users))
  • Reviews (id, rating, content, created_at, organizer_id*(Users), artist_id*(Users))
  • Artist_sings_genres (artist_id*(Users), genre_id*(Genres))

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

kreiranje.sql

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

polnenje.sql

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

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.