Sie sind auf Seite 1von 184

ACKNOWLEDGEMENT

No matter how much enterprising


and entrepreneurial ones thinking is, yet
nobody can do everything all by himself without
some help and guidance. It is inhumane if the
concerned persons assistance goes without
appreciation and thanks.
Many individuals have contributed for the
completion of this project. For their invaluable
guidance, comments and suggestions, we wish
to express our deep sense of indebtedness and
sincerest gratitude to our guide, Mr. Sunny
Gupta of IIDA, Mohali for his invaluable
guidance and constructive criticism throughout
this dissertation. He has displayed unique
tolerance and understanding at every step of
progress and encouraged us incessantly. We
deem it our privilege to have carried out our
Dissertation work under his able guidance.

We express our sincere thanks to Mr. Sandeep


Sekhon, professor & Head, Department of
Computer Engineering for accepting our
application and giving us an opportunity to
work on project.
As a final personal note, we are grateful to, our
parents, who are inspirational to us in their
understanding,
patience
and
constant
encouragement.

Table of
contents

Introduction....................
............
Feasibility
Study
Environment and Tools
Used

For

System
.
Architectural

layout

the

of

.NET

Framework
..
Overview
ASP.NET

of

Page
and
control
Framework..
ASP.NET
Security.
C#
Language

SQL
Server..........................
Creation
of
Database..

Introduction
.NET is a software framework that includes
everything required for developing software
for web services. .NET is pronounced as
dot net which is a software component
that runs on the windows operating system.
It has presentation technologies, component
technologies and data technologies on a
single platform so as to enable users to
develop Internet applications as easily as
they do on desktop systems. It provides tools
and libraries that enable developers to
create windows software much faster and
easier.
To run .NET, we must
installed .NET framework. .NET technology

provides the ability to quickly build, deploy,


manage and use connected security
enhanced solutions with web services.
Microsoft took many of the best
ideas in the industry, added their own
creativity and innovations and produced a
coherent systems solutions popularly known
as Microsoft .NET. Microsoft .NET software
solution strategy includes three keys
approaches as shown below:

MICROSOFT.NET STRATEGY
Microsoft .NET Platform includes
the following components that would help to
develop a new generation of smart Internet
services:
.NET Infrastructure and tools

.NET User Experience


.NET Building Block
.NET Device Software
Microsoft .NET Product and
Services includes the following
components:
MSN .NET
Window .NET
Office .NET
Visual Studio .NET
Central for .NET
Third Party .NET Services
will provide opportunities to a vast
range of developers and users to
produce corporate and vertical
services using .NET Platform.

FEASIBILITY STUDY
INTRODUCTION:Feasibility is the
measure of how beneficial or practical the

development of the system will be to the


organization. It is a preliminary survey for the
systems investigation. It aims to proinformation
to facilitate a later in-depth investigation
The report produced at the end of the feasibility
study contains suggestions and reasoned
arguments to help management decide whether
to commit further resources to the proposed
project.
Within the scheduled duration we were assigned
to study both the positive and negative aspects
of the current manual system, in which we have
come up with a number of drawbacks that
prevent the progress of the clinic if it is
continued to function manually.
Having gone through all measures of feasibility
we report to the management to figure out if the
objectives of the new system are met.
For e.g.:

Is the system within the budget allowed for


it?
Will the organizations needs, be met by the
new proposed system as originally
envisaged?
TYPES OF FEASIBILITY:
There are various measures of
feasibility that helps to decide whether a
particular project is feasible or not. These
measures include:
Technical Feasibility
Operational Feasibility
Economical Feasibility
Each of these types will be explained in detail
throughout the project report.

Technical Feasibility
Based on the outline design of system
requirements in terms of inputs, outputs, files,
procedures and staff, the technical issues raised
during technical feasibility include
Does the necessary technology exist to do
what is proposed?

Does the proposed equipment have the


technical capacity to hold the data required
to use in the new system?

Adequate responses provided by the


proposed system?

Is the system flexible enough to facilitate


expansion?
Is there any technical guarantee of
accuracy, reliability, ease of access and data
security?

OPERATIONAL FEASIBILITY:A system often fails if it


does not fit within existing operations and if
users resist the change. Important issues a
system developer must look into are:
Will the new system be used if
implemented in an organization?
Are there major barriers to implementation or is
proposed system accepted without destructive
resistance?
If we are considering the performance and
response time for each task, it is very much
faster since there is less paper work to be
completed. When entering data into the system
to relieve the user from additional work and
typing incorrect data, the system provides
options such as combo boxes, check boxes,
option buttons and etc. if the users type in

incorrect data they would be informed


immediately about the error by the error
detection control.
Another important fact to be regarded is the
security control, which is handled by the system.
Since data regarding each user is confidential,
security is a key issue. Here, in this system, data
regarding users is stored in database which can
only be accessed by the authorized
administrator.
The new system is more user-friendly, which
enables the end-user to complete his/her work
efficiently and accurately with interest. After
taking the above fact into consideration we can
state the operating of the proposed system
within the organization is feasible.
ECONOMICAL FEASIBILITY:The proposed system must

be justifiable in terms of cost and benefit, to


ensure that the investment in a new/changed
system provide a reasonable return.
Even though finding out the costs of the
proposed project is difficult we assume and
estimate the costs and benefits as follows.
According to the computerized system we
propose, the costs can be broken down to two
categories:
Costs associated with the development of
the system.
Costs associated with operating the system.

ENVIRONMENT AND TOOLS


USED FOR THE SYSTEM

INTRODUCTION
FRAMEWORK

OF

THE

.NET

.NET Framework (pronounced dot net) is


a software framework that runs primarily
on Microsoft
Windows. It
includes
a
large library and supports several programming
languages which
allows
language
interoperability (each language can use code
written in other languages). The .NET library is
available to all the programming languages
that .NET supports. Programs written for the
.NET Framework execute in a software
environment
(as
contrasted
to hardware environment),
known
as
the Common Language Runtime (CLR), and
an application virtual machine that provides
important services such as security, memory
management, and exception handling. The class

library and the CLR together constitute the


.NET Framework.
The
.NET
Framework's Base
Class
Library provides user
interface, data
access, database
connectivity, cryptography, web
application
development, numeric algorithms, and network
communications.
Programmers
produce
software by combining their own source
code with the .NET Framework and other
libraries. The .NET Framework is intended to
be used by most new applications created for
the Windows platform. Microsoft also produces
a
popular integrated
development
environment largely
for
.NET
software
called Visual Studio.
The .NET Framework is an integral Windows
component that supports building and running
the next generation of applications and XML

Web services. The key components of the .NET


