doc/book/en/B0010-define-schema.en.txt
author Sandrine Ribeau <sandrine.ribeau@logilab.fr>
Tue, 23 Dec 2008 13:38:02 -0800
changeset 291 87c8d96f6173
parent 287 adbf9a24c41e
child 292 2d9e83c34b23
permissions -rw-r--r--
[doc] Renaming for advanced thematic.
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
101
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     3
Data model definition (*schema*)
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     4
================================
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     5
101
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     6
The schema is the core piece of a `CubicWeb` application as it defines
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     7
the data model handled. It is based on entities types already defined
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     8
in the `CubicWeb` standard library and others, more specific, we would 
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     9
expect to find in one or more Python files under the `schema` directory.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    10
101
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    11
At this point, it is important to make clear the difference between
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    12
relation type and relation definition: a relation type is only a relation
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    13
name with potentially other additionnal properties (see XXXX), whereas a 
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    14
relation definition is a complete triplet 
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    15
"<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
    16
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
    17
relation definition of the schema.
c9138325b89f [doc] Initial translation for data model chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    18
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    19
127
ae611743f5c6 [doc] divided book in parts
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 113
diff changeset
    20
.. include:: B021-schema-stdlib.en.txt
ae611743f5c6 [doc] divided book in parts
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 113
diff changeset
    21
.. include:: B022-schema-definition.en.txt
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    22