views:

22

answers:

1

Our project constitutes of many modules (e.g. a HR management system containing modules like attendance, identity, reports ...)

What would be a good naming convention for all the tables represented here..

Would you suggest having the same prefix for all modules (e.g. hrms_ide_user, hrms_rep_reports ..) OR something like ide_user, rep_reports ...

Our product intends to support all the major databases (Oracle, DB2, MySQL, Postgres). So I would like to be careful with table or column limitations if any.

+1  A: 

Using the same prefix (i.e. hrms) on all tables is reduandancy, and is only useful if the database will be shared.

If the modules are plugin and very fluid it may be wise to prefix the tables, but if you can avoid prefixing I think it keeps the design easier to read.

I've worked with prefixed and non-prefixed and I prefer non-prefixed as it tends to lead to a better design (avoiding rep_user and ide_user storing similar data).

If you do have prefixes I would agree that these should be a fixed number of characters and ideally related to a system or subsystem ID.

A final point is that I think it's wise to not mix plural table names with singular - use one or the other according to your preference. (i.e. users and reports or user and report).

Richard Harrison
I do agree that a common prefix adds to redundant information tagged onto table names. We don't use pluarl table names, we go with singular names every where
Samuel
I only mentioned the singular names because of the example that said "hrms_ide_user, hrms_rep_reports" which implied differently.
Richard Harrison
thanks for clarifying, just noticed the difference.
Samuel