60 likes | 187 Views
Functional Data Models. Entities Relationships Inheritance Functional Query Languages. Staff() → ENTITY PropertyForRent() → ENTITY staffNo(Staff) → STRING sex(Staff) → CHAR salary(Staff) → REAL Name() → ENTITY Name(Staff) → NAME fName(Name) → STRING lName(Name) → STRING. Entities.
E N D
Functional Data Models • Entities • Relationships • Inheritance • Functional Query Languages
Staff() → ENTITY PropertyForRent() → ENTITY staffNo(Staff) → STRING sex(Staff) → CHAR salary(Staff) → REAL Name() → ENTITY Name(Staff) → NAME fName(Name) → STRING lName(Name) → STRING Entities
Manages(Staff) PropertyForRent ManagedBy(PropertyForRent) → Staff INVERSE OF Manages Views(Client) PropertyForRent ViewedBy(PropertyForRent) Client INVERSE OF Views Relationships
Staff() → ENTITY Supervisor() → ENTITY IS-A-STAFF(Supervisor) → Staff fName(Staff) → fName(Name(Staff)) fName(Supervisor) → fName(IS-A-STAFF(Supervisor)) Inheritence
RETRIVE lName(Name(ViewedBy(Manages(Staff)))) WHERE staffNo(Staff) = 'SG14' RETRIVE Staff.Manages.ViewedBy.Name.lName WHERE Staff.staffNo = 'SG14' Functional Query Languages
SELECT c.lName FROM Staff s, PropertyForRent p, Viewing v, Client c WHERE s.staffNo = p.staffNo AND p.propertyNo = v.propertyNo AND v.clientNo = c.clientNo AND s.staffNo = 'SG14' SQL version