SlideShare a Scribd company logo
Advanced Programming
Methodology in C# -
Database
MS SQL Server
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
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).
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).
MS SQL Server (Cont.)
There are several editions of MS SQL Server:
• Datacenter
• Enterprise
• Standard
• Web
• Business Intelligence
• Workgroup
• Express
MS SQL Server - Authentication
MS SQL Server – Create
Database
MS SQL Server – Create Table
MS SQL Server – Open Table
MS SQL Server – Query Editor
MS SQL Server – Query Editor
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)
SQL Statements – CREATE
TABLE
CREATE TABLE MySqlTable
(
   Name varchar(10) Not Null,
   Age int,
   SSN varchar(11),
   Date datetime,
   Gender char(6)
)
SQL Statements - SELECT
Select * from <table name>
Select <column>, <column>, … from
<table name>

Select * from PersonAddress
Select AddressID, AddressLine1,
City from PersonAddress
SQL Statements – SELECT
(Cont.)
Select <column>, <column>, … from
<table name>
WHERE <columnl> <operator>
<column2 / Value>

Select AddressID, AddressLine1,
City from PersonAddress
WHERE City = ‘Redmond’
SQL Statements - INSERT
INSERT INTO <table>
(<column1>, <column2>, ..., <columnN>)
VALUES (<value1>, <value2>, ...,
<valueN>)

insert into MySqlTable
( Name, Age, SSN, Date, Gender )
Values
('Vidya Vrat',36,'111-20-3456',
GetDate(),'Male')
SQL Statements - UPDATE
UPDATE <table>
SET <columnl> = <valuel>,
<column2> = <value2>, ...,
<columnN> = <valueN>

update MySqlTable
set Name = 'Pearly'
where Id = 3
SQL Statements - DELETE
DELETE FROM <table>
WHERE <predicate>

delete from MySqlTable
where Id = 2
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

More Related Content

PPT
Introduction to sql
PPTX
Presentation slides of Sequence Query Language (SQL)
PPT
Introduction to SQL
PDF
Sql a practical introduction
PPT
Sql server T-sql basics ppt-3
PPTX
What is SQL Server?
PPTX
Chapter 1 introduction to sql server
ODP
Ms sql-server
Introduction to sql
Presentation slides of Sequence Query Language (SQL)
Introduction to SQL
Sql a practical introduction
Sql server T-sql basics ppt-3
What is SQL Server?
Chapter 1 introduction to sql server
Ms sql-server

What's hot (19)

PPTX
SQL for interview
PDF
Introduction to SQL
PDF
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
PDF
Database Architecture and Basic Concepts
PPTX
Sql Basics And Advanced
PPTX
Introduction to SQL
PPTX
PDF
Web app development_my_sql_08
PPT
PPTX
MongoDB Knowledge share
PPTX
Intro to T-SQL - 1st session
PPTX
Tk2323 lecture 7 sql
PPT
MySQL lecture
PPSX
MS SQL Server
PPTX
PDF
Getting Started with NoSQL
PPT
Presentation1
PPTX
Introduction to my_sql
PPTX
Object relational database management system
SQL for interview
Introduction to SQL
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Database Architecture and Basic Concepts
Sql Basics And Advanced
Introduction to SQL
Web app development_my_sql_08
MongoDB Knowledge share
Intro to T-SQL - 1st session
Tk2323 lecture 7 sql
MySQL lecture
MS SQL Server
Getting Started with NoSQL
Presentation1
Introduction to my_sql
Object relational database management system
Ad

Similar to Chapter 2: Ms SQL Server (20)