Framework are the common language runtime
and the .NET Framework class library, which
includes ADO.NET, ASP.NET, and Windows
Forms. The .NET Framework provides a
managed execution environment, simplified
development and deployment, and integration
with a wide variety of programming language
.NET Framework in Context
The .NET Framework is a new computing
platform
development
environment

that
in
of

simplifies
the
the

highly
Internet.

application
distributed
The

.NET

Framework is designed to fulfill the following


objectives:
To provide a consistent object-oriented
programming environment whether object

code is stored and executed locally,


executed locally but Internet-distributed, or
executed remotely.
To provide a code-execution environment
that minimizes software deployment and
versioning conflicts.
To provide a code-execution environment
that guarantees safe execution of code,
including code created by an unknown or
semi-trusted third party.
To provide a code-execution environment
that eliminates the performance problems of
scripted or interpreted environments.
To make the developer experience consistent
across widely varying types of applications,

such as Windows-based applications and


Web-based applications.
To build all communication on industry
standards to ensure that code based on
the .NET Framework can integrate with any
other code.

Design Features:
Interoperability
Because computer systems commonly require
interaction between new and older applications,
the .NET Framework provides means to access
functionality that is implemented in programs
that execute outside the .NET environment.
Access to COM components is provided in the

System.Runtime.InteropServices

and

System.EnterpriseServices namespaces of the


framework; access to other functionality is
provided using the P/Invoke feature
.
Common Language Runtime Engine
The Common Language Runtime (CLR) is the
execution engine of the .NET Framework. All
.NET programs execute under the supervision of
the CLR, guaranteeing certain properties and
behaviors in the areas of memory management,
security, and exception handling.
Language Independence
The .NET Framework introduces a Common
Type
System,
or
CTS.
The

CTS specification defines all possible data


types and programming constructs supported by
the CLR and how they may or may not interact
with each other conforming to the Common
Language Infrastructure (CLI) specification.
Because of this feature, the .NET Framework
supports the exchange of types and object
instances between libraries and applications
written using any conforming .NET language.
Base Class Library
The Base Class Library (BCL), part of the
Framework Class Library (FCL), is a library of
functionality available to all languages using
the

.NET

Framework.

The

BCL

provides classes which encapsulate a number of


common functions, including file reading and
writing, graphic

rendering, database interaction, XML document


manipulation and so on.
Security
The design is meant to address some of the
vulnerabilities, such as buffer overflows, that
have been exploited by malicious software.
Additionally, .NET provides a common security
model for all applications.

Architectural

layout

the .NET Framework

of

An overview of the .NET architecture.


The

.NET

Framework

has

two

components:
The Common language runtime
The .NET Framework class library.

The Common Language Runtime

main

CLR is the foundation of the .NET Framework.


You can think of the runtime as an agent that
manages code at execution time, providing core
services such as memory management, thread
management, and remoting, while also
enforcing strict type safety 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.
The class library, the other main component of
the .NET Framework, is a comprehensive,
object-oriented collection of reusable types that
you can use to develop applications ranging
from traditional command-line or graphical
user interface (GUI) applications to
applications based on the latest innovations

provided by ASP.NET, such as Web Forms and


XML Web services.
The .NET Framework can be hosted by
unmanaged components that load the common
language runtime into their processes and
initiate the execution of managed code, thereby
creating a software environment that can exploit
both managed and unmanaged features. The
.NET Framework not only provides several
runtime hosts, but also supports the
development of third-party runtime hosts.

.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.
Security
NET has its own security mechanism with two
general features: Code Access Security (CAS),
and validation and verification. Code Access
Security is based on evidence that is associated
with a specific assembly. Typically the evidence
is the source of the assembly (whether it is

installed on the local machine or has been


downloaded from the intranet or Internet). Code
Access Security uses evidence to determine the
permissions granted to the code. Other code
can demand that calling code is granted a
specified permission. The demand causes
the CLR to perform a call stack walk: every
assembly of each method in the call stack is
checked for the required permission; if any
assembly is not granted the permission a
security exception is thrown. However, has to
split the application into sub domains; it is not
done by the CLR
Memory management
The .NET Framework CLR frees the developer
from

the

burden

of

managing

memory

(allocating and freeing up when done); instead


it does the memory management itself even

though there are no actual guarantees as to


when the Garbage Collector will perform its
work, unless an explicit double-call is issued. To
this end, the memory allocated to instantiations
of

.NET

types

(objects)

is

done

contiguously from the managed heap, a pool of


memory managed by the CLR. As long as there
exists a reference to an object, which might be
either a direct reference to an object or via
a graph of objects, the object is considered to be
in use by the CLR. When there is no reference to
an object, and it cannot be reached or used, it
becomes garbage. However, it still holds on to
the memory allocated to it. .NET Framework
includes

a garbage

collector which

runs

periodically, on a separate thread from the


application's thread, that enumerates all the
unusable objects and reclaims the memory
allocated to them.
The .NET Garbage Collector (GC) is a nondeterministic,

compacting and

mark-and-

sweep garbage collector. The GC runs only


when a certain amount of memory has been
used or there is enough pressure for memory on
the system. Since it is not guaranteed when the
conditions to reclaim memory are reached, the
GC runs are non-deterministic. Each .NET
application has a set of roots, which are
pointers to objects on the managed heap
(managed objects). These include references to

static objects and objects defined as local


variables or method parameters currently in
scope, as well as objects referred to by CPU
registers. When the GC runs, it pauses the
application, and for each object referred to in
the root, it recursively enumerates all the
objects reachable from the root objects and
marks them as reachable. It uses .NET metadata
and reflection to

discover

the

objects

encapsulated by an object, and then recursively


walk them. It then enumerates all the objects on
the heap (which were initially allocated
contiguously) using reflection. All objects not
marked as reachable are garbage.[9] This is
the mark phase.

Since the memory held by garbage is not of any


consequence, it is considered free space.
However, this leaves chunks of free space
between objects which were initially contiguous.
The objects are then compacted together to
make used memory contiguous again. Any
reference to an object invalidated by moving the
object is updated to reflect the new location by
the GC. The application is resumed after the
garbage collection is over.
The GC used by .NET Framework is
actually generational. Objects are assigned
a generation; newly created objects belong
to Generation 0. The objects that survive a
garbage collection are tagged as Generation 1,
and the Generation 1 objects that survive
another collection are Generation 2 objects.

The .NET Framework uses up to Generation 2


objects. Higher generation objects are garbage
collected less frequently than lower generation
objects. This helps increase the efficiency of
garbage collection, as older objects tend to
have a larger lifetime than newer objects. Thus,
by removing older (and thus more likely to
survive a collection) objects from the scope of a
collection run, fewer objects need to be checked
and compacted.

