All of the examples I found had only 2 declarations such as name and date OR members and telephone
. However, my scenario is this :
I would like to create a Z schema called AppointmentDB. AppointmentDB keeps appointments details such purpose, attendees and schedule
My take (EDITED):
There are 5 declarations and 1 predicate
|--AppointmentDB----------------
|attendees : P Person
|appointments : P APPOINTMENT
|hasAppointment : Person ↔ APPOINTMENT
|schedule : APPOINTMENT → DateTime
|purpose : APPOINTMENT → Report
|-----------------------------
|attendees ⊆ dom(hasAppointment)
|-----------------------------
As you can see, I'm trying to link the APPOINTMENT to all its other attributes. Is my schema correct or complete or how can I optimize it further? Also, how do I know which relation should I consider from the relation to define inside the predicate part?