~ubuntu-branches/debian/jessie/sqlalchemy/jessie

« back to all changes in this revision

Viewing changes to examples/vertical/__init__.py

  • Committer: Package Import Robot
  • Author(s): Piotr Ożarowski, Jakub Wilk, Piotr Ożarowski
  • Date: 2013-07-06 20:53:52 UTC
  • mfrom: (1.4.23) (16.1.17 experimental)
  • Revision ID: package-import@ubuntu.com-20130706205352-ryppl1eto3illd79
Tags: 0.8.2-1
[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.

[ Piotr Ożarowski ]
* New upstream release
* Upload to unstable
* Build depend on python3-all instead of -dev, extensions are not built for
  Python 3.X 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
"""
2
2
Illustrates "vertical table" mappings.
3
3
 
4
 
A "vertical table" refers to a technique where individual attributes of an object are stored as distinct rows in a table.
5
 
The "vertical table" technique is used to persist objects which can have a varied set of attributes, at the expense of simple query control and brevity.   It is commonly found in content/document management systems in order to represent user-created structures flexibly.
 
4
A "vertical table" refers to a technique where individual attributes
 
5
of an object are stored as distinct rows in a table. The "vertical
 
6
table" technique is used to persist objects which can have a varied
 
7
set of attributes, at the expense of simple query control and brevity.
 
8
It is commonly found in content/document management systems in order
 
9
to represent user-created structures flexibly.
6
10
 
7
 
Two variants on the approach are given.  In the second, each row references a "datatype" which contains information about the type of information stored in the attribute, such as integer, string, or date.
 
11
Two variants on the approach are given.  In the second, each row
 
12
references a "datatype" which contains information about the type of
 
13
information stored in the attribute, such as integer, string, or date.
8
14
 
9
15
 
10
16
Example::