source: main/waeup.kofa/trunk/docs/source/userdocs/datacenter/intro.rst @ 16564

Last change on this file since 16564 was 12997, checked in by Henrik Bettermann, 10 years ago

More docs.

File size: 4.3 KB
Line 
1.. _datacenter_intro:
2
3Introduction
4************
5
6.. _object_database:
7
8The Object Database
9===================
10
11Most web portals store their data in a relational database like
12PostgreSQL, MySQL or Oracle. A relational database is organized in
13tables of rows and columns, with a unique key for each row. Each data
14entity gets its own table. Rows in tables can be linked to rows in
15other tables by storing the unique key of the row to which it should
16be linked. This sounds quite simple. Many computer users are familiar
17with this kind of data storage because they are used to spreadsheet
18programmes like Excel oder Calc which also organize data in tables.
19Kofa's persistent data are stored in a native object database designed
20for the Python programming language, the so-called ZODB_. An object
21database stores objects with attributes and not records as rows with
22columns in tables. These persistent objects can hold any kind of
23information in attributes and must not adhere to a specific schema
24like records in tables of a relational database.
25
26The ZODB_ also supports a hierarchical, treelike storage of objects.
27Objects can contain other objects if they are declared as containers.
28Objects are stored like folders and files in a filesystem. This makes
29the object handling very fast and transparent because we can access
30objects, or more precisely views of objects, by indicating their path
31in the database, i.e. by traversing the database tree to the object's
32location. Furthermore, we are accessing the views of objects through a
33web browser by entering a URL (Uniform Resource Locator). This
34publication path corresponds more or less to the traversal path of our
35objects. In Kofa the path always contains the object identifiers of
36all objects which are passed when traversing the database tree.
37Example:
38
39https://kofa-demo.waeup.org/students/K1000000/studycourse/100/DCO
40
41is the URL which requests a display view of a course ticket with id
42``DCO``. This object is stored in a study level container object with
43id ``100``, stored in a study course container object with id
44``studycourse``, stored in the student container object with id
45``K1000000``, stored in the students root container, stored in the
46root container of the application, stored in the root of the database
47itself.
48
49This kind of storage requires that each object gets a unique object
50identifier (object id) within its container. The id string is visible
51in the browser address bar. Though it's technically possible for ids
52to contain spaces or slashes we do not allow these kinds of special
53characters in object ids to facilitate the readability of URLs.
54
55Batch Processing
56================
57
58Administrators of web portals, which store their data in relational
59databases, are used to getting direct access to the portal's database.
60There are even tools to handle the administration of these databases
61over the Internet, like phpMyAdmin or phpPgAdmin to handle MySQL or
62PostgreSQL databases respectively. These user interfaces bypass the
63portals' user interfaces and give direct access to the database. They
64allow to easily import or export (dump) data tables or the entire
65database structure into CSV or SQL files. What at first sight appears
66to be very helpful and administration-friendly proves to be very
67dangerous on closer inspection. Data structures can be easily damaged
68or destroyed, or data can be easily manipulated by circumventing the
69portal's security machinery or logging system. Kofa does not provide
70any external user interface to access the ZODB_ directly, neither for
71viewing nor for editing data. This includes also the export and import
72of sets of data. Exports and imports are handled via the Kofa user
73interface itself. This is called batch processing which means either
74producing CSV files (comma-separated values) from portal data (export)
75or processing CSV files in order to add, update or remove portal data
76(import). Main premise of Kofa's batch processing technology is that
77the data stored in the ZODB_ can be specifically backed up and
78restored by exporting and importing data. But that's not all. Batch
79processors can do much more. They are an integral part of the student
80registration management.
81
82.. note::
83
84  Although exporters are part of Kofa's batch processing module, we will
85  not call them batch processors. Only importers are called batch
86  processors. Exporters produce CSV files, importers process them.
87
88
89.. _ZODB: http://www.zodb.org/
Note: See TracBrowser for help on using the repository browser.