Monday, 29 December 2014

DATABASES IN SQL SERVER

Data Bases In SQL SERVER:
In SQL Server there are two types of databases available.
                                               



1. System Defined Databases
2. User Defined Databases


1. System Defined Databases: Complete system level information SQL Server is stored in system databases.  SQL Server uses system databases to operate user databases. These are also known as Pre-defined databases or Built-in databases, Includes
           
a.       Master Database
b.      Model Database
c.       MS Database
d.      Temp Database
e.       Sample Databases
I.                   Adventure Works
II.                Adventure  Works DW


a. Master Database:  The Master database is the “database of all databases”. It keeps track of logon accounts, linked servers, system configuration settings, and more. It also contains initialization settings for SQL SERVER.

b. Model Database:  Model is a very special database. Anything that you place in model db is automatically propagated to all the databases that you create thereafter. This means that u can add a state table to model. That state table then appears in all the new databases. You can include almost any object in Model db.

c. MS Database:  The MSDB (Microsoft Database) database is used as an agent between user and SQL Server meantime it concentrates on Back and Recovery Process.

d. Temp Database:  Temp Database is used to hold temporary objects which are generated automatically when user start working with SQL Server.


2.User Defined Database: SQL SERVER enables users to create their own databases. Those are called User Defined Databases.

Syntax:

CREATE DATABASE Database_Name

Ex:

CREATE DATABASE SAMPLE



No comments:

Post a Comment