PDF
Sql a practical introduction
PPT
PO WER - Piotr Mariat - Sql
PPTX
BASIC_OF_DATABASE_PPT__new[1].pptx
PDF
Sql a practical_introduction
PDF
SQL for data scientist And data analysist Advanced
PPT
database.ppt
PPTX
Data base
PPTX
SQL Training Institute in Ambala ! Batra Computer Centre
PPTX
PPT SQL CLASS.pptx
PPT
PDF
Intruduction to SQL.Structured Query Language(SQL}
PPT
Introduction to Structured Query Language (SQL).ppt
PPT
chap 7.ppt(sql).ppt
PPT
Lec 1 = introduction to structured query language (sql)
PPT
15925 structured query
PPTX
lovely
PPTX
Data Manipulation ppt. for BSIT students
PDF
Using T-SQL
PPTX
PPT
Introduction to Structured Query Language (SQL) (1).ppt
Sql a practical introduction
PO WER - Piotr Mariat - Sql
BASIC_OF_DATABASE_PPT__new[1].pptx
Sql a practical_introduction
SQL for data scientist And data analysist Advanced
database.ppt
Data base
SQL Training Institute in Ambala ! Batra Computer Centre
PPT SQL CLASS.pptx
Intruduction to SQL.Structured Query Language(SQL}
Introduction to Structured Query Language (SQL).ppt
chap 7.ppt(sql).ppt
Lec 1 = introduction to structured query language (sql)
15925 structured query
lovely
Data Manipulation ppt. for BSIT students
Using T-SQL
Introduction to Structured Query Language (SQL) (1).ppt
Ad

More from Ngeam Soly (11)

PDF
សន្ធិ​សញ្ញា​កំណត់​ព្រំដែន កម្ពុជា-វៀតណាម
PDF
អត្ថបទគោល៖ ការងារ​បោះ​បង្គោល​ខណ្ឌ​សីមា​ព្រំ​ដែន​​គោក និង​​ការ​​កំណត់​ព្រំដែន​...
PPT
មេរៀនៈ Data Structure and Algorithm in C/C++
PPTX
Chapter 3: ado.net
PPTX
1 introduction
PPT
Chapter01 introduction
PDF
Slide for presentation
PPTX
Accounting assingment year ii
PDF
Account's Assignment
PDF
Chapter5: Usage of Build-In Functions or Methods
PPTX
Chapter3: fundamental programming
សន្ធិ​សញ្ញា​កំណត់​ព្រំដែន កម្ពុជា-វៀតណាម
អត្ថបទគោល៖ ការងារ​បោះ​បង្គោល​ខណ្ឌ​សីមា​ព្រំ​ដែន​​គោក និង​​ការ​​កំណត់​ព្រំដែន​...
មេរៀនៈ Data Structure and Algorithm in C/C++
Chapter 3: ado.net
1 introduction
Chapter01 introduction
Slide for presentation
Accounting assingment year ii
Account's Assignment
Chapter5: Usage of Build-In Functions or Methods
Chapter3: fundamental programming

Recently uploaded (20)

PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Computing-Curriculum for Schools in Ghana
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
master seminar digital applications in india
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
O7-L3 Supply Chain Operations - ICLT Program
Computing-Curriculum for Schools in Ghana
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharma ospi slides which help in ospi learning
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Final Presentation General Medicine 03-08-2024.pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
A systematic review of self-coping strategies used by university students to ...
Microbial disease of the cardiovascular and lymphatic systems
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Microbial diseases, their pathogenesis and prophylaxis
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Structure & Organelles in detailed.
human mycosis Human fungal infections are called human mycosis..pptx
master seminar digital applications in india
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Supply Chain Operations Speaking Notes -ICLT Program

Chapter 2: Ms SQL Server

  • 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
  • 7. MS SQL Server - Authentication
  • 8. MS SQL Server – Create Database
  • 9. MS SQL Server – Create Table
  • 10. MS SQL Server – Open Table
  • 11. MS SQL Server – Query Editor
  • 12. MS SQL Server – Query Editor
  • 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’
  • 17. SQL Statements - INSERT INSERT INTO <table> (<column1>, <column2>, ..., <columnN>) VALUES (<value1>, <value2>, ..., <valueN>) insert into MySqlTable ( Name, Age, SSN, Date, Gender ) Values ('Vidya Vrat',36,'111-20-3456', GetDate(),'Male')
  • 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