SQL Server Guide
Index
Introduction 2
Structured Query Language (SQL) 10
Databases 11
Tables 22
Constraints 32
Joins 42
Built-in Functions 47
Sub-Queries 55
Views 61
Indexes 64
Normalization 67
T-SQL 70
Stored procedures 74
Triggers 76
User Defined Functions (UDF) 81
Locks 85
Transactions 89
SQL Server Security 93
Back-up and recoveries 97
Advanced features (SQL 2005) 101
------------------------------------------------------------------------------------------------------
INTRODUCTION
SQL Server is a Client/Server Relational Database Management System(RDBMS) that uses Transact-SQL to send request between a client and SQL Server.
Client/Server Architecture:
SQL Server is designed to be a client/server system. Client/server systems are constructed so that the database can reside on a central computer, know as aServer, and be shared among several users. When users want to access the data in SQL Server, they run an application on their local computer, known as a Clientthat connects over a network to the server running SQL Server.
SQL Server can work with thousands of client application simultaneously. The server has features to prevent the logical problems that occur if a user tries to read or modify data currently used by others.
While SQL Server is designed to work as a sever in a Client/Servernetwork, it is also capable of working as a stand-alone database directly on the client. The scalability and easy-to-use features of SQL Server allow it to work efficiently on a client without consuming too many resources.
To begin with, a brief overview of the relational database model is provided as the SQL Server database is based on this model.
Overview of RDBMS:
Data:- Information that is been stored and used in the computer system is called as data.
Database:- Collection of meaningful Information stored in an organized manner.
DBMS:- It is a collection of interrelated data and a set of programs to access and modify the data.
RDBMS:- It is also DBMS but the relation will be stored into the database.
Differences Between DBMS And RDBMS:-
DBMS | RDBMS |
In DBMS data is stored in the form of a file and is shown to the user in the form of a two dimensional table. | In the case of RDBMS data is strictly to be stored in the form of table and also shown in the form of table. |
In DBMS the relation ship established among the tables will not be stored into the database. | In RDBMS the relationship established will be stored into the database as one of the database objects. |
Relationships among Data:
A relationship is defined as “an association among entities”. The three different types of relationships recognized among various data stored in the database are:
One-to-one
In a one-to-one relationship, a row in table A can have no more than one matching row in table B, and vice versa.
One-to-many
A one-to-many relationship is the most common type of relationship. In this type of relationship, a row in table A can have many matching rows in table B, but a row in table B can have only one matching row in table A.
Many-to-many
In a many-to-many relationship, a row in table A can have many matching rows in table B, and vice versa. You create such a relationship by defining a third table, called a junction table.
Data Model:-
It is nothing but the structure in which the data is stored in the database. There are two important data models existing. They are:
1.Object-based data model 2. Record-based data model.
Object – Based Data Model:- It is a collection of conceptual tool for describing the data, data relationships and data constraints.
Record – Based Data Model:- It describes the data structures and access techniques of DBMS. Object –based data model is the concept and Record-base data model is the actual representation of the data in the database.
0 comments:
Post a Comment