Are there any tools to check the database schema for a set of design rules, naming conventions, etc.
I'm not talking about comparing one database with another (as described by this question ).
I want to say: "What does not match this set of rules in this database."
Some examples of the type of rules I'm talking about will be:
- Primary key fields should be the first in the table.
- Foreign keys must have an index in this field.
- Field names ending in "xxx" must be of a specific type.
- Fields with a restriction restricting it to certain values ββmust have a default value.
I wrote several scripts for this in the past and wondered if there was anything in common.
Ideally, I would like something for SQL Server, but if you know something for other databases, it might be useful to learn about them too.
source share