doc/book/en/B0010-define-schema.en.txt
author sylvain.thenault@logilab.fr
Fri, 17 Apr 2009 09:37:29 +0200
branchtls-sprint
changeset 1389 ae58c2e7e1f7
parent 1205 79d33f7db590
permissions -rw-r--r--
clear label handling
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     1
.. -*- coding: utf-8 -*-
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     2
1205
79d33f7db590 [doc] some more small improvements
Emile Anclin <emile.anclin@logilab.fr>
parents: 1163
diff changeset
     3
Data model definition: the *schema*
79d33f7db590 [doc] some more small improvements
Emile Anclin <emile.anclin@logilab.fr>
parents: 1163
diff changeset
     4
===================================
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     5
1205
79d33f7db590 [doc] some more small improvements
Emile Anclin <emile.anclin@logilab.fr>
parents: 1163
diff changeset
     6
The **schema** is the core piece of a `CubicWeb` application as it defines
79d33f7db590 [doc] some more small improvements
Emile Anclin <emile.anclin@logilab.fr>
parents: 1163
diff changeset
     7
the handled data model. It is based on entity types that are either already
1163
232aef110a0a doc improvements; typos
Emile Anclin <emile.anclin@logilab.fr>
parents: 292
diff changeset
     8
defined in the `CubicWeb` standard library; or more specific types, that 
232aef110a0a doc improvements; typos
Emile Anclin <emile.anclin@logilab.fr>
parents: 292
diff changeset
     9
`CubicWeb` expects to find in one or more Python files under the directory 
232aef110a0a doc improvements; typos
Emile Anclin <emile.anclin@logilab.fr>
parents: 292
diff changeset
    10
`schema`.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    11
101
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    12
At this point, it is important to make clear the difference between
1163
232aef110a0a doc improvements; typos
Emile Anclin <emile.anclin@logilab.fr>
parents: 292
diff changeset
    13
*relation type* and *relation definition*: a *relation type* is only a relation
101
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    14
name with potentially other additionnal properties (see XXXX), whereas a 
1163
232aef110a0a doc improvements; typos
Emile Anclin <emile.anclin@logilab.fr>
parents: 292
diff changeset
    15
*relation definition* is a complete triplet 
101
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    16
"<subject entity type> <relation type> <object entity type>". 
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    17
A relation type could have been implied if none is related to a 
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    18
relation definition of the schema.
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    19
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    20
292
2d9e83c34b23 [doc] Renaming of part II sub-sections accordingly.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 287
diff changeset
    21
.. include:: B0011-schema-stdlib.en.txt
2d9e83c34b23 [doc] Renaming of part II sub-sections accordingly.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 287
diff changeset
    22
.. include:: B0012-schema-definition.en.txt
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    23