正文

schemas vs owners vs users

(2014-07-28 08:20:38) 下一个
Owner is the creater.
User is the user account under a certain db.
schema is a container for organizing the objects.
schemas vs users
dbo-- 1. db owner;  2. user account: dbo; 3. schema: dbo
dbo.tblPerson -- here dbo is referred as the 'SCHEMA dbo', not 'user dbo' or 'owner dbo'
pro of schema.tblxxx:
Since the objects are not tied to any user accounts, you do not have to worry about changing the owner of objects when an account is to be removed. Another advantage is that the schemas can be used to simplify managing permissions on tables and other objects. The schema has an owner, but the owner is not tied to the name. So, if an account owns a schema and the account must be removed from the database, the owner of the schema can be changed without breaking any code. If you do not wish to organize your database objects into schemas, the dbo schema is available.



[ 打印 ]
阅读 ()评论 (0)
评论
目前还没有任何评论
登录后才可评论.