Overview of ASP.NET:
ASP.NET is more than the next version of Active
Server Pages (ASP); it provides a unified Web
development model that includes the services
necessary for developers to build enterpriseclass Web applications. While ASP.NET is
largely syntax compatible with ASP, it also
provides a new programming model and
infrastructure for more scalable and stable
applications that help provide greater
protection. You can feel free to augment your
existing ASP applications by incrementally
adding ASP.NET functionality to them.
ASP.NET is a compiled, .NET-based
environment; you can author applications in
any .NET compatible language, including
Visual Basic .NET, C#, and JScript .NET.
Additionally, the entire .NET Framework is
available to any ASP.NET application.
Developers can easily access the benefits of
these technologies, which include the managed

common language runtime environment, type


safety, inheritance, and so on.
ASP.NET has been designed to work seamlessly
with WYSIWYG HTML editors and other
programming tools, including Microsoft Visual
Studio .NET. Not only does this make Web
development easier, but it also provides all the
benefits that these tools have to offer, including
a GUI that developers can use to drop server
controls onto a Web page and fully integrated
debugging support.
Developers can use Web Forms or XML Web
services when creating an ASP.NET application,
or combine these in any way they see fit. Each
is supported by the same infrastructure that
allows you to use authentication schemes;
caches frequently used data, or customize your
application's configuration, to name only a few
possibilities.
Web Forms allow you to build powerful
forms-based Web pages. When building
these pages, you can use ASP.NET server

controls to create common UI elements, and


program them for common tasks. These
controls allow you to rapidly build a Web
Form out of reusable built-in or custom
components, simplifying the code of a page.
For more information, see Web Forms
Pages. For information on how to develop
ASP.NET server controls.
An XML Web service provides the means to
access server functionality remotely. Using
XML Web services, businesses can expose
programmatic interfaces to their data or
business logic, which in turn can be
obtained and manipulated by client and
server applications. XML Web services
enable the exchange of data in client-server
or server-server scenarios, using standards
like HTTP and XML messaging to move
data across firewalls. XML Web services are
not tied to a particular component
technology or object-calling convention. As
a result, programs written in any language,
using any component model, and running on

any operating system can access XML Web


services.
Each of these models can take full advantage of
all ASP.NET features, as well as the power of
the .NET Framework and .NET Framework
common language runtime. These features and
how you can use them are outlined as follows:
If you have ASP development skills, the new
ASP.NET programming model will seem
very familiar to you. However, the ASP.NET
object model has changed significantly from
ASP, making it more structured and objectoriented. Unfortunately this means that
ASP.NET is not fully backward compatible;
almost all existing ASP pages will have to
be modified to some extent in order to run
under ASP.NET. In addition, major changes
to Visual Basic .NET means that existing
ASP pages written with Visual Basic
Scripting Edition typically will not port
directly to ASP.NET. In most cases, though,
the necessary changes will involve only a
few lines of code.

Accessing databases from ASP.NET


applications is an often-used technique for
displaying data to Web site visitors.
ASP.NET makes it easier than ever to access
databases for this purpose. It also allows
you to manage the database from your code.
ASP.NET provides a simple model that
enables Web developers to write logic that
runs at the application level. Developers
can write this code in the Global.asax text
file or in a compiled class deployed as an
assembly. This logic can include
application-level events, but developers can
easily extend this model to suit the needs of
their Web application..
ASP.NET provides easy-to-use application
and session-state facilities that are familiar
to ASP developers and are readily
compatible with all other .NET Framework
APIs. For advanced developers who want to
use APIs as powerful as the ISAPI
programming interfaces that were included

with previous versions of ASP, ASP.NET


offers
theIHttpHandler and IHttpModule interface
s. Implementing the IHttpHandler interface
gives you a means of interacting with the
low-level request and response services of
the IIS Web server and provides
functionality much like ISAPI extensions,
but with a simpler programming model.
Implementing
the IHttpModule interface
allows you to include custom events that
participate in every request made to your
application..
ASP.NET takes advantage of performance
enhancements found in the .NET
Framework and common language runtime.
Additionally, it has been designed to offer
significant performance improvements over
ASP and other Web development platforms.
All ASP.NET code is compiled, rather than
interpreted, which allows early binding,
strong typing, and just-in-time (JIT)
compilation to native code, to name only a

few of its benefits. ASP.NET is also easily


factorable, meaning that developers can
remove modules (a session module, for
instance) that are not relevant to the
application they are developing. ASP.NET
also provides extensive caching services
(both built-in services and caching APIs).
ASP.NET also ships with performance
counters that developers and system
administrators can monitor to test new
applications and gather metrics on existing
applications
.
Writing custom debug statements to your
Web page can help immensely in
troubleshooting your application's code.
However, they can cause embarrassment if
they are not removed. The problem is that
removing the debug statements from your
pages when your application is ready to be
ported to a production server can require
significant effort. ASP.NET offers the Trace
Context class, which allows you to write

custom debug statements to your pages as


you develop them. They appear only when
you have enabled tracing for a page or
entire application. Enabling tracing also
appends details about a request to the page,
or, if you so specify, to a custom trace
viewer that is stored in the root directory of
your application.
The .NET Framework and ASP.NET provide
default authorization and authentication
schemes for Web applications. You can
easily remove, add to, or replace these
schemes, depending upon the needs of your
application.
ASP.NET configuration settings are stored
in XML-based files, which are human
readable and writable. Each of your
applications
can
have
a
distinct
configuration file and you can extend the
configuration scheme to suit your
requirements.

Applications are said to be running side by


side when they are installed on the same
computer but use different versions of the
.NET Framework.
IIS 6.0 uses a new process model called
worker process isolation mode, which is
different from the process model used in
previous versions of IIS. ASP.NET uses this
process model by default when running on
Windows Server 2003.
(3.2.1) Some of the most important
namespaces in the .NET Framework class
library that pertain to ASP.NET are the
following:
System.Web:
Provides classes and interfaces that
enable browser-server communication. This
namespace includes the Http Request class,
which provides extensive information about the
current HTTP request, the Http Response class,
which manages HTTP output to the client, and

the HttpServerUtility class, which provides


access
to
server-side
utilities
and
processes. System. Web also includes classes for
cookie manipulation, file transfer, exception
information, and output cache control.
System.Web.ApplicationServices:
Provides classes that
provide
access
to
ASP.NET
forms
authentication, roles, and profiles application
services
as
Windows
Communication
Foundation (WCF) services.
System.Runtime.Caching:
Contains types that let
you implement caching in .NET Framework
applications.
System.Web.ClientServices:
Contains classes that support

access to the ASP.NET login, roles, and profiles


