Download presentation
Presentation is loading. Please wait.
1
Overview of SQL Server Alka Arora
2
SQL Server: Introduction
Microsoft SQL Server is an application used to create computer databases for the Microsoft Windows family of server operating systems. Microsoft SQL Server provides an environment used to generate databases that can be accessed from workstations, the Internet, or other media such as a personal digital assistant (PDA). SQL Server Microsoft® SQL Server™ is designed to work effectively in a number of environments: As a two-tier or multitier client/server database system As a desktop database system Client/Server Database Systems Client/server systems are constructed so that the database can reside on a central computer, known as a server, and be shared among several users. Users access the server through a client or server application: In a two-tier client/server system, users run an application on their local computer, known as a client, that connects over a network to the server running SQL Server. The client application runs both business logic and the code to display output to the user, and is also known as a thick client This is a typical scenario for an Internet application. For example, a server application can run on a Microsoft Internet Information Services (IIS) and service thousands of thin clients running on the Internet or an intranet.. SQL Server can be installed on the same computer as IIS, or it can be installed on a separate server in the network.
3
Accessibility MS SQL Server is accessed by applications using the Structured query language (SQL). SQL is the language used to access and program relational databases. SQL Server is used to interact with a database. Recently, it has been widely used in Web applications involving a database back-end. It allows you to enter, edit, delete, and retrieve lots of data very quickly.
4
Features of SQL Server Internet Integration.
It has the scalability, availability, and security features required to operate as the data storage component of the largest Web sites. Scalability and Availability The same database engine can be used across platforms ranging from laptop computers running Microsoft Windows® 98 through large, multiprocessor servers running Microsoft Windows 2000 Data Center Edition. SQL Server 2000 Enterprise Edition supports features such as indexed views, and large memory support that allow it to scale to the performance levels required by the largest Web sites.
5
Other Features of SQL Server
Ease of installation, deployment, and use It includes a set of administrative and development tools that improve upon the process of installing, deploying, managing, and using SQL Server across several sites. These features allows to rapidly deliver SQL Server applications that customers can implement with a minimum of installation and administrative overhead. Data warehousing SQL Server 2000 includes tools for extracting and analyzing summary data for online analytical processing. Features of SQL Server Ease of installation, deployment, and use. SQL Server includes a set of administrative and development tools that improve your ability to install, deploy, manage, and use SQL Server across several sites. Scalability The same database engine can be used across platforms ranging from laptop computers running Microsoft Windows® 95/98 to large, multiprocessor servers running Microsoft Windows NT®, Enterprise Edition. Data warehousing SQL Server includes tools for extracting and analyzing summary data for online analytical processing (OLAP). SQL Server also includes tools for visually designing databases and analyzing data using English-based questions. System integration with other server software Server integrates with , the Internet, and Windows
6
Data management features of MS SQL Server
MS SQL Server consists of a number of programs that provide for managing data stored in databases: The Enterprise Manager (EM) allows the user to manage their data objects (tables, views). The Query Analyzer (QA) assists users in creating and managing queries against their databases. There is a facility to import/export data to/from databases. There is a facility to take database backup and restore that backup.
7
Connecting to MS-SQL Server databases
Connection to a database is accomplished in one of three ways: via a console application like EM, QA, or import/export via a standalone application that you write via a web-based application that you write
8
Connecting using a console application
To connect to an MS-SQL database this way, start an application like EM; Go to the Windows Start menu, then Programs -> Microsoft SQL Server -> Enterprise Manager, Then identify your database.
9
Connecting using a standalone application
To connect this way: Use Windows Authentication. Create a user DSN (Data Source Name) in advance and use it in your application.
10
Connecting using a web application
Use SQL Sever Authentication. SQL Server Authentication requires that you provide the SQL Server name and the password associated with this user. The user name and password are necessary in this case, as authentication to the database is NOT handled by Windows.
11
Graphical Tools Microsoft Management Console (MMC)
SQL Server Enterprise Manager Microsoft Management Console (MMC) is a tool that presents a common interface for managing different server applications in a Microsoft® Windows® network. SQL Server Enterprise Manager SQL Server Enterprise Manager allows for easy enterprise-wide configuration and management of SQL Server and SQL Server objects. SQL Server Enterprise Manager provides a powerful scheduling engine, administrator alert capability, and a built-in replication management interface. You can also use SQL Server Enterprise Manager to: Manage logins, permissions, and users. Create scripts. Manage backup devices and databases. Back up databases and transaction logs. Manage tables, views, stored procedures, triggers, indexes, rules, defaults, and user-defined data types. Create full-text indexes, database diagrams, and database maintenance plans. Import and export & Transform data. Perform various Web administration tasks.
12
SQL Server Query Analyzer
SQL Server Query Analyzer is a graphical user interface for designing and testing SQL statements, batches, and scripts interactively. SQL Server Query Analyzer SQL Server Query Analyzer is a graphical query tool that provides a way to analyze the plan of a query, execute multiple queries simultaneously, view data, and recommend indexes. SQL Server Query Analyzer provides the SHOWPLAN option, which is used to report data retrieval methods chosen by the SQL Server query optimizer. SQL Server Query Analyzer offers the following features: Free-form text editor for keying in Transact-SQL statements. Color coding of Transact-SQL syntax to improve the readability of complex statements. Results presented in either a grid or a free-form text window. Graphical diagram of the showplan information showing the logical steps built into the execution plan of a Transact-SQL statement. This allows programmers to determine what specific part of a poorly-performing query is using a lot of resources. They can then explore changing the query in ways that minimize the resource usage while still returning the desired data.
13
Service Manager SQL Server Service Manager is used for starting, stopping and pausing (MSSQL Server services). SQL Server Service Manager You can do following tasks with SQL Server Service Manager: Open the SQL Server Service Manager dialog box. Select a service. Start, continue, pause, or stop the selected service. Set options for the selected service. Get information about the SQL Server Service Manager application. Exit the application.
14
Data Transformation Services (DTS)
DTS provides import and export capabilities to SQL Server. DTS can import data from another SQL Server, from Microsoft Access, text files, Microsoft Excel, Oracle, FoxPro etc. DTS imports and exports data.
15
Backup and Restore Service
The backup and restore component provides an important safeguard for protecting critical data stored in SQL Server databases. With proper planning, you can recover from many failures, including: Media failure User errors Permanent loss of a server. Additionally, backing up and restoring databases is useful for other purposes, such as copying a database from one server to another. By backing up a database from one computer and restoring the database to another, a copy of a database can be made quickly and easily. Taking a database backup Expand a server group; then expand a server. Expand Databases, right-click the database, point to All Tasks, and then click Database Backup.... On the General tab, in Name, enter the set name. Optionally, in Description, enter a description of the backup set. Under, select Database – choose complete. Under Destination, click Add... to add an existing or create a new device, or click Remove to remove a device from the list of devices to be used. In the SQL Server dialog box, under Overwrite, select: Append to media to append the to any existing on the device. Overwrite existing media to overwrite any existing on the device. Optionally, select Schedule to schedule the operation for later or periodic execution.
16
Replication Services They are used to keep data in synchronization between SQL Server databases and other systems such as Oracle, Microsoft Access, handheld devices, and more. You can use replication to send data to multiple systems as data changes, on a scheduled basis.
17
(XML) capability SQL Server 2000 provides basic XML capabilities.
Documents can enable data transfer between heterogeneous programs or data sources.
18
Stored Procedures It’s a procedure that is designed and stored on the SQL Server. They can be called any number of times in your program. They are used when a certain operation requires a large amount of Transact-SQL code or is performed repetitively. Stored procedures can be faster than batches of Transact-SQL code. They allow faster execution.
19
Indexes An index is a tool that SQL Server uses to access data quickly. The analogy that is most often used to describe a database index is that of a book. In the case of the book's index, you can find the page numbers where a word is located. In the case of SQL Server, the server's Query Optimization engine uses an index to find where data is located physically on a hard drive.
20
Create New Database To visually create a database, open Microsoft SQL Server Management Studio. In the Object Explorer, expand the server name followed by the Databases node. Right-click Databases and click New Database Give name to database
21
Add a Table In the Object Explorer, expand the database and expand its Tables node. Right-click the Tables node and click New Table... Enter a name for each column and select its data type:
22
Data Types Integers bigint int smallint tinyint bit
Integer (whole number) data from -2^63 (-9,223,372,036,854,775,808) through 2^63-1 (9,223,372,036,854,775,807). int Integer (whole number) data from -2^31 (-2,147,483,648) through 2^ (2,147,483,647). smallint Integer data from -2^15 (-32,768) through 2^ (32,767). tinyint Integer data from 0 through 255. bit Integer data with either a 1 or 0 value.
23
Data Types Character Strings char [(n)] varchar[(n)] text
Fixed-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is n bytes. varchar[(n)] Variable-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is the actual length in bytes of the data entered, not n bytes. The data entered can be 0 characters in length. text Variable-length non-Unicode data with a maximum length of 2^ (2,147,483,647) characters. Unicode Character Strings nchar, nvarchar
24
Data Types Binary Strings binary varbinary Image
Fixed-length binary data with a maximum length of 8,000 bytes varbinary Variable-length binary data with a maximum length of 8,000 bytes. Image Variable-length binary data with a maximum length of 2^ (2,147,483,647) bytes
25
Data Types datetime and smalldatetime datetime smalldatetime
Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of three-hundredths of a second, or 3.33 milliseconds. smalldatetime Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute
26
THANKS
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.