Every table will have a name in plural representing the entity stored. It will be all lowercased. (eg. contacts)
For each table created will to have a 3-letter id to use as a prefix on every table's field. e.g. account table will have acc prefix, and the id field will be acc_id
These tables will be named as [table1]_[table2], and will have a 6 letter prefix which will consist of the concatenation of the prefix of both tables
Where xxxxxx is a table, and xxx its prefix:
Every table has to have and id field xxx_id, integer not null and autoincremental
If it applies, every table should have a name field, not null and varchar(50)
If there's only one reference to the table, fk field name should be xxx_yyy (integer, not null)
All records (except for N:M tables) will have a status fields, indicating if the records is live or soft deleted.
Where xxxxxx is table 1, and yyyyyyyy is table 2, and their prefixes are xxx and yyy:
Tables are divided in groups. By now:
The security tables will have the "security_" prefix in its table names and the "s" will be the first leter in their 3-letter prefix
If this feature is required in table, there has to be a field xxx_owner, integer, with the follwing values: