wiki:RelationalDesign

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

Релациска шема

  • BOLD=not null
  • Underline = Primary Key
  • * - takes from

  • Faculty(FacultyID,CityID*(City),Fname)
  • Building(BuildingID,CityID*(City),Building_Adress)
  • City(CityID,CityName)
  • Apartment(ApartmentID, BuildingID*(Building),UserID*(Owner),Apartment_FloorAndRoomNumber,Size)
  • ApartmentAgreement(AgreementID, ApartmentID*(Apartment),UserID*(Owner), Date_Signed,Date_Expires,ApartmentRent)
  • User(UserID,Name,Surname,Password,Phone_Number,City_of_Residency)
  • Post(PID, CityID*(City), Num_Roomates, Price, Date_Posted, Description)
  • Apartment_photos(PostID*(OwnerPost),Apartment_photos)
  • Admin(UserID*(User), Role)
  • Owner(UserID*(User))
  • Student(UserID*(User),FacultyID*(Faculty),Age,Gender)
  • StudentPost(PID*(Post),UserID*(Student))
  • OwnerPost(PID*(Post), ApartmentID*(Apartment),UserID(Owner))
  • Moderates_Posts_For(CityID*(City),UserID*(Admin))
  • Student_Signs(UserID*(Student),AgreementID*(Agreement))

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

kreiranjenew.sql

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

vnesuvanjenew.sql

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

Last modified 16 months ago Last modified on 07/10/23 18:04:20

Attachments (12)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.