Vous êtes sur la page 1sur 35

3.

1 SYSTEM CONFIGURATION
Hardware Configuration
Processor

Intel Pentium-IV

Speed

800 MHZ

RAM

1 GB

Monitor

SVGA

Hard Disk

160 GB

Pointing Device

Logitech Mouse

Keyboard

107 keys

Printer

Canon

Software Configuration
Platform

Windows XP

Coding Language

ASP.Net with C#

Front End

Visual Studio 2008

Back End

Mysql

Documentation

Microsoft Word

3.2 ABOUT WINDOWS XP


Overview of Windows XP
Operating system is the interface between the hardware and the user. The platform
is a program that encapsulates the difficulties in handling various hardware components.
The project Defeating Lazy Servers Database Vs Query Access Assurance has
been developed in the Operating System Windows XP.

Introduction
Windows XP is the latest and greatest version of ubiquitous windows Operating
System. The XP stands for Extreme Programming. This version of windows is certainly
going to offer a new experience for those of you coming from earlier versions of
windows.
Windows XP comes in several different flavors, two of which are client side
products.

The Windows XP home Edition

Windows XP Professional

The other versions are server side Products

Windows XP Server

Windows XP Advanced Server

Special Features of windows XP Professional


Using Multiple Monitor
Windows XP Professional supports dual view, a feature that enables you to
connect multiple monitors to a single computer. Each monitor becomes an extension of
your desktop.

Remote Desktop Connection

XP Professional Edition offers Remote Desktop Connection, which allows you


access to a windows session that is running on some computer other than your computer.
For Example, You could to your office computer from home and use all the resources of
your companys networks.

Synchronization
Windows XP Professional offers synchronization, which enable networks users to
automatically keep documents they work offline in synchronization with documents
stored on a network.

Encryption
Windows XP Professional also supports Encrypting File System (EFS), which we
can use to protect files stored in NTFS volumes. Its especially useful on notebook
computers because it prevents unauthorized users form viewing the content of sensitive
files. Once encryption is enabled the process of encrypting and decrypting files is
transparent. That is to say, any encrypted file is automatically decrypted when opened
and encrypted and saved.

Users and Groups


Both the Home and Professional Editions of Windows XP support the use of
multiple users and user accounts. The user accounts icon in control panel provides on
easy tool for creating and managing user accounts. Windows XP Professional adds the
concept of user groups, inherited from windows 2000 and earlier versions of Windows
NT.

New in Windows XP
Improved Multimedia
Windows XP brings many improvements multimedia, including the following

Windows Novice Player

Photo Printing Wizard

Improved Support for cameras and scanner

Web Publishing Wizard

Media Player

DVD and video

Speech and Handwriting Recognition


Speech recognition enables you to type text or choice menu commands by
speaking into a microphone. Handwriting recognition can convert handwritten text to
typed text. Although windows XP itself doesnt provide for speech handwriting
recognition engines. When you open the program that does support speech and
handwriting the language bar appears, enabling you to dictate text, bar coders, or scribble
on a tablet.

Network Connections
All type of network connections, including dial-up, local area network, and VPN
(Virtual Private Network), can be created and maintained within a single networking
connections windows.

Improved Performance, Reliability, and Compatibility


Windows XP is built on the fully protected 32-bit engine developed for Windows
NT and Windows 2000. The old 16 bit DOS engine from windows me and predecessors
that wouldnt run on the Windows 2000 to without a hitch in windows XP.

Windows XP also supports all the latest Hardware standards, including

UDF 2.1 for DVD

DVD-RAM drives

DirectX 8 for Multimedia

IEEE 1394(Fire wire) cards

Universal serial Bus (USB) and

IDA the Infrared Data Association Standards.

Speech and Handwriting Recognition

Special Features of Windows

Network Connections
All type of network connections, including dial-up, local area network, and VPN
(Virtual Private Network), can be created and maintained within a single networking
connections windows.

Improved Performance, Reliability, and Compatibility


Windows XP is built on the fully protected 32-bit engine developed for Windows
NT and Windows 2000. The old 16 bit DOS engine from windows me and predecessors
that wouldnt run on the Windows 2000 to without a hitch in windows XP.

Support for all latest Hardware standards

UDF 2.1 for DVDs

DVD-RAM drives

DirectX 8 for Multimedia

IEEE 1394(Fire wire) cards

Universal serial Bus (USB) and

IDA the Infrared Data Association Standards.

Windows XP comes in several different flavors, two of which are client side
products.

The Windows XP home Edition

