3. Contents
Before we go through to ADO.NET we need
to understand some basic of Database. For
this course we will use MS SQL Server as
DBMS to illustrate any practice. Here below
are key points need to understand in this
chapter :
• MS SQL Server
• SQL Statements
4. MS 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).
5. MS SQL Server (Cont.)
There are at least a dozen different editions
of Microsoft SQL Server aimed at different
audiences and for different workloads
(ranging from small applications that store
and retrieve data on the same computer, to
millions of users and computers that access
huge amounts of data from the Internet at
the same time).
6. MS SQL Server (Cont.)
There are several editions of MS SQL Server:
• Datacenter
• Enterprise
• Standard
• Web
• Business Intelligence
• Workgroup
• Express
13. SQL Statements
Basic SQL Statements is divided into two
main types; Data Definition Language (DDL)
and Data Manipulation Language (DML).
Here below are important statements that
need to understand in order to learn this
subject:
• CREATE TABLE (DDL)
• SELECT (DML)
• INSERT (DML)
• UPDATE (DML)
• DELETE (DML)
14. SQL Statements – CREATE
TABLE
CREATE TABLE MySqlTable
(
Name varchar(10) Not Null,
Age int,
SSN varchar(11),
Date datetime,
Gender char(6)
)
15. SQL Statements - SELECT
Select * from <table name>
Select <column>, <column>, … from
<table name>
Select * from PersonAddress
Select AddressID, AddressLine1,
City from PersonAddress
16. SQL Statements – SELECT
(Cont.)
Select <column>, <column>, … from
<table name>
WHERE <columnl> <operator>
<column2 / Value>
Select AddressID, AddressLine1,
City from PersonAddress
WHERE City = ‘Redmond’
18. SQL Statements - UPDATE
UPDATE <table>
SET <columnl> = <valuel>,
<column2> = <value2>, ...,
<columnN> = <valueN>
update MySqlTable
set Name = 'Pearly'
where Id = 3
19. SQL Statements - DELETE
DELETE FROM <table>
WHERE <predicate>
delete from MySqlTable
where Id = 2
20. Summary
What you learn from this chapter are:
o What is MS SQL Server and how many editions does it
has
o How to configure MS SQL Server
o Understand basic SQL Statement:
• CREATE TABLE
• SELECT
• INSERT
• UPDATE
• DELETE