SlideShare una empresa de Scribd logo
1 de 20
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

Más contenido relacionado

La actualidad más candente

Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
Tony Wong
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08
Hassen Poreya
 

La actualidad más candente (19)

SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
SQLSlide
SQLSlideSQLSlide
SQLSlide
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08
 
MySQL intro
MySQL introMySQL intro
MySQL intro
 
MongoDB Knowledge share
MongoDB Knowledge shareMongoDB Knowledge share
MongoDB Knowledge share
 
Intro to T-SQL - 1st session
Intro to T-SQL - 1st sessionIntro to T-SQL - 1st session
Intro to T-SQL - 1st session
 
Tk2323 lecture 7 sql
Tk2323 lecture 7   sql Tk2323 lecture 7   sql
Tk2323 lecture 7 sql
 
MySQL lecture
MySQL lectureMySQL lecture
MySQL lecture
 
MS SQL Server
MS SQL ServerMS SQL Server
MS SQL Server
 
Introduction to mysql part 1
Introduction to mysql part 1Introduction to mysql part 1
Introduction to mysql part 1
 
Getting Started with NoSQL
Getting Started with NoSQLGetting Started with NoSQL
Getting Started with NoSQL
 
Presentation1
Presentation1Presentation1
Presentation1
 
Introduction to my_sql
Introduction to my_sqlIntroduction to my_sql
Introduction to my_sql
 
Object relational database management system
Object relational database management systemObject relational database management system
Object relational database management system
 

Similar a Chapter 2: Ms SQL Server

Mysql-overview.pptx
Mysql-overview.pptxMysql-overview.pptx
Mysql-overview.pptx
TamilHunt
 
SQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential KnowledgeSQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential Knowledge
Jerry Yang
 
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
Andrew Brust
 

Similar a Chapter 2: Ms SQL Server (20)

Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
SQL-Server Database.pdf
SQL-Server Database.pdfSQL-Server Database.pdf
SQL-Server Database.pdf
 
MySQL intro
MySQL introMySQL intro
MySQL intro
 
Mysql-overview.pptx
Mysql-overview.pptxMysql-overview.pptx
Mysql-overview.pptx
 
Module02
Module02Module02
Module02
 
PO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - SqlPO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - Sql
 
Dbms presentaion
Dbms presentaionDbms presentaion
Dbms presentaion
 
SQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential KnowledgeSQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential Knowledge
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
MS SQL - Database Programming Concepts by RSolutions
MS SQL - Database Programming Concepts by RSolutionsMS SQL - Database Programming Concepts by RSolutions
MS SQL - Database Programming Concepts by RSolutions
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
 
Sql server denali
Sql server denaliSql server denali
Sql server denali
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
 
Sql – pocket guide
Sql – pocket guideSql – pocket guide
Sql – pocket guide
 
lovely
lovelylovely
lovely
 
PT- Oracle session01
PT- Oracle session01 PT- Oracle session01
PT- Oracle session01
 
Getting Started with SQL Language.pptx
Getting Started with SQL Language.pptxGetting Started with SQL Language.pptx
Getting Started with SQL Language.pptx
 
Designer's Favorite New Features in SQLServer
Designer's Favorite New Features in SQLServerDesigner's Favorite New Features in SQLServer
Designer's Favorite New Features in SQLServer
 
Structured Query Language
Structured Query LanguageStructured Query Language
Structured Query Language
 

Más de Ngeam Soly

សន្ធិ​សញ្ញា​កំណត់​ព្រំដែន កម្ពុជា-វៀតណាម
សន្ធិ​សញ្ញា​កំណត់​ព្រំដែន កម្ពុជា-វៀតណាមសន្ធិ​សញ្ញា​កំណត់​ព្រំដែន កម្ពុជា-វៀតណាម
សន្ធិ​សញ្ញា​កំណត់​ព្រំដែន កម្ពុជា-វៀតណាម
Ngeam Soly
 
អត្ថបទគោល៖ ការងារ​បោះ​បង្គោល​ខណ្ឌ​សីមា​ព្រំ​ដែន​​គោក និង​​ការ​​កំណត់​ព្រំដែន​...
អត្ថបទគោល៖ ការងារ​បោះ​បង្គោល​ខណ្ឌ​សីមា​ព្រំ​ដែន​​គោក និង​​ការ​​កំណត់​ព្រំដែន​...អត្ថបទគោល៖ ការងារ​បោះ​បង្គោល​ខណ្ឌ​សីមា​ព្រំ​ដែន​​គោក និង​​ការ​​កំណត់​ព្រំដែន​...
អត្ថបទគោល៖ ការងារ​បោះ​បង្គោល​ខណ្ឌ​សីមា​ព្រំ​ដែន​​គោក និង​​ការ​​កំណត់​ព្រំដែន​...
Ngeam Soly
 
1 introduction
1   introduction1   introduction
1 introduction
Ngeam Soly
 
Chapter01 introduction
Chapter01 introductionChapter01 introduction
Chapter01 introduction
Ngeam Soly
 

Más de Ngeam Soly (11)

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

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

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