services from Windows-based applications.
System.Web.Configuration:
Contains classes that are used
to
programmatically
manage
ASP.NET
configuration. (Most configuration settings can
be made in XML files.)
System.Web.DynamicDatas:
Contains classes that provide
the core functionality for ASP.NET dynamic
data and extensibility features that let you
customize dynamic data behavior.
System.Web.Handlers:
Contains HTTP handler classes
that process HTTP requests to a Web server. (An
ASP.NET Web Forms page -- .aspx file -- is a
special form of an HTTP handler.)

System.Web.Management:
Contains classes and
interfaces for managing and monitoring the
health of Web applications.
System.Web.Profile:
Contains classes that are used to
implement the ASP.NET user profile in Web
server applications.
System.Web.Query.Dynamic:
Contains classes that are used to
parse
expressions
from
a LinqDataSource control into a LanguageIntegrated Query (LINQ).
System.Web.RegularExpressions:
Provides regular
expressions that are used to parse ASP.NET
files.
All
members
of
the System.Web.RegularExpressions namespa

ce are descendants of the Regex class. (You


typically do not have to parse ASP.NET pages
yourself.)
System.Web.Routing:
Provides classes that are used with
URL routing, which enables you to use URLs
that do not map to a physical file.
System.Web.Script:
Contains classes that provide
client-script resource information.
System.Web.Script.Services:
Provides attributes to
customize Web service support for using Ajax
functionality in ASP.NET.
System.Web.Security:
Contains classes that are used to
implement ASP.NET security in Web server
applications.

System.Web.Services:
Consists of the classes that enable
you to create XML Web services using ASP.NET
and XML Web service clients. XML Web
services are applications that provide the ability
to exchange messages in a loosely coupled
environment using standard protocols such as
HTTP, XML, XSD, SOAP, and WSDL. XML Web
services let you build modular applications that
are interoperable across a broad variety of
implementations, platforms, and devices.
System.Web.SessionState:
Contains classes and
interfaces that enable storage of data specific to
a single client during a single browser session
on the server. Session state data is used to give
the client the appearance of a persistent
connection with the application.

System.Web.UI:
Provides classes and interfaces that
enable you to create ASP.NET server controls
and ASP.NET Web pages for the user interface
of your ASP.NET Web applications. This
namespace includes the Control class, which
provides all HTML server controls, Web server
controls, and user controls with a common set
of
functionality.
It
also
includes
the Page control,
which
is
generated
automatically whenever a request is made for
an .aspx file in an ASP.NET Web application.
Also included are classes which provide the
server controls with data-binding functionality,
the ability to save the view state of a given
control or page, and parsing functionality.
System.Web.UI.DataVisualization.Charting:
Contains types for
the Chart Web server control.

System.Web.UI.Design.WebControls:
Contains classes that can
be used to extend design-time support for Web
server controls.

Page

and

Control

Framework
The ASP.NET page and controls framework is a
programming framework that runs on a Web
server to dynamically produce and render
ASP.NET Web pages. ASP.NET Web pages can
be requested from any browser or client device,
and ASP.NET renders markup (such as HTML)
to the requesting browser. As a rule, you can use
the same page for multiple browsers, because
ASP.NET renders the appropriate markup for
the browser making the request. However, you
can design your ASP.NET Web page to target a

specific browser and take advantage of the


features of that browser.
ASP.NET Web pages are completely objectoriented. Within ASP.NET Web pages you can
work with HTML elements using properties,
methods, and events. The ASP.NET page
framework removes the implementation details
of the separation of client and server inherent in
Web-based applications by presenting a unified
model for responding to client events in code
that runs at the server. The framework also
automatically maintains the state of a page and
the controls on that page during the page
processing life cycle. For more information
The ASP.NET page and controls framework also
enables you to encapsulate common UI
functionality in easy-to-use, reusable controls.
Controls are written once, can be used in many
pages, and are integrated into the ASP.NET Web
page that they are placed in during rendering.
The ASP.NET page and controls framework also
provides features to control the overall look and

feel of your Web site via themes and skins. You


can define themes and skins and then apply
them at a page level or at a control level.
In addition to themes, you can define master
pages that you use to create a consistent layout
for the pages in your application. A single
master page defines the layout and standard
behavior that you want for all the pages (or a
group of pages) in your application. You can
then create individual content pages that
contain the page-specific content you want to
display. When users request the content pages,
they merge with the master page to produce
output that combines the layout of the master
page with the content from the content page.
The ASP.NET page framework also enables you
to define the pattern for URLs that will be used
in your site. This helps with search engine
optimization (SEO) and makes URLs more userfriendly.

The ASP.NET page and control framework is


designed to generate HTML that conforms to
accessibility guidelines.

ASP.NET Compilation Overview:


In order for application code to service requests
by users, ASP.NET must first compile the code
into one or more assemblies. Assemblies are
files that have the file name extension .dll. You
can write ASP.NET code in many different
languages, such as Visual Basic, C#, J#, and
others. When the code is compiled, it is
translated into a language-independent and
CPU-independent
representation
called
Microsoft Intermediate Language (MSIL). At
run time, MSIL runs in the context of the .NET
Framework, which translates MSIL into CPUspecific instructions for the processor on the
computer running the application.
There are many benefits to compiling
application code including:
Performance Compiled code is much faster
than scripting languages such as

ECMAScript or VBScript because it is a


closer representation to machine code and
does not require additional parsing.
Security Compiled code is more difficult to
reverse engineer than non-compiled source
code because it lacks the readability and
abstraction of a high-level language.
Additionally, there are obfuscation tools that
make compiled code even more resistant to
reverse engineering.
Stability Code is checked at compile time
for syntax errors, type safety, and other
problems. By catching these errors at buildtime you can eliminate many errors in your
code.
Interoperability Because
MSIL
code
supports any .NET language, you can use
assemblies that were originally written in
other languages in your code. For example,
if you are writing an ASP.NET Web page in
C#, you can add a reference to a .dll file that
was written in Visual Basic.

The ASP.NET compilation architecture includes


a number of features including:
Multiple language support.
Automatic compilation.
Flexible deployment.
Extensible build system.
The following sections describe each of these
features.
Multiple Language Support
In ASP.NET 2.0 you can
use different languages such as Visual Basic
and C# in the same application because
ASP.NET will create multiple assemblies, one
for each language. For code stored in the
App_Code folder, you can specify a subfolder
for each language.
Automatic Compilation:
ASP.NET automatically
compiles your application code and any

dependent resources the first time a user


