正文

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)
評論
目前還沒有任何評論
登錄後才可評論.