Database is one thing In-Portal can't live without. That's why it's important to keep it as clean and understandable as possible, especially during times, when we constantly adding/removing fields/tables from it.
Recently I needed to search for "Type" field I added to one of the tables. I was very surprised to find, that a lot of database tables share exactly same field name resulting in a lot of results and no way to automatically find all needed usages.
Right now we use pascal case scheme in naming tables and fields in database, e.g.
This works perfectly, but for fields with more general names, like "Type", "Status" and so on I'm proposing to add something specific to identify connecting with corresponding database table.
- Type for users will become UserType
- Type for orders will become OrderType
Following this logic CreatedById field should be renamed to OrderCreatedById, AffiliateCreatedById and so on, but I'm not sure this is good idea, since we don't rename or refactor these fields that much.