requests a resource from the Web site. In
general, ASP.NET creates an assembly for each
application directory (such as App_Code) and
one for the main directory. (If files in a
directory are in different programming
languages, then separate assemblies will be
created for each language.) You can specify
which directories are compiled into single
assemblies in the Compilation section of the
Web.config file.
Extensible Build System:
ASP.NET
uses BuildProvider classes to build items such
as .aspx pages, .ascx files, and global resources.
You can extend and customize the ASP.NET
build system to compile custom resources by
creating
classes
that
inherit
from
the BuildProvider class. For example, you could

add a new file type and then write


a BuildProvider that builds that particular type.

ASP.NET Security
Security is a very important aspect of
ASP.NET Web applications. The topics
in this section provide background
information about security issues that
occur in Web applications. The topics
include information about how to
mitigate common security threats,
how to protect resources in a Web
application, and about how to

authenticate and authorize individual


users.
ASP.NET
Web
Application
Security:
ASP.NET, in conjunction with Microsoft
Internet Information Services (IIS), can
authenticate user credentials such as
names and passwords using any of
the following authentication methods:
Windows:
Basic,
digest,
or
Integrated Windows Authentication
(NTLM or Kerberos).
Forms authentication, in which you
create a login page and manage
authentication in your application.
Client Certificate authentication
ASP.NET controls access to site information by
comparing authenticated credentials, or
representations of them, to NTFS file system

permissions or to an XML file that lists


authorized users, authorized roles (groups), or
authorized HTTP verbs.
Managing Users by Using Membership:
ASP.NET
membership enables you to validate and
manage user information for your Web
application. It provides functionality for
validating user credentials, creating and
modifying membership users, and managing
user settings such as passwords and e-mail
addresses. ASP.NET membership is primarily
intended for use with ASP.NET forms
authentication, but can be used anywhere within
an ASP.NET application.
ASP.NET membership enables you to manage
user authentication for your application while
keeping the user information in the data source
of your choice. Because ASP.NET membership

uses providers to the membership data source, it


does not require extensive code to read and
write membership information.
ASP.NET membership consists primarily of
built-in
membership
providers,
which
communicate with the data source, and the
static Membership class that exposes the
functionality of the membership providers. You
call the Membership class from your ASP.NET
code to perform user validation and
management.

C# language and the .net


framework
History of C#
.NET framework offers a myriad of languages
which puts us programmers into a deep
thought process about which programming
language best suits our needs.

Which language is the "best" language choice?


If you are a VB wizard, should you take
the time to learn C# or continue to use
VB.NET? Are C# ASP.NET pages "faster" than
VB .NET ASP.NET pages? These are questions
that you may find yourself asking,
especially when you're just starting to delve into
.NET. Fortunately the answer is simple:
there is no "best" language. All .NET languages
use, at their root, functionality from the
set of classes provided by the .NET Framework.
Therefore, everything
you can do in VB.NET you can do in C#, and
vice-a-versa.
The differences occur in three main areas:
syntax, object-oriented principles, and the
Visual Studio .NET IDE. Syntax concerns the
statements and language elements. Object
Oriented differences are less obvious, and
concern differences in implementation and

feature sets between the two languages. IDE


differences include things like compiler
settings or attributes. There is also a fourth area
of difference: language features that are
present in one language but have no equivalent
in the other.
If you are more familiar with Java, JScript, or
C/C++, you may find C#'s syntax more
familiar than VB.NET's.
A good question that has to be answered in
order to keep you interested in learning C# is
Why should you learn another programming
language when you already doing enterprise
development in C++ or Java. The very answer
at the first go will be C# is intended to be
the premier language for writing NGWS (Next
Generation of Windows Services)
applications in the enterprise computing world.
The programming language C# derives from C
and C++; however apart from being

entirely object oriented it is type safe and simple


too. If you are a C/C++ programmer
your learning curve should be flat. Many C#
statements including expressions and
operators have been taken directly taken from
your favourite language
An important point about C# is that it simplifies
and modernizes C++ in the areas of
classes, namespaces and exception handling.
Much of complex features have not been
included or in fact hidden in C# to make it
easier to use and more importantly less error
prone for e.g. no more macros, templates and
no multiple inheritances (Few of you might
not like it.)
The only expense that I can think of is that your
code operates in safe mode, where no
pointers are allowed. However if you want to
use pointers you are not restricted from
using it via unsafe code- and no marshalling is
involved when calling the unsafe code.

About C#
C# is an elegant and type-safe object-oriented
language that enables developers to build a
wide range of secure and robust applications
that run on the .NET Framework. You can use
C# to create traditional Windows client
applications, XML Web services, distributed
components,
client-server
applications,
database applications, and much, much more.
Microsoft Visual C# 2005 provides an advanced
code editor, convenient user interface designers,
integrated debugger, and many other tools to
facilitate rapid application development based
on version 2.0 of the C# language and the .NET
Framework.
C# syntax is highly expressive, yet with less
than 90 keywords, it is also simple and easy to
learn. The curly-brace syntax of C# will be

instantly recognizable to anyone familiar with


C, C++ or Java. Developers who know any of
these languages are typically able to begin
working productively in C# within a very short
time. C# syntax simplifies many of the
complexities of C++ while providing powerful
features such as null able value types,
enumerations, delegates, anonymous methods
and direct memory access, which are not found
in Java. C# also supports generic methods and
types, which provide increased type safety and
performance, and iterators, which enable
implementers of collection classes to define
custom iteration behaviors that are simple to
use by client code.
As an object-oriented language, C# supports
the concepts of encapsulation, inheritance and
polymorphism. All variables and methods,
including the Main method, the application's

entry point, are encapsulated within class


definitions. A class may inherit directly from
one parent class, but it may implement any
number of interfaces. Methods that override
virtual methods in a parent class require
the override keyword as a way to avoid
accidental redefinition. In C#, a struct is like a
lightweight class; it is a stack-allocated type
that can implement interfaces but does not
support inheritance.
In addition to these basic object-oriented
principles, C# facilitates the development of
software components through several innovative
language constructs, including:
Encapsulated method signatures called
delegates, which enable type-safe event
notifications.
Properties, which serve as accessors for
private member variables.

Attributes, which provide declarative


metadata about types at run time.
Inline XML documentation comments.
If you need to interact with other Windows
software such as COM objects or native Win32
DLLs, you can do this in C# through a process
called "Interop." Interop enables C# programs
to do just about anything that a native C++
application can do. C# even supports pointers
and the concept of "unsafe" code for those cases
in which direct memory access is absolutely
critical.
The C# build process is simple compared to C
and C++ and more flexible than in Java. There
are no separate header files, and no
requirement that methods and types be declared
in a particular order. A C# source file may
define any number of classes, structs,
interfaces, and events.
C# programs run on the .NET Framework, an
integral component of Windows that includes a
virtual execution system called the common

language runtime (CLR) and a unified set of


