Overview

Schema is a blueprint of how database is constructed and also it's design view. It also defines how entities going to work in real world scenario and how they are modelled. Schema are generally stored in DATA Dictionary.

Methods

There are two ways of creating schema's:

SQL Server Management Tool

To create a schema using SQL server management tool, functionality goes something like that:

Transact SQL

To create a schema using Transact SQL tool, functionality goes something like that:

[ USE AdventureWorks2012;
GO
-- Creates the schema Sprockets owned by Annik that contains table NineProngs.
-- The statement grants SELECT to Mandar and denies SELECT to Prasanna.

CREATE SCHEMA Sprockets AUTHORIZATION Annik
CREATE TABLE NineProngs (source int, cost int, partnumber int)
GRANT SELECT ON SCHEMA::Sprockets TO Mandar
DENY SELECT ON SCHEMA::Sprockets TO Prasanna;
GO