Windows XP Professional

The other versions are server side Products

Windows XP Server

Windows XP Advanced servers

Using Multiple Monitor


Windows XP Professional supports dual view, a feature that enables you to
connect multiple monitors to a single computer. Each monitor becomes an extension of
your desktop.

Remote Desktop Connection


XP Professional Edition offers Remote Desktop Connection, which allows you
access to a windows session that is running on some computer other than your computer.

For Example, You could to your office computer from home and use all the resources of
your companys networks.

3.3 ABOUT DBMS & RDBMS


Database and Information Management
A database server is the key for solving the problems of information. In general, a
server must reliably manage a large amount of data in a multi-user environment, So that
many users can concurrently access the same data. All this must be accomplished while
delivering high performance. A database server must also prevent unauthorized access
and provide efficient solutions for failure recovery.

DBMS & RDBMS


A database is a set of related information. For example, a phone book is a
database of names and phone numbers, and a mailing list is a database of prospective
Customer names and a mailing list is a database of prospective customer names and
addresses.

Types of DBMS
There are three types of database system

Hierarchical

Network

Relational

Uses of DBMS:

It enables the users to access and manipulate the database.

It provides a building block in constructing data processing Systems for


Applications requiring database access.

It helps the DBA perform certain managerial duties.

Functions of DBMS

Database creation (storing data in a defined in a defined database).

Retrieval (query and reporting)

Update (changing the contents of the database).

Programming the user facilities for system development.

Database revision and restructuring.

Database integrity control

Performance monitoring

Advantages

Data can be shared.

Standards can be enforced.

Security restrictions can be applied.

Integrity can be maintained.

Redundancy can be reduced.

Conflicting requirements can be balanced.

Inconsistency can be avoided.

Data Consolidation
Refers to the combining or verifying of separate data files into a centralized
structure and storing the data in a non-redundant format. A redundant format is a structure
that stores the same items in two or more location.

Data Sharing
Data sharing refers to the ability of the system to allow multiple user concurrent
access to individual pieces of data in the database.

Data Protection
Data protection refers to the ability of a DBMS to maintain the integrity of its data
in the face of certain types of processing adversity. If these types of events occur. The
DBMS must have ability to back out in complete or erroneous changes to the data stored
on the database.

Relational Database Management System


A database employing relational structure consists of a set of tables. In each table
the rows represent all the attributes. Each table is a relation and so relational database can
be that of collection of tables. Relational can be represented by column data values in
different relations.

Properties

Each entry in a table represents one data item.

Each column is assigned a distinct name.

All rows are distinct, no duplicate rows are allowed.

Both rows and column can be viewed in any sequence.

A modern Relational Database Management System (RDBMS) can perform a


wide array of tasks. In general, it acts as a transparent interface between the physical
storage and the logical presentations of data. In practice, it provides set more or less
flexible and sophisticated tools for handling information. We can use these tools to

Define a database.

Query the database.

Add, edit and delete the data.

Modify the structure of the database.

Secure data from public access.

Communication with in networks.

Exports and imports data.

RDBMS must have the following components

Structure

Capabilities to manipulate the data

Integrity rules

Data language

Structure

Union

Intersection

Difference

Selection

Projection

Join

Integrity Rules
There are two rules that are important to design a database.

Entity integrity

Referential integrity

Data language
It is divided into three types
DDL- Data Definition Language
DML- Data Manipulation Language
DCL- Data Control Language

RDBMS Components:
There are three basic components of a modern RDBMS. Front-end user interface
products are the software packages that interfaces with system users such as screen,
generators, forms based SQL products etc. there types of packages offer enhanced
productivity in the form of application development tools or end users decision support
tools.
Back-end data management services supply the engine that powers the system,
providing data access, and data integrity and data control mechanisms.
Data access language is the means communicating system user requests to the
data management services. More and more the languages choice is SQL.

3.4 ABOUT ASP.NET


Introduction to. Net Framework
ASP.NET is the radical evolution of ASP and its associated data access service,
ADO, which is now called ADO.NET. ASP suffered from many limitations such as
unstructured, difficult to understand, difficult to maintain intermingled code. Due to
these limitations of ASP, ASP.NET is developed.
The .NET Framework is a new computing platform that simplifies

application

development in the highly distributed environment of the Internet. The

.NET Framework is designed to fulfill the following objectives

To provide a code-execution environment that minimizes software


deployment and versioning conflicts.

To build an application on industry standards to ensure that code based on


the .NET Framework can integrate with any other code.