class libraries. The CLR is Microsoft's
commercial implementation of the common
language infrastructure (CLI), an international
standard that is the basis for creating execution
and development environments in which
languages and libraries work together
seamlessly.
Source code written in C# is compiled into an
intermediate language (IL) that conforms to the
CLI specification. The IL code, along with
resources such as bitmaps and strings, is stored
on disk in an executable file called an assembly,
typically with an extension of .exe or .dll. An
assembly contains a manifest that provides
information on the assembly's types, version,
culture, and security requirements.
When the C# program is executed, the assembly
is loaded into the CLR, which might take
various actions based on the information in the
manifest. Then, if the security requirements are
met, the CLR performs just in time (JIT)
compilation to convert the IL code into native

machine instructions. The CLR also provides


other services related to automatic garbage
collection, exception handling, and resource
management. Code that is executed by the CLR
is sometimes referred to as "managed code," in
contrast to "unmanaged code" which is
compiled into native machine language that
targets a specific system. The following diagram
illustrates the compile-time and run time
relationships of C# source code files, the base
class libraries, assemblies, and the CLR.

Language interoperability is a key feature of the


.NET Framework. Because the IL code
produced by the C# compiler conforms to the
Common Type Specification (CTS), IL code
generated from C# can interact with code that
was generated from the .NET versions of Visual

Basic, Visual C++, Visual J#, or any of more


than 20 other CTS-compliant languages. A
single assembly may contain multiple modules
written in different .NET languages, and the
types can reference each other just as if they
were written in the same language.
In addition to the run time services, the .NET
Framework also includes an extensive library of
over 4000 classes organized into namespaces
that provide a wide variety of useful
functionality for everything from file input and
output to string manipulation to XML parsing,
to Windows Forms controls. The typical C#
application uses the .NET Framework class
library extensively to handle common
"plumbing" chores.
Statements:
In C#, a complete program
instruction is called a statement and each
statement ends with a semicolon (;) . Programs
consist of sequences of statements such as:

Int my Variable;
// a statement
My Variable = 23;
// another
statement
Int another Variable = my Variable; // yet
another statement
The compiler starts at the beginning of a source
code file and reads down, executing statement
after statement in the order encountered. This
would be entirely straightforward, and terribly
limiting, were it not for branching. Branching
allows you to change the order in which
statements are evaluated.
3.3.4 Data Types
C# is a strongly typed
language. That means that every object you
create or use in a C# program must have a
specific type (e.g., you must declare the object
to be an integer or a string or a Dog or a
Button). Essentially, the type indicates how big
the object is (in memory) and what it can do.

Types come in two flavors: those that are built


into the language (intrinsic types) and those you
create. C# offers a number of intrinsic types,
show in table
Table. The intrinsic types
C#
type

Size
(in .NET
Description
bytes type
)

byte

Byte

Unsigned (values 0-255).

char

Char

Unicode characters.

bool

Boolea
True or false.
n

sbyte

SByte

Signed (values -128 to


127).

short

Int16

Signed (short) (values


-32,768 to 32,767).

ushort 2

Unsigned (short) (values 0


UInt16
to 65,535).

Int

Signed integer values


between
-2,147,483,648
and 2,147,483,647.

Int32

Unsigned integer values


UInt32 between
0
and
4,294,967,295.

Floating point number.


Holds the values from
approximately +/-1.5 * 10Single 45
to approximately +/-3.4
* 1038 with 7 significant
figures.

Double-precision floating
point; holds the values
from approximately +/-5.0
Double
* 10-324 to approximately
+/-1.8 * 10308 with 1516
significant figures.

Uint

float

double

decima 12
l

Decima Fixed-precision up to 28
l
digits and the position of
the decimal point. This is

typically used in financial


calculations. Requires the
suffix "m" or "M."
long

Signed integers ranging


from
-9,223,372,036,854,775,80
8
to
9,223,372,036,854,775,80
7.

Int64

Unsigned integers ranging


UInt64 from 0 to approximately
1.85 * 1019.

ulong

Each type has a name (such as int) and a size


(such as 4 bytes). The size tells you how many
bytes each object of this type occupies in
memory. (Programmers generally don't like to
waste memory if they can avoid it, but with the
cost of memory these days, you can afford to be
mildly profligate if doing so simplifies your
program.) The description field of tells you the
minimum and maximum values you can hold in
objects of each type.

3.3.5 Variables
A variable is an instance of an
intrinsic type (such as int) that can hold a
value:
int my Variable = 15;
You initialize a variable by writing its type, its
identifier, and then assigning a value to that
variable. An identifier is just an arbitrary name
you assign to a variable, method, class, or other
element. In this case, the variable's identifier is
myVariable.You can define variables without
initializing them:
int my Variable;
You can then assign a value to my Variable later
in your program:
int my
Variable;
// some other code here
my Variable = 15; //
assign 15 to my Variable
You can also change the value of a variable
later in the program. That is why they're called
variables; their values can vary.
Int my Variable;

my Variable = 15;
my Variable = 12; // now it is 12

3.3.6
Constants:
Variables are a powerful tool, but there are
times when you want to manipulate a defined
value, one whose value you want to ensure
remains constant. A constant is like a variable
in that it can store a value. However, unlike a
variable, you cannot change the value of a
constant while the program runs.For example,
you might need to work with the Fahrenheit
freezing and boiling points of water in a
program simulating a chemistry experiment.
Your program will be clearer if you name the
variables that store these values FreezingPoint
and BoilingPoint, but you do not want to
permit their values to be changed while the
program is executing. The solution is to use a
constant. Constants come in three flavors:
literals, symbolic constants, and enumerations.
3.3.6.1
Literal
Constants:
A literal constant is just a value. For example,

32 is a literal constant. It does not have a name;


it is just a literal value. And you can't make the
value 32 represent any other value. The value of
32 is always 32. You can't assign a new value to
32, and you can't make 32 represent the value
99 no matter how hard you might try.
3.3.6.2.
Symbolic
Constants:
Symbolic constants assign a name to a constant
value. You declare a symbolic constant using
the following syntax:
const type identifier = value;
The const keyword is followed by a type, an
identifier, the assignment operator (=), and the
value with which you'll initialize the constant.
This is similar to declaring a variable, except
that you start with the keyword const and
symbolic constants must be initialized. Once
initialized, a symbolic constant cannot be
altered. For example, in the following
declaration, 32 is a literal constant and

Freezing Point is a symbolic constant of type


int:
const int FreezingPoint = 32;
3.3.6.3.
Enumerations:
Enumerations provide a powerful alternative to
literal or simple symbolic constants. An
enumeration is a distinct value type, consisting
of a set of named constants (called the
enumerator list).you created two related
constants:
const int Freezing Point = 32;
const int BoilingPoint = 212;
You might want to add a number of other useful
constants to this list as well, such as:
const int LightJacketWeather = 60;
const int SwimmingWeather = 72;
const int WickedCold = 0;

