2 |
2 |
3 Data model definition (*schema*) |
3 Data model definition (*schema*) |
4 ================================ |
4 ================================ |
5 |
5 |
6 The schema is the core piece of a `CubicWeb` application as it defines |
6 The schema is the core piece of a `CubicWeb` application as it defines |
7 the data model handled. It is based on entities types already defined |
7 the data model handled. It is based on entity types that are either already |
8 in the `CubicWeb` standard library and others, more specific, we would |
8 defined in the `CubicWeb` standard library; or more specific types, that |
9 expect to find in one or more Python files under the `schema` directory. |
9 `CubicWeb` expects to find in one or more Python files under the directory |
|
10 `schema`. |
10 |
11 |
11 At this point, it is important to make clear the difference between |
12 At this point, it is important to make clear the difference between |
12 relation type and relation definition: a relation type is only a relation |
13 *relation type* and *relation definition*: a *relation type* is only a relation |
13 name with potentially other additionnal properties (see XXXX), whereas a |
14 name with potentially other additionnal properties (see XXXX), whereas a |
14 relation definition is a complete triplet |
15 *relation definition* is a complete triplet |
15 "<subject entity type> <relation type> <object entity type>". |
16 "<subject entity type> <relation type> <object entity type>". |
16 A relation type could have been implied if none is related to a |
17 A relation type could have been implied if none is related to a |
17 relation definition of the schema. |
18 relation definition of the schema. |
18 |
19 |
19 |
20 |