The .NET

Framework has two main components: the Common Language Runtime


(CLR) and the Class Library.

The CLR is the foundation of the .NET Framework. One can think of the
runtime as an agent that manages code at execution time, providing core
services such as memory management, thread management, and emoting,
while also enforcing strict type safely and other forms of code accuracy that
ensure security and robustness. In fact, the concept of code management is a
fundamental principle of the runtime. Code that targets the runtime is known
as managed code, while code that does not target the runtime is known as
unmanaged code.

Common Language Runtime


Despite its name, the runtime actually has a role in both a components runtime
and development time experiences. While the component is running, the runtime is
responsible for managing memory allocation, starting up and stopping threads and

processes, and enforcing security policy, as well as satisfying any dependencies that the
component might have on other components.
At development time, the runtimes role changes slightly; because it automates so
much (for example, memory management), the runtime makes the developers experience
very simple, especially when compared to COM as it is today. In particular, features such
as reflection dramatically reduce the amount of code a developer must write in order to
turn business logic into a reusable component.

Unified Programming Classes


The framework provides developers with a unified, object-oriented, hierarchical,
and extensible set of class libraries (APIs). Currently, C++ developers use the Microsoft
Foundation Classes and Java developers use the Windows Foundation Classes. The
Framework unifies these disparate models and gives Visual Basic and Jscript
programmers access to class libraries as well.
By creating a common set of APIs across all programming languages, the
common language runtime enables cross-language inheritance, error-handling, and
debugging. All programming languages, from Jscript to C++, have similar access to the
framework and developers are free to choose the language that they want to use.

.Net Framework Class Library


The .NET Framework class library is a collection of reusable types that tightly
integrate with the common language runtime. The class library is object oriented,
providing types from which your own managed code can derive functionality. This not
only makes the .NET Framework types easy to use, but also reduces the time associated
with learning new features of the .NET Framework. In addition, third-party components
can integrate seamlessly with classes in the .NET Framework.
For example, the .NET Framework collection classes implement a set of
interfaces that you can use to develop your own collection classes.

Your collection

classes will blend seamlessly with the classes in the .NET Framework. As you would
expect from an object-oriented class library, the .NET Framework types enable you to
accomplish a range of common programming tasks, including tasks such as string
management, data collection, database connectivity, and file access. In addition to these
common tasks, the class library includes types that support a variety of specialized
development scenarios. For example, you can use the .NET Framework to develop the
following types of applications and services.

Console applications.

Windows GUI applications (Windows Forms)

ASP.NET applications.

XML Web services.

Windows services.

For example, the Windows Forms classes are a comprehensive set of reusable
types that vastly simplify Windows GUI development. If you write an ASP.NET Web
Form application, you can use the Web Forms classes.

Client Application Development


Client applications are the closest to a

traditional

style

of application in

Windows-based programming. These are the types of applications that display windows
or forms on the desktop, enabling a user to perform a task. Client applications include
applications such as word processors and spreadsheets, as well as custom business
applications such as data-entry tools, reporting tools, and so on. Client applications
usually employ windows, menus, buttons, and other GUI elements, and they likely access
local resources such as the file system and peripherals such as printers.
Another kind of client application is the traditional ActiveX control (now
replaced by the managed Windows Forms control) deployed over the Internet as a web
page. This application is much like other client applications: it is executed natively, has
access to local resources, and

includes graphical elements.

In the past, developers created such applications using C/C++ in conjunction with
the Microsoft Foundation Classes (MFC) or with a rapid application development (RAD)
environment such as Microsoft Visual Basic. The .NET Framework incorporates aspects
of these existing products into single, consistent developments environments that
drastically simplify the development of client applications.
The Windows Forms classes contained in the .NET Framework are designed to be
used for GUI development. You can easily create command windows, buttons, menus,
toolbars, and other screen elements with the flexibility necessary to accommodate
shifting business needs. For example, the .NET Framework provides simple properties to
adjust visual attributes associated with forms.

Server Application Deployment


Server-side applications in the managed world are implemented through runtime
hosts. Unmanaged applications host the common language runtime, which allows your
custom managed code to control the behavior of the server. This model provides you with
all the features of the common language runtime and class library while gaining the
performance and scalability of the host server. Servers such as IIS and SQL server can
perform standard operations while your application logic executes through the managed
code.
ASP.NET is the hosting environment that enables developers to use the .NET
Framework to target web-based applications. However, ASP.NET is more than just a
runtime host; it is a complete architecture for developing Web sites and Internetdistributed objects using managed code. Both Web Forms and XML Web services and IIS
and ASP.NET as the publishing mechanism for applications, and both have a collection of
supporting classes in the .NET Framework.

