Skip to main content

Project Overview: Data Model

The Caché data model consists of a pair of tables: Contact and PhoneNumber. The tables contain information about contacts and their phone numbers. Here's a diagram representing the application's data model:

generated description: datamodel2

The Contact table contains the following three columns and one stored procedure:

  • ID — Primary key. Caché automatically assigns the value.

  • ContactType — Represents a contact's type. Valid values include only “Business” and “Personal”.

  • Name — Represents a contact's name. Value can by any VARCHAR.

  • InsertData — Stored procedure for inserting a row into the table. It defines ID, generated automatically by Caché, as an out parameter.

The PhoneNumber table contains the following four columns and one stored procedure:

  • Contact — Foreign key on the Contact table's ID column.

  • ID — Primary key. Caché automatically assigns the value.

  • PhoneNumberType — Represents a phone number's type. Valid values include only “Business”, “Home”, “Fax”, and “Mobile”.

  • Number — Represents a phone number. Value can be any VARCHAR.

  • InsertData — Stored procedure for inserting a row into the table. It defines ID, generated automatically by Caché, as an out parameter.

Note:

For instructions on locating and installing both the Caché application and .NET project see Example and Exercise Files. After installing the Caché application, populate it with sample data. For instructions on populating the application, see Installing Caché Classes and Populating the Database.

FeedbackOpens in a new tab