The EuroCMS Databases

AuthorVersionDate
Imri Paloja131-05-2022

The EuroCMS database structure

This is the default structure of the EuroCMS database tables.

{tablename}_iddomain_iduser_idgroup_id............user_lockstatus
1[0-9][0-9][0-9]1enabled
2[0-9][0-9][0-9]nulldisabled
3[0-9][0-9][0-9]nullenabled
  • {tablename}_id: [0-9] - required; auto increment, not empty

If the table name is Files with an S, plural, the ID name would be file_id, singular. If the table name is singular, content, the ID name should also be content_id.

  • domain_id: [0-9] - required

The ID of the domain that is currently being visited.

  • user_id: [0-9] - required

The ID of the user that created the row.

  • group_id: [0-9] - required

The ID of the group that has access to this row of data.

  • ...
  • Everything in between can be anything that the developer wants it to be.
  • ...
  • user_lock: [0-9] - required

This needs to exists, but doesn't have to be used.

IDs of users that are able to modify this data. When to many user are in the group that can edit the data, and you want to only allow certain users, you can use the user lock.

  • status: enabled/disabled - required

Disable or enable this row. You can add different type of status items in here.

Databases

For now the supported database software:

  • MariaDB (main)
  • SQLite (secondary)

For local/intranet type setup.

  • PostgreSQL (tertiary) - future work

Later on, if the users require it, other Database software may be supported.

All databases that could be supported are listed on the PHP website: https://www.php.net/manual/en/refs.database.vendors.php

MariaDB

MariaDB is the main supported DB software.

SQLite

The SQLite database is the second supported db software.

Links

  1. https://www.php.net/manual/en/sqlite3.query.php
  2. https://www.php.net/manual/en/book.sqlite3.php