ASP.NET
ASP.NET is the radical evolution of ASP and its associated data access service,
ADO, which is now called ADO.NET. ASP suffered from many limitations such as

unstructured, difficult to understand, difficult to maintain intermingled code. Due to


these limitations of ASP, ASP.NET is developed.

Basic Technique
To create an ASP.NET form simply save a text or html file with the aspx
extension. In ASP.NET, script blocks are compiled and not interpreted, leading to
enhanced performance. Compiling the code involves converting the code instructions to
the machine language. In ASP.NET however, code is not compiled to machine language
directly. It is instead compiled to an intermediate language called Microsoft Intermediate
Language.

Data Types
By default, the data type determines the kind of data they can store. The data
types classified into three categories.

Numeric data type.

Character data type.

Miscellaneous type.

Numeric data type


Numeric data type consists of integral and non-integral. The integral data types
are short, integer, long, byte. They represent numeric values.
Non-integral data type consists of single, double, decimal. They represents
floating values.

Character data type

Char.

String.

Char type represent only one character. It is enclosed by a single quote. String
type represents variable length of character. It is enclosed by a double quote.

Miscellaneous

Boolean.

Date.

Object.

Page Events
ASP.NET has object orientation at its heart. We can code various events in a
Visual Basic like manner. As the form loads, the page load event is fired, form controls
become available for use and, as the user continues to interact with the form, other events
are generated. The form unload event occurs when the page is unloaded. Due to this
event-based structure, a developer can finally start applying event-based coding
techniques to Web applications.

Web Forms and Controls


Controls are the interface between user and application. Every controls has its
own properties, events and methods.

Labels
Labels hold the primary text that appears on the page. Often it is used for
displaying a title.

Text Boxes
A text box accepts input from users. They can be bound to data. A textbox
appearance can be controlled by its Text Mode property. The Text Mode property can
either be single-line, multi-line, or password. When it is set to multi-line, the rows
property controls how many lines of input can be accepted from the user.

Check Boxes
A checkbox is used to select more than one item.

Properties:
Checked
It can be either true or false. When true, it is in the checked state.

Text
This is the text that gets displayed beside the check box.

Auto post back


If this property is true, it causes an immediate post back to the server when the
check boxs checked property is changed.

Test align
Sets the alignment of the check box can be left or right.

Radio button
A radio button is similar to as check box. However, we can display a number of
radio button, relating them to the same group. The user will then only be able to select
one radio button from the group.

Checkbox list
This control provides a multi-selection checked list. It has the following
properties.

Selected property
This property can be checked to determine the selected item.

Repeat direction
It can be horizontal or vertical. It specifies direction of control rendering.

Repeat layout
It can be table or flow. Table means the list will be rendered. Flow renders it
without a table structure.

Radio button list


This control provides a group of radio buttons, which allows only one selected
value. It has the following properties.

Selected property
This property can be checked to determine the selected item.

Repeat direction
It can be horizontal or vertical. It specifies direction of control rendering.

Repeat layout

It can be table or flow. Table means the list will be rendered. Flow renders it
without a table structure.

Dropdown list
The dropdown list displays only one item in a list at a time. It can be bound to a
data source.

List box
The list box control renders a scrollable list of values. It allows either a single
option or multiple options to be selected. Multiple selections are enabled by using the
Selection Mode property to multiple.

Button
It generates a standard 3D Push button used to submit the page back to the server.

Link button
It generates a standard link used to submit the page back to the server.

Image button
The image button renders a click able image, which posts back to the server. Use
this control when we want to display a picture instead of a button.

Image
The image control is used to display an image in the page.

Hyperlink
This control displays a hyperlink, which allows the user to navigate to other
URLs.

Table
The table control, along with table row and table cell controls, programmatically
renders tables.

Asp.Net Application

Files, pages, modules, and executable code.

One virtual directory and its subdirectories.

Application state variables.

Global information.

Implementation rules.

Use of system resources.

Lock and unlock global information.

Beware of global variables in multithreaded environments.

Loss of state when host is destroyed.

No state sharing across Web forms.

Session State
ASP.NET provides simple and easy-to-use session state management. A session is
restricted to a logical application and defines the context in which a user communicates
with a server. ASP.NET session state functionality enfolds:

Requesting identification, classification and with it authentication and


authorization.

