Catlair
Catlair is a concept of distributed database system. The content management system (CMS) is created on this concept.
CMS Catlair compiles Web content using specific tag, based on XML sintaxis.
Software conditions
-
Linux (ubintu, debian) - as operation system;
-
nginx - for web server;
-
php - for script.
-
MySQL or file system - for datasource.
Architecture
Data model
The scheme demonstrates the data model of Catlair.
The model is based on fundamental task of remote database sources synchronization and replication. General structure is redused to maximaly lightened index of entities. It only contains the entity Identifer. All tables refer to this Identifer. The tables are created not on the basis of various entities storing, but on the basis of functional purpose. System information storages, user information storages and content are based around the entity table. This approach allows to implement the most unified data storage environment.
Definitions
-
Descript - is an etity, concept, object of the real world, reflected in data model, possessing unique identifer, throughout Catlair databases space. It defined by unique identifer in all Catlair databases. Identifies with equal values in diferent databases define completely equal objects.
-
Site - is a practical aim for Descript group. A task, a web site, and etc. can be a Site. The same Descript may have different properties for different Sites.
Tables
All Identifer are contained in 16-byte binary fields. (*) is a primary key. (i) - index or compound index.
-
Descript - the main 3NF table with a list of essences as Accounts, Sites, Contents, Type contents etc. Contain only descript ID. It can be a human read idetify, guid or udid. Identifers in Descript must be unique in univerce. Идентфикаторы с одинаковым значением в разных базах определяют полностью идентичные объекты. Это означает что при миграции данных система будет воспринимать записи с одинаковым идентификатором как один и тот же объект.
-
Config - system parmeters for descript. Together with Descript table they form a "Descript Core". Config record can exists without Descript record and vice versa too.
-
Bind - table binds between descript. It table contain descript relations like heracly, folders, rights and other.
-
Content - this table contein text and other content in different languages. It is main storage for html, js, text, binary data.
-
Params - it is table with user's data in JSON, specific for IDSite. Each Descript can have many Params record for any sites.
-
History - table with momtnts and persons, whos inputed changes in to tabsle. Firs record for IDRecord+TableName will be a insert action. This is last table of "Descript Carier".
-
App data section - contains any tables, joyrnals, chaches for user's data. They can refer to Descript table by ID.
Referention intgrity
Catlair data model do not use referential integrity, becous all objects can exists without other objects. It is fundamentally. Any records may be exist without dependens. Referention integrity на уровне базы данных по идентификатором полностью исключена в связи с необходимостью произвольной миграции данных. Общая концепция сводится к тому, что обработка данных данных подразумевает возможность частичного их отсутствия, удаления замещения в произвольный момент времени.
Data architecture
-
Specific data API is a list of modules containing specific CRUD methods for different data sources, like TMySQL, TPostgreeSQL etc.
-
TDataCore - the object that contains main methods for CRUD and databases manipulation.