Skip to main content

Data Model

The Caché data model for Zen Contacts consists of three classes ZenTutorial.Contact, ZenTutorial.Address, and ZenTutorial.PhoneNumber. The classes store information about contacts and their phone numbers. Here is a diagram depicting the two classes:

generated description: datamodel

ZenTutorial.Contact contains the following properties:

  • ID – The database id.

  • Name – Represents the name of a contact.

  • ContactType – Represents the type of the contact. Possible values are restricted to “Business” and “Personal”.

  • Address1 – Represents the address of the contact. Address1 is of type ZenTutorial.Address which has the following properties:

    • Street – Represents a street address.

    • City – Represents a city name.

    • State – Represents an abbreviated US state name. The maximum length is two characters.

    • Zip – Represents a US Zip code. The maximum length is five characters.

    ZenTutorial.Address is an embedded or serial class. This means that within the database instances of the class can exist only within instances of other classes.

ZenTutorial.PhoneNumber contains the following properties:

  • ID – The database id.

  • Contact – The database id of the associated Contact.

  • Number – Represents a phone number.

  • PhoneNumberType – Represents the type of the phone number. Possible values are restricted to “Home”, “Office”, and “Mobile”.

ZenTutorial.Contact and ZenTutorial.PhoneNumber form a parent-child relationship. Each Contact can be related to many PhoneNumber. Each PhoneNumber is related to exactly one Contact.


To learn more about serial classes, read Introduction to Serial Objects in Defining and Using Object-Valued Properties section of Using Caché Objects.

To learn more about parent-child relationships, read Relationships in Using Caché Objects.

FeedbackOpens in a new tab