Storing data across multiple requests that are related and consecutive.

Session

Restricted to a logical application.

Context in which a user communicates with a server.

Functionality.

Request identification and classification.

Store data across multiple requests.

Session events.

Release of session data.

.NET State Server Process.

Security

Prevent access to areas of your Web server.

Record and store secure relevant user data.

Security Configuration in Web.Config. <authorization>, <authentication>,


<trust>

Authentication, Authorization, Impersonation.

Code Access Security.

Protect your server from wrong code.

Authentication

Validates user credentials.

Awards an authenticated identity.

Types of authentication.

Windows, integrating with IIS 5.0.

Passport, centralized services provided by Microsoft.

Forms, request attachment.

Impersonation

IIS authenticates the user.

A token is passed to the ASP.NET application.

ASP.NET impersonates the given token.

Access is permitted according to NTFS settings.

Code Access Security.

.NET Framework feature.

Verify the codes identity and where it comes from.

Event Model

Application-level Event Handling.

Delegate Model.

Connect event sender and event receiver.

Single and multicast delegates.

Event Delegates Are Multicast.

Event Wiring.

Register event handler with event sender.

Create Programmable Web Pages

Web Forms is used create programmable Web Pages. One can use any
programming language that targets the .NET Framework. A rich set of serverside controls is provided, which cover the most common needs to build
challenging Web applications.

Run on any browser

One can use Web Forms without regard to the clients browser, because the
controls can determine which browser is used and can generate the HTML
output in the appropriate version even if our browser only supports HTML
3.2.

Web controls Namespace

To do this, make use of the rich set of methods and attributes provided by the
System.Web.UI.Web controls namespace.

Data Binding.

One can bind Web Forms control properties to any data in a data store. This
so-called data binding gives nearly complete control over how data moves to
the page and back again to the data store.

Authorization

Determine whether request is permitted.

File and URL authorization.

Page Class
When a page is loaded, the ASP.NET runtime generates and instantiates a Page
class. This object forms a collection of our separate components (like visual elements and
business logic). So all (visual and code) elements are accessible through this object.

Html Server Controls


One can convert simple HTML elements to HTML server controls, let the
ASP.NET engine create an instance on the server, and now they are programmable on the
server. The conversion is done by simply adding attributes to the HTML tag.

Validation Controls

Another group of server controls are validation controls. These can be used to
check the users entries. Validation can be processed on the client and on the
server.

Validation on the client side can be performed using a client script. In that
case, the user will be confronted with immediate feedbackwithout a
roundtrip to the server.

Debugging and Error Handling


Debugging is an essential part of project. It helps to find errors in our code.
The .NET has a sophisticated debugger built right into the development environment. The
.NET also provides common error handling functions that are used across all languages.
These functions allow testing some code and catching any errors that may occur.

Error Types
Error types can be broken down into three major categories.

Syntax errors.

Execution errors.

Logic errors.

Syntax Errors

Syntax errors occur when the code have written cant be understood by the
compiler, because instructions are incomplete supplied in unexpected order, or it cant be
processed at all.

Execution Errors
Execution or runtime errors that occur while our program is executing. They are
often caused because something outside of the application such as a user, database or
hard disk does not behave as expected. Developers need to anticipate the possibility of
execution errors, and built appropriate error handling logic.

Logic Errors
Logic errors or semantic errors occur when unexpected or unwanted results,
because anyone did not fully understand what the code were writing did. Logic errors can
be the most difficult to find and troubleshoot, because it is very difficult to be sure that
our program is completely free from logic errors.

Error Handling
Error handling is an essential part of any good code. In ASP.NET, the error
mechanism is based on the concept of exceptions that can be thrown to raise an error and
caught when the error is handled.

Try. Catch. Finally


The error handling is accomplished through try, catch, finally. Execute the code
that might through an exception in the try block and handle anticipate errors in the catch
block.
The finally block is always executed and allows us to place any cleanup code here
regardless of whether an error has occurred or not. If an errors occurs that was not
handled in the catch block, it only display standard error message and terminate our
program.

2.5 ABOUT SQL SERVER


Microsoft SQL Server is a relational database management system developed
by Microsoft. As a database, it is a software product whose primary function is to store
and retrieve data as requested by other software applications, be it those on the same
computer or those running on another computer across a network (including the Internet).
There are at least a dozen different editions of Microsoft SQL Server aimed at different
audiences and for workloads ranging from small single-machine applications to large
Internet-facing

applications

with

many

concurrent

users.

Its

primary query

