Book Image

SQL Server 2014 Development Essentials

By : Basit A. Masood-Al-Farooq
Book Image

SQL Server 2014 Development Essentials

By: Basit A. Masood-Al-Farooq

Overview of this book

Table of Contents (14 chapters)
SQL Server 2014 Development Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and managing database schemas


A schema is a logical container that groups objects of similar scope or ownership together. By default, the database owner (dbo) schema is automatically created in a SQL Server database. Unless you specify otherwise, all SQL Server user objects are created in the database owner (dbo) schema. You can define different default schemas for each user of the database. When you create a user database, SQL Server automatically creates these schemas: sys, dbo, INFORMATION_SCHEMA, and guest.

You can query the sys.schemas system catalog view to see the schemas defined for the database. The following is the syntax to query this system catalog:

SELECT * FROM sys.schemas

You can also use SQL Server Management Studio 2014 to list the schemas defined for the database. To list the schemas defined for the database in SQL Server 2014 Management Studio, use the following steps:

  1. In Object Explorer, expand the Databases folder.

  2. Next, select the database and expand the Security...