We have SQL Server DWH server. It has dwh_raw, dwh_prod and so on databases with client data, business operations. Now there is a task to allocate new data - on employees, their salaries and so on.

Is it better to use a separate database or a separate shema inside dwh_raw database? Plus the dwh_raw database is daily copied to dev server, so if we use it, we need to provide security both on prod and dev servers

  • when it comes to new data (employees, salaries) and security, what exactly you need to do ? hide (mask, or encrypt) certain columns, tables ? so only users with proper permissions can view them ? or maybe hide (encrypt) them in such a way that even DBA would not be able to decrypt, only the application ? Commented Dec 12, 2023 at 11:45
  • @AlekseyVitsko I need to restrict access to only several logins. Moreover the database travles to another server everyday and this data actually doesn't need to travel.
    – George K
    Commented Dec 13, 2023 at 7:33

2 Answers 2


Personally I would say it is good old fashioned way to kept it in a different database or schema for tight security implementation.

If the tables are to be used in conjunction with the others tables relatively scarcely. That’s is if the data in itself is self contained a separate database will be the answer. If it is not then a schema or user could be enough.


When you need significant table structure in addition to what has been established already, which has administration/security requirements that are different from all the other data, those tables for the employee data want to be in a separate database to make the boundary between it and the rest of the data simpler and less error prone.

  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Dec 12, 2023 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.