languages are T-SQL and ANSI SQL.


SQL Server 7.0 and SQL Server 2000 included modifications and extensions to
the Sybase code base, adding support for the IA-64 architecture. By SQL Server 2005 the
legacy Sybase code had been completely rewritten.
Since the release of SQL Server 2000, advances have been made in performance,
the client IDE tools, and several complementary systems that are packaged with SQL
Server 2005. These include:

SQL Server 2005


SQL Server 2005 (formerly codenamed "Yukon") released in October 2005. It
included native support for managing XML data, in addition to relational data. For this
purpose, it defined an xml data type that could be used either as a data type in database
columns or as literals in queries. XML columns can be associated with XSD schemas;
XML data being stored is verified against the schema. XML is converted to an internal
binary data type before being stored in the database. Specialized indexing methods were
made available for XML data. XML data is queried using XQuery; SQL Server 2005
added some extensions to the T-SQL language to allow embedding XQuery queries in TSQL. In addition, it also defines a new extension to XQuery, called XML DML, that
allows query-based modifications to XML data. SQL Server 2005 also allows a database
server to be exposed over web services using Tabular Data Stream(TDS) packets

encapsulated within SOAP (protocol) requests. When the data is accessed over web
services, results are returned as XML.
Common Language Runtime (CLR) integration was introduced with this version,
enabling one to write SQL code as Managed Code by the CLR. For relational data, TSQL has been augmented with error handling features (try/catch) and support for
recursive queries with CTEs (Common Table Expressions). SQL Server 2005 has also
been enhanced with new indexing algorithms, syntax and better error recovery systems.
Data pages are check summed for better error resiliency, and optimistic concurrency
support has been added for better performance. Permissions and access control have been
made more granular and the query processor handles concurrent execution of queries in a
more efficient way. Partitions on tables and indexes are supported natively, so scaling out
a database onto acluster is easier. SQL CLR was introduced with SQL Server 2005 to let
it integrate with the .NET Framework.
SQL Server 2005 introduced "MARS" (Multiple Active Results Sets), a method of
allowing usage of database connections for multiple purposes.
SQL Server 2005 introduced DMVs (Dynamic Management Views), which are
specialized views and functions that return server state information that can be used to
monitor the health of a server instance, diagnose problems, and tune performance.
Service Pack 1 (SP1) of SQL Server 2005 introduced Database Mirroring,[Note
1 a high availability option that provides redundancy and failover capabilities at the
database level. Failover can be performed manually or can be configured for automatic
failover. Automatic failover requires a witness partner and an operating mode of
synchronous (also known as high-safety or full safety).

Version 1.1
SQL Server includes better compression features, which also helps in improving
scalability. It enhanced the indexing algorithms and introduced the notion of filtered
indexes. It also includes Resource Governor that allows reserving resources for certain
users or workflows. It also includes capabilities for transparent encryption of data (TDE)
as well as compression of backups. SQL Server 2005 supports the ADO.NET Entity
Framework and the reporting tools, replication, and data definition will be built around

the Entity Data Model. SQL Server Reporting Services will gain charting capabilities
from the integration of the data visualization products fromDundas Data Visualization,
Inc., which was acquired by Microsoft.
On the management side, SQL Server 2005 includes theDeclarative Management
Framework which allows configuring policies and constraints, on the entire database or
certain tables, declaratively. The version of SQL Server Management Studio included
with SQL Server 2005 supports IntelliSense for SQL queries against a SQL Server 2005
Database Engine. SQL Server 2005 also makes the databases available via Windows
PowerShellproviders and management functionality available as Cmdlets, so that the
server and all the running instances can be managed fromWindows PowerShell.

Business Intelligence
Introduced in SQL Server 2012 and focusing on Self Service and Corporate
Business Intelligence. It includes the Standard Edition capabilities and Business
Intelligence tools: PowerPivot, Power View, the BI Semantic Model, Master Data
Services, Data Quality Services and xVelocity in-memory analytics.
Workgroup
SQL Server Workgroup Edition includes the core database functionality but does
not include the additional services. Note that this edition has been retired in SQL Server
2012.

Express
SQL Server Express Edition is a scaled down, free edition of SQL Server, which
includes the core database engine. While there are no limitations on the number of
databases or users supported, it is limited to using one processor, 1 GB memory and 4 GB
database files (10 GB database files from SQL Server Express 2005 R2). It is intended as
a replacement for MSDE. Two additional editions provide a superset of features not in the
original Express Edition. The first is SQL Server Express with Tools, which
includes SQL Server Management Studio Basic. SQL Server Express with Advanced
Services adds full-text search capability and reporting services.

Developer

SQL Server Developer Edition includes the same features as SQL Server 2012
Enterprise Edition, but is limited by the license to be only used as a development and test
system, and not as production server. This edition is available to download by students
free of charge as a part of Microsoft's DreamSpark program.

Embedded (SSEE)
SQL Server 2005 Embedded Edition is a specially configured named instance of
the SQL Server Express database engine which can be accessed only by certain Windows
Services.

Evaluation
SQL Server Evaluation Edition, also known as the Trial Edition, has all the
features of the Enterprise Edition, but is limited to 180 days, after which the tools will
continue to run, but the server services will stop.

Fast Track
SQL Server Fast Track is specifically for enterprise-scale data warehousing
storage and business intelligence processing, and runs on reference-architecture hardware
that is optimized for Fast Track.

LocalDB
Introduced in SQL Server Express 2012, LocalDB is a minimal, on-demand,
version of SQL Server that is designed for application developers. It can also be used as
an embedded database.

Parallel Data Warehouse (PDW)


A massively parallel processing (MPP) SQL Server appliance optimized for largescale data warehousing such as hundreds of terabytes.

Data warehouse Appliance Edition


Pre-installed and configured as part of an appliance in partnership with Dell & HP
base on the Fast Track architecture. This edition does not include SQL Server Integration
Services, Analysis Services, or Reporting Services.

Architecture
The protocol layer implements the external interface to SQL Server. All
operations that can be invoked on SQL Server are communicated to it via a Microsoftdefined format, called Tabular Data Stream (TDS). TDS is an application layer protocol,
used to transfer data between a database server and a client. Initially designed and
developed by Sybase Inc. for their Server relational database engine in 1984, and later by
Microsoft in Microsoft SQL Server, TDS packets can be encased in other physical
transport dependent protocols, including TCP/IP, Named pipes, and Shared memory.
Consequently, access to SQL Server is available over these protocols. In addition, the
SQL Server API is also exposed over web services.

Data storage
Data storage is a database, which is a collection of tables with typed columns.
SQL

Server

supports

different

data

types,

includingprimary

types such

as Integer, Float, Decimal, Char (including character strings), Varchar (variable length
character strings), binary (for unstructured blobs of data), Text (for textual data) among
others. The rounding of floats to integers uses either Symmetric Arithmetic Rounding or
Symmetric Round Down (Fix) depending on arguments: SELECT Round(2.5, 0) gives 3.
Microsoft SQL Server also allows user-defined composite types (UDTs) to be
defined and used. It also makes server statistics available as virtual tables and views
(called Dynamic Management Views or DMVs). In addition to tables, a database can also
contain other objects including views, stored procedures, indexes and constraints, along

with a transaction log. A SQL Server database can contain a maximum of 231 objects,
and can span multiple OS-level files with a maximum file size of 260 bytes. The data in
the database are stored in primary data files with an extension .mdf. Secondary data files,
identified with a .ndf extension, are used to store optionalmetadata. Log files are
identified with the .ldf extension.
Storage space allocated to a database is divided into sequentially numbered pages,
each 8 KB in size. A page is the basic unit of I/O for SQL Server operations. A page is
marked with a 96-byte header which stores metadata about the page including the page
number, page type, free space on the page and the ID of the object that owns it. Page type
defines the data contained in the page - data stored in the database; index, allocation map
which holds information about how pages are allocated to tables and indexes, change
map which holds information about the changes made to other pages since last backup or
logging, or contain large data types such as image or text. While page is the basic unit of
an I/O operation, space is actually managed in terms of an extent which consists of 8
pages. A database object can either span all 8 pages in an extent ("uniform extent") or
share an extent with up to 7 more objects ("mixed extent"). A row in a database table
cannot span more than one page, so is limited to 8 KB in size. However, if the data
exceeds 8 KB and the row contains Varchar or Varbinary data, the data in those columns
are moved to a new page (or possibly a sequence of pages, called an Allocation unit) and
replaced with a pointer to the data.
For physical storage of a table, its rows are divided into a series of partitions
(numbered 1 to n). The partition size is user defined; by default all rows are in a single
partition. A table is split into multiple partitions in order to spread a database over
a cluster. Rows in each partition are stored in either B-tree or heap structure. If the table
has an associated index to allow fast retrieval of rows, the rows are stored in-order
according to their index values, with a B-tree providing the index. The data is in the leaf
node of the leaves, and other nodes storing the index values for the leaf data reachable
from the respective nodes. If the index is non-clustered, the rows are not sorted according
to the index keys. An indexed view has the same storage structure as an indexed table. A

table without an index is stored in an unordered heap structure. Both heaps and B-trees
can span multiple allocation units.

Buffer Management
SQL Server buffers pages in RAM to minimize disc I/O. Any 8 KB page can be
buffered in-memory, and the set of all pages currently buffered is called the buffer cache.
The amount of memory available to SQL Server decides how many pages will be cached
in memory. The buffer cache is managed by the Buffer Manager. Either reading from or
writing to any page copies it to the buffer cache. Subsequent reads or writes are
redirected to the in-memory copy, rather than the on-disc version. The page is updated on
the disc by the Buffer Manager only if the in-memory cache has not been referenced for
some time. While writing pages back to disc, asynchronous I/O is used whereby the I/O
operation is done in a background thread so that other operations do not have to wait for
the I/O operation to complete. Each page is written along with its checksum when it is
written. When reading the page back, its checksum is computed again and matched with
the stored version to ensure the page has not been damaged or tampered with in the
meantime.

Concurrency and locking


SQL Server allows multiple clients to use the same database concurrently. As
such, it needs to control concurrent access to shared data, to ensure data integritywhen
multiple clients update the same data, or clients attempt to read data that is in the process
of being changed by another client. SQL Server provides two modes of concurrency
control: pessimistic concurrency and optimistic concurrency.
When pessimistic concurrency control is being used, SQL Server controls
concurrent access by using locks. Locks can be either shared or exclusive. Exclusive lock
grants the user exclusive access to the datano other user can access the data as long as
the lock is held. Shared locks are used when some data is being readmultiple users can
read from data locked with a shared lock, but not acquire an exclusive lock. The latter
would have to wait for all shared locks to be released. Locks can be applied on different

levels of granularityon entire tables, pages, or even on a per-row basis on tables. For
indexes, it can either be on the entire index or on index leaves. The level of granularity to
be used is defined on a per-database basis by the database administrator. While a fine
grained locking system allows more users to use the table or index simultaneously, it
requires more resources. So it does not automatically turn into higher performing
solution. SQL Server also includes two more lightweight mutual exclusion solutions
latches and spinlockswhich are less robust than locks but are less resource intensive.
SQL Server uses them for DMVs and other resources that are usually not busy. SQL
Server also monitors all worker threads that acquire locks to ensure that they do not end
up indeadlocksin case they do, SQL Server takes remedial measures, which in many
cases is to kill one of the threads entangled in a deadlock and rollback the transaction it
started. To implement locking, SQL Server contains the Lock Manager. The Lock
Manager maintains an in-memory table that manages the database objects and locks, if
any, on them along with other metadata about the lock. Access to any shared object is
mediated by the lock manager, which either grants access to the resource or blocks it.

Data retrieval
The main mode of retrieving data from an SQL Server database is querying for it.
The query is expressed using a variant of SQL calledT-SQL, a dialect Microsoft SQL
Server shares with Sybase SQL Server due to its legacy. The query declaratively specifies
what is to be retrieved. It is processed by the query processor, which figures out the
sequence of steps that will be necessary to retrieve the requested data. The sequence of
actions necessary to execute a query is called a query plan. There might be multiple ways
to process the same query. For example, for a query that contains a join statement and
a select statement, executing join on both the tables and then executing select on the
results would give the same result as selecting from each table and then executing the
join, but result in different execution plans. In such case, SQL Server chooses the plan
that is expected to yield the results in the shortest possible time. This is called query
optimization and is performed by the query processor itself.
SQL Server includes a cost-based query optimizer which tries to optimize on the
cost, in terms of the resources it will take to execute the query. Given a query, then the

query optimizer looks at the database schema, the database statistics and the system load
at that time. It then decides which sequence to access the tables referred in the query,
which sequence to execute the operations and what access method to be used to access
the tables. For example, if the table has an associated index, whether the index should be
used or not - if the index is on a column which is not unique for most of the columns (low
"selectivity"), it might not be worthwhile to use the index to access the data. Finally, it
decides whether to execute the query concurrently or not. While a concurrent execution is
more costly in terms of total processor time, because the execution is actually split to
different processors might mean it will execute faster. Once a query plan is generated for
a query, it is temporarily cached. For further invocations of the same query, the cached
plan is used. Unused plans are discarded after some time.

Vous aimerez peut-être aussi