Notice, however, that this process is somewhat


cumbersome; also, this syntax shows no logical
connection among these various constants. C#
provides
an
alternate
construct,
the
enumeration, which allows you to group
logically related constants, as in the following:
enum Temperatures
{
WickedCold = 0,
FreezingPoint = 32,
LightJacketWeather = 60,
SwimmingWeather = 72,
BoilingPoint = 212,
}
3.3.7
Strings:
It is nearly impossible to write a C# program
without creating strings . A string object holds
a series of characters. You declare a string
variable using the string keyword much as you
would create an instance of any type:
string my String;

You specify a string literal by enclosing it in


double quotes:
"Hello World"
It is common to initialize a string variable that
contains a string literal:
string my String = "Hello World";
3.3.8
Expressions
Statements that evaluate to a value are called
expressions. You may be surprised how many
statements do evaluate to a value. For
example, an assignment such as:
my Variable = 57;
Is an expression; it evaluates to the value
assigned in this case, 57.
Because my Variable = 57 is an expression that
evaluates to 57, it can be used as part of
another assignment, such as:
mySecondVariable = my Variable = 57;
What happens in this statement is that the literal
value 57 is assigned to the variable my
Variable. The value of that assignment (57) is
then assigned to the second variable,

mySecondVariable. Thus, the value 57 is


assigned to both variables. You can assign a
value to any number of variables with one
statement using the assignment operator (=), as
in the following:
int a,b,c,d,e;
a = b = c = d = e = 20;

Net Architecture and the .Net Framework:


In the .Net Architecture
and the .Net Framework there are different
important terms and concepts which we will
discuss one by one.
Common Language Runtime (CLR):
The most important
concept of the .Net Framework is the existence
and functionality of the Net Common Language

Runtime (CLR), also called .Net Runtime in


short. It is a framework.layer that resides above
the OS and handles the execution of all the .Net
applications. Our programs don't directly
communicate with the OS but go through the
CLR.
MSIL (Microsoft Intermediate Language)
Code:

When we compile

our .Net Program using any .Net compliant


