SQL Server 2008 Schema Naming Conventions

I am creating a completely new database without any outdated restrictions, so I wonder what the best schema methods are.

The database will be called "SecurityData". It stores information about bonds.

I have already defined the following pattern:

  • import - types and processes that are really associated with server calls to other databases.
  • export - Views and procs intended for use by other databases
  • staging - Tables used for bulk inserts so that we can check and clear data.
  • ??? - real tables containing useful data.
  • history - change log for real tables

Questions:

  • Am I going crazy crazy or does it make sense?
  • Should I use dbo for my "real tables" or should I avoid this scheme as it usually becomes a garbage dump?
+4
source share
1 answer

Schemes serve two purposes:

  • security containers. Grants / rejection / cancellation of the scheme apply to all objects of the scheme. Separating related security objects in shcema simplifies maintenance and access control.
  • namespaces. Qualifying object names using schemas can reduce the likelihood of conflict with names used by other applications and even other modules in your own application.

So my question is: why do you want to use circuits in the first place? I’m not saying that you shouldn’t do this, but I want to understand what are the advantages of the circuitry that you are most concerned with. If you know the answer to this question, then you will know how many circuits you need and what these circuits are. Of course, the answer may be a mixture of the two reasons that I give at the beginning, this is normal. In this case, you may find that the meaning from the point of view of the namespace is a disaster from a security point or view, or vice versa.

I myself used separate schemas the way you plan, and soley to program the benefits of a namespace. during development, he helped me see, precisely on behalf of the object, where the application logically belongs to it.

+4
source

Source: https://habr.com/ru/post/1300481/


All Articles