I am developing a big data base, and from this situation I decided to think always twice at least on making decisions about the table and field layouts. My highest concern is about the primary keys.
I almost always use the table name
plus _id
to name those indexes. I do this way because when joining tables I do not get to worry about duplicated field names, because Delphi data base components give us the field as table_name.field_name
but just the field.
In the other hand, if we could have the same ID field name for every table, it is always easier to create one function to handle every table concerning to that index control.
Does anyone had a bad experience on choosing one of these database designs? Is it a good approach to repeat the name of the table on every field name?