In The Name Of Allah Mohammad Ahsan [email_address] My Topic Consists Sql Server 2008 This is very small presentation of sql server Email:
What is Sql Server? SQL Stands For Structure Query Language Microsoft SQL Server is a relational model database server produced By Microsoft. Its Primary query languages are T-SQL and ANSI-SQL. SQL lets you access and manipulate databases. Although SQL is an ANSI ( American National Standards Institute ) standard, there are many different versions of the SQL language. However, to be compliant with the ANSI standard, they all support at least the major commands ( such as SELECT, UPDATE, DELETE, INSERT, WHERE ) in a similar manner.
R D B M S RDBMS is the basis for SQL , and for all modern database systems like MS SQL Server , IBM DB2 , Oracle, MySQL , and Microsoft Access . RDBMS stands for Relational Database Management System The data in RDBMS is stored in database objects called tables . A table is a collection of related data entries and it consists of columns and rows .
SQL Server 2008 R2 SQL Server 2008 R2 (formerly codenamed SQL Server " Kilimanjaro ") was announced at TechEd 2009, and was released to manufacturing on April 21, 2010 . SQL Server 2008 R2 adds certain features to SQL Server 2008 including a master data management system branded as Master Data Services , a central management of master data entities and hierarchies .
SQL Server 2008 R2 Also Multi Server Management, a centralized console to manage multiple SQL Server 2008 instances and services including relational databases , Reporting Services , Analysis Services & Integration Services . SQL Server 2008 R2 includes a number of new services, including PowerPivot for Excel and SharePoint , Master Data Services , StreamInsight , Report Builder 3.0 , Reporting Services Add-in for SharePoint, a Data-tier function in Visual Studio that enables packaging of tiered databases as part of an application, and a SQL Server Utility named UC ( Utility Control Point ), part of AMSM ( Application and Multi-Server Management ) that is used to manage multiple SQL Servers
Data Management Data Management deals with managing large amount of information Which involves both the storage of information and the provision of Mechanisms for manipulation of information . Database System Database Systems evolved in the late 1960s to address common issues In applications handling large volumes of data . Which are also data Intensive .some of these issues could be traced back to the Disadvantages of file based system .
DBMS Database Management System A database management system can be defined as a collection of Related records and a set of programs that access and manipulate these Records . A database management system enables the user to enter, store and Manage data . The main problem with the earlier DBMS packages was that the data Was stored in the flat file format. So the information about different objects was maintained separately In different physical files .Hence the relation between these objects If any had to be maintained in a separate physical files .
Working in Sql Server <ul><li>SQL DML and DDL </li></ul><ul><li>SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL). </li></ul><ul><li>The query and update commands form the DML part of SQL: </li></ul><ul><li>SELECT - extracts data from a database </li></ul><ul><li>UPDATE - updates data in a database </li></ul><ul><li>DELETE - deletes data from a database </li></ul><ul><li>INSERT INTO - inserts new data into a database </li></ul><ul><li>The DDL part of SQL permits database tables to be created or deleted. It also define indexes (keys), specify links between tables, and impose constraints between tables. The most important DDL statements in SQL are: </li></ul><ul><li>CREATE DATABASE - creates a new database </li></ul><ul><li>ALTER DATABASE - modifies a database </li></ul><ul><li>CREATE TABLE - creates a new table </li></ul><ul><li>ALTER TABLE - modifies a table </li></ul><ul><li>DROP TABLE - deletes a table </li></ul><ul><li>CREATE INDEX - creates an index (search key) </li></ul><ul><li>DROP INDEX - deletes an index </li></ul>
Create Table Syntax for creating database Create database <database_name> Create table Current_Account (Account_no char(20), Account_title varchar(30), Account_type varchar(30), Account_Balance Char(20) Now Insert Record in this Current Account table. Statement Insert into Current_Account Values (‘account_no’,’account_title’,’account_type’,’account_bal’) Table is created
SQL Functions <ul><li>AVG() - Returns the average value </li></ul><ul><li>COUNT() - Returns the number of rows </li></ul><ul><li>FIRST() - Returns the first value </li></ul><ul><li>LAST() - Returns the last value </li></ul><ul><li>MAX() - Returns the largest value </li></ul><ul><li>MIN() - Returns the smallest value </li></ul><ul><li>SUM() - Returns the sum </li></ul>SQL aggregate functions return a single value, calculated from values in a column. Useful aggregate functions
SQL Scalar Functions <ul><li>UCASE() - Converts a field to upper case </li></ul><ul><li>LCASE() - Converts a field to lower case </li></ul><ul><li>MID() - Extract characters from a text field </li></ul><ul><li>LEN() - Returns the length of a text field </li></ul><ul><li>ROUND() - Rounds a numeric field to the number of decimals specified </li></ul><ul><li>NOW() - Returns the current system date and time </li></ul><ul><li>FORMAT() - Formats how a field is to be displayed </li></ul>SQL scalar functions return a single value, based on the input value. Useful scalar functions: Thanks.