简体   繁体   中英

schema in sql server 2008

使用'dbo'创建普通表和使用模式创建表之间的区别是什么。如何使用此模式并支持表

A schema is just a container for DB objects - tables, views etc. It allows you to structure a very large database solution you might have. As a sample, have a look at the newer AdventureWorks sample databases - they have a number of schemata included, like "HumanResources" and so forth.

A schema can be a security boundary, eg you can give or deny certain users access to a schema as a whole. A schema can also be used to keep tables with the same name apart, eg you could create a "user schema" for each user of your application, and have a "Settings" table in each of them, holding that user's settings, eg "Bob.Settings", "Mary.Settings" etc.

In my experience, schemata are not used very often in SQL Server. It's a way to organize your database objects into containers, but unless you have a huge amount of database objects, it's probably something you won't really use much.

dbo 一种架构。

See if this helps.

Schema seems to be a way of categorizing objects (tables/stored procs/views etc).
Think of it as a bucket to organize related objects based on functionality.

I am not sure, how logged in SQL user is tied to a specific schema though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM