You are here: Re: What does schema mean? « MsSQL Server « IT news, forums, messages
Re: What does schema mean?

Posted by Erland Sommarskog on 08/27/05 01:13

(wackyphill@yahoo.com) writes:
> I know in SQL Server the terms Database and Catalog are used
> interchangably. But a table is also assigned a schema. As seen in the
> INFORMATION_SCHEMA.Tables View. I don't get what this schema qualifier
> is all about. Like if a table has a schema of dbo.
>
> Can someone explain the relationship the schema has and what it is?

See schema as a way of categorising the objects in a database. This can
be a good thing if several apps share a database, and while there is some
common set of data that all apps accesses, some applications also have
their own private tables. In this case it is a good idea to have a
separate schema for each application where they can have their private
tables, views, stored procedures etc to evade the disk for collisions.

Now, in SQL 2000, there is a serious restriction in that a schema is
tied to a user. In fact, it makes schema virtually useless. But this
changes in SQL 2005 where users have been separated from schemas.

Finally, the schema in INFROAMTION_SCHEMA is a slightly different
usage. Sometimes uses "schema" to refer some set of tables, possibly
all tables in the database. SQL 2000 even has a CREATE SCHEMA command
for creating several tables in one go.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация