THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Buck Woody

Carpe Datum!

Use Those Schemas, People!

Database Schemas are just containers – they aren’t users or anything else – think of a sub-directory on the hard drive. In early versions of SQL Server we “hid” schemas, placing all objects under “dbo”, which gave the erroneous perception that Schemas are users.

In SQL Server 2005, we “un-hid” or re-introduced schemas within the database. Users can have a default schema (a place where their new objects go), you can add new schemas and transfer objects between them, and they have many other benefits.

But I still see a lot of applications, developed by shops I know as well as vendors, that don’t make use of a Schema. Everything is piled under dbo. I completely understand this – since permissions can be granted to a schema, they feel a lot like a user, so it’s just easier not to worry about both users and schemas when you create a database. But if you’ll use them properly you can make your application more understandable and portable.

You should at least take a few minutes and read more about them – you owe it to your users:

Published Tuesday, May 18, 2010 6:39 AM by BuckWoody



DT1984 said:

No thanks - I've found schemas to not only be not very useful, but a hinderance....

May 18, 2010 10:02 AM

BuckWoody said:

May 18, 2010 10:09 AM

Adam Machanic said:

Good, he can be ignored :-)

May 18, 2010 10:12 AM

BuckWoody said:

DT1984 - Thanks for the comment and for reading!

I think that's the great thing about Microsoft products - you don't HAVE to do it this way. You have all the flexibility in the world.

May 18, 2010 10:19 AM

James Luetkehoelter said:

Personally, I find them useful if used by a DBA, a hinderence if used by development...

May 18, 2010 12:15 PM

Alexander Kuznetsov said:

I use schemas to simplify granting permissions. For tables and views, I have three schemas: Data, the

May 18, 2010 2:35 PM
New Comments to this post are disabled

About BuckWoody

This Blog


Privacy Statement