Building blocks of the data model
The data model defines the data in your application. The structure of the data in your application is the most important property of a succesful application.
There are 4 types of building blocks in this group
- Classes
- Fields
- Relations
- Filters
If you are new to concepts like a data model, classes and relations, you might want to take a look at the basic concepts page.
Classes
Classes describe the things you want to store data about, and are at the core of your application. Common examples of classes are:
- person
- product
- company
- order
Please note that class names are always in singular and start with a lower case. The class name should identify a single thing, It should not be the name of a collection. Correct class names are book, person, product.
Fields
Fields are the properties of a class. A person has a first name and a last name, while an order has a date, a customer and a delivery address.
A field always belong to a class. It has a name and a data type. A data type defines the type of data that can be stored in a field. Commonly used types are: text, memo, whole number, yes/no, etc.
A field can have fixed values, e.g. a field gender that can only contain 2 values: male and female.
Relations
Data is always related. A person owns a product, or works for a company. Here you can define these relations.
Filters
In almost any application it is important to be able to use subsets of data. In some cases you only need the adults, or the children, or the males, or the people that are unemployed, et cetera, instead of all the records in your database.