language (like C#, VB.Net, C++.Net) it does
not get converted into the executable binary
code but to an intermediate code, called MSIL
or IL, understandable by CLR. MSIL is OS and
hardware independent code. When the program
needs to be executed, this MSIL, or intermediate

code, is converted to binary executable code


(native code). The presence of IL makes
possible the Cross Language Relationship as all
the .Net compliant languages produce similar,
standard IL code.
Just In Time Compilers (JITers)
When our IL compiled code
needs to be executed, CLR invokes the JIT
compilers which compile the IL code to native
executable code (.exe or .dll) that is designed
for the specific machine and OS. JITers in many
ways are different from traditional compilers as
they compile the IL to native code only when
desired; e.g., when a function is called, the IL of
the function's body is converted to native code

just in time. So, the part of code that is not used


by that particular run is never converted to
native code. If some IL code is converted to
native code, then the next time it's needed, the
CLR reuses the same (already compiled)copy
without re-compiling. So, if a program runs for
sometime (assuming that all or most of the
functions get called), then it won't have any
just-in-time performance penalty. As JITers are
aware of the specific processor and OS at
runtime, they can optimize the code extremely
efficiently resulting in very robust applications.
Also, since a JIT compiler knows the exact
current state of executable code, they can also
optimize the code by in-lining small function

calls (like replacing body of small function


when its called in a loop, saving the function
call time). Although Microsoft stated that C#
and .Net are not competing with languages like
C++ in efficiency and speed of execution,
JITers can make your code even faster than C+
+ code in some cases when the program is run
over an extended period of time (like webservers).
Framework Class Library (FCL)
The .Net Framework
provides a huge Framework (or Base) Class
Library (FCL) for common, usual tasks. FCL
contains thousands of classes to provide access
to Windows API and common functions like

String Manipulation, Common Data Structures,


IO,

Streams,

Threads,

Security,

Network

Programming, Windows Programming, Web


Programming, Data Access, etc. It is simply the
largest standard library ever shipped with any
development

environment

or

programming

language. The best part of this library is they


follow extremely efficient OO design (design
patterns) making their access and use very
simple and predictable. You can use the classes
in FCL in your program just as you would use
any other class. You can even apply inheritance
and polymorphism to these classes.
Common Language Specification (CLS)
Earlier, we used the term

'.Net Compliant Language' and stated that all


the .Net compliant languages can make use of
CLR and FCL. But what makes a language a
'.Net compliant' language? The answer is the
Common

Language

Microsoft

has

Specification

released

small

(CLS).
set

of

specifications that each language should meet


to qualify as a .Net Compliant Language. As IL
is a very rich language, it is not necessary for a
language to implement all the IL functionality;
rather, it merely needs to meet a small subset of
CLS to qualify as a (Net compliant language.
This is the reason why so many languages
(procedural and OO.are now running under
the .Net umbrella. CLS basically addresses

language design issues and lays down certain


standards. For instance, there shouldn't be any
global function declarations, no pointers, no
multiple inheritance and things like that. The
important point to note here is that if you keep
your code within the CLS boundary, your code
is guaranteed to be usable in any other .Net
language.
Common Type System (CTS):
.Net also defines a Common
Type System (CTS). Like CLS, CTS is also a set
of standards.CTS defines the basic data types
that IL understands. Each .Net compliant
language should map its data types to these
standard data types. This makes it possible for

the 2 languages to communicate with each


other by passing/receiving parameters to/from
each other. For example, CTS defines a type,
Int32, an integral data type of 32 bits (4 bytes)
which is mapped by C# through int and VB.Net
through its Integer data type.
Garbage Collector (GC) :
CLR also contains the Garbage
Collector (GC), which runs in a low-priority
thread

and

checks

for

un-referenced,

dynamically allocated memory space. If it finds


some data that is no longer referenced by any
variable/reference, it re-claims it and returns it
to the OS so it can be used by other programs
as needed. The presence of a standard Garbage

Collector frees the programmer from keeping


track of dangling data.
(3.4.4) Basic Data Types and their mapping to
the CTS (Common Type System)

There

are two kinds of data types in VB.Net


1. Value type (implicit
data types, Structure and Enumeration)
2. Reference Type (objects,
delegates)

Value

types are passed to methods by passing an exact


copy while Reference types are passed to
methods by passing only their reference
(handle). Implicit data types are defined in the
language core by the language vendor, while
explicit data types are types that are made by

using or composing implicit data types .Implicit


data types in .net compliant languages are
mapped to types in Common Type System (CTS)
and CLS (Common Language Specification).
Hence, each implicit data type in VB.Net has its
corresponding .Net type. The implicit data types
in VB.Net are:
Boolean
Char
Byte
Short
Integer(default)
Long
Single

Double(default)
Decimal
Implicit data types are represented in language
using 'keywords'; so each of above is a keyword
in VB.Net (Keyword are the words defined by
the language and can not be used as
identifiers). It is worth-noting that string is also
an implicit data type in VB.Net, so String is a
keyword in VB.Net. Last point about implicit
data types is that they are value types and thus
stored at the stack, while user defined types or
referenced types are stored at heap. Stack is a
data structure that store items in last in first out
(LIFO) fashion. It is an area of memory
supported by the processor and its size is

determined at the compile time. Heap is the


total memory available at run time. Reference
types are allocated at heap dynamically (during
the execution of program). Garbage collector
searches for non-referenced data in heap during
the execution of program and returns that space
to Operating System.

INTRODUCTION TO SQL
SERVER
INTRODUCTION
Microsoft SQL Server is a relational model
database server produced by Microsoft. Its
primary query languages are T-SQL and ANSI
SQL. The current version of SQL Server, SQL
Server 2008, (code-named "Katmai",) was
released (RTM) on August 6, 2008and aims to
make data management self-tuning, self
organizing, and self maintaining with the
development of SQL Server Always On
technologies, to provide near-zero downtime.
SQL Server 2008 also includes support for
structured and semi-structured data, including
digital media formats for pictures, audio, video
and other. multimedia data. In current versions,

such multimedia data can be stored as BLOBs


(binary large objects), but they are generic bit
streams. Intrinsic awareness of multimedia data
will allow specialized functions to be performed
on them. According to Paul Flessner, senior
Vice President, Server Applications, Microsoft
Corp., SQL Server 2008 can be a data storage
backend for different varieties of data: XML,
email, time/calendar, file, document, spatial, etc
as well as perform search, query, analysis,
sharing, and synchronization across all data
types.
Other new data types include specialized date
and time types and a Spatial data type for
location-dependent data. Structured data and
metadata about the file is stored in SQL Server
database, whereas the unstructured component
is stored in the file system. Such files can be
accessed both via Win32 file handling APIs as

well as via SQL Server using T-SQL; doing the


latter accesses the file data as a BLOB. Backing
up and restoring the database backs up or
restores the referenced files as well. SQL Server
2008 also natively supports hierarchical data,
and includes T-SQL constructs to directly deal
with them, without using recursive queries.
The Full-Text Search functionality has been
integrated with the database engine, which
simplifies
management
and
improves
performance. Spatial data will be stored in two
types. A "Flat Earth" (GEOMETRY or planar)
data type represents geospatial data which has
been projected from its native, spherical,
coordinate system into a plane. A "Round
Earth" data type (GEOGRAPHY) uses an
ellipsoidal model in which the Earth is defined
as a single continuous entity which does not
suffer from the singularities such as the

international dateline, poles, or map projection


zone "edges". Approximately 70 methods are
available to represent spatial operations for the
Open Geospatial Consortium Simple Features
for SQL, Version 1.1.SQL Server includes better
compression features, which also helps in
improving scalability. It also includes Resource
Governor that allows reserving resources for
certain users or workflows. It also includes
capabilities for transparent encryption of data
as well as compression of backups. SQL Server
2008 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 from Dundas Data
Visualization Inc., which was acquired by
Microsoft. On the management side, SQL Server

2008 includes the Declarative 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 2008 supports IntelliSense for SQL
Queries against a SQLServer2008 Database
Enginehttp://en.wikipedia.org/wiki/Microsoft_S
QL_Server - cite_note-14. SQL Server 2008
also makes the databases available via
Windows Power Shell providers and
management functionality available as Cmdlets,
so that the server and all the running instances
can be managed from Windows PowerShell.
SQL Server 2008 R2.
SQL Server 2008 R2 :(formerly codenamed
SQL Server "Kilimanjaro") was announced at
TechEd 2009. SQL Server 2008 R2 adds certain
features to SQL Server 2008 including master

data management system branded as Master


Data Services, a centralized console to manage
multiple SQL Server instances, and support for
more than 64 logical processors.

Creation of Database
CREATING DATA BASE IN SQL SERVER
Run the following query in query window
Create database imp(database name)
Another way:The following steps demonstrate how to create a
database in SQL Server using Enterprise
Manager.
Right click on the "Databases" icon and
select "New Database...":

Creating new Databse

Name your database and click "OK":

Naming the database


New database appears under the "Databases"
section of Enterprise Manager.

New database is based on the "Model"


database. The Model database is a system
database which is used as a template whenever
a new database is created. If we use the left
pane to navigate to our database and expand
the tree, we will notice that our database
already contains a number of objects. For
example, it already contains tables, views, and
stored procedures. These are system objects
which provide information about the database.

Default data files in the database


We have just created a database using the
default options. When we created the database,
a "Data File" and a "Transaction Log" were
created. They were created in the default
location for our server.
If we'd wanted to, we could have specified a
different location for these files by using the
"Data Files" tab and "Transaction Log" tab. We
also could have changed specifications on
whether to allow the file to grow automatically
(as it stores more and more data), and if so, how
that growth should be managed.

Properties of data
base
How to create a table in a Database
Create table useraccout(table name)(id int
identity,username varchar(50))
Another way:-1.Ensuring you have the right
database expanded, right click on the "Tables"

icon

and

select

"New

Table...":

Creating tables in the database


While you have this screen
open, do the following: Using the values in the
screenshot, complete the details in the "Column
Name" column, the "Data Type" column,
"Length" column, and "Allow Nulls" column.

Make the IndividualId column an "identity


column", by setting "Identity" to "Yes" (just use
the same values as in the screenshot). Note that
to set values in the bottom pane, you need to
select the column name in the top pane first).
This column is going to be an auto-number
column - it will contain an incrementing number
for each record that is created.
Set the "Default Value" of the DateCreated
column to (getdate()). (This will automatically
insert the current date into that field for each
new record).

Design of a table
What we are doing at this stage, is creating the
column names, specifying the type of data that
can be entered into them, and setting default
values. Restricting the data type for each
column is very important and helps maintain
data integrity. For example, it can prevent us
from accidentally entering an email address
into a field for storing the current date.

Close the table by clicking the close icon, and


when
prompted,
name
your
table:
We can use Enterprise Manager to add data all we need to do is open the table, then start
typing.
To open the table, right click on the table
you wish to open, and select "Open Table >
Return all rows":

Opening of a table

You can now start entering the data directly


into your table.

Das könnte Ihnen auch gefallen