• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
294
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
7
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Advanced ProgrammingMethodology in C# -Database
  • 2. MS SQL Server
  • 3. ContentsBefore we go through to ADO.NET we needto understand some basic of Database. Forthis course we will use MS SQL Server asDBMS to illustrate any practice. Here beloware key points need to understand in thischapter :• MS SQL Server• SQL Statements
  • 4. MS SQL ServerMicrosoft SQL Server is a relational databasemanagement system developedby Microsoft. As a database, it is a softwareproduct whose primary function is to storeand retrieve data as requested by othersoftware applications, be it those on thesame computer or those running on anothercomputer across a network (including theInternet).
  • 5. MS SQL Server (Cont.)There are at least a dozen different editionsof Microsoft SQL Server aimed at differentaudiences and for different workloads(ranging from small applications that storeand retrieve data on the same computer, tomillions of users and computers that accesshuge amounts of data from the Internet atthe 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 – CreateDatabase
  • 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 StatementsBasic SQL Statements is divided into twomain types; Data Definition Language (DDL)and Data Manipulation Language (DML).Here below are important statements thatneed to understand in order to learn thissubject:• CREATE TABLE (DDL)• SELECT (DML)• INSERT (DML)• UPDATE (DML)• DELETE (DML)
  • 14. SQL Statements – CREATETABLECREATE TABLE MySqlTable( Name varchar(10) Not Null, Age int, SSN varchar(11), Date datetime, Gender char(6))
  • 15. SQL Statements - SELECTSelect * from <table name>Select <column>, <column>, … from<table name>Select * from PersonAddressSelect 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 PersonAddressWHERE City = ‘Redmond’
  • 17. SQL Statements - INSERTINSERT 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 - UPDATEUPDATE <table>SET <columnl> = <valuel>,<column2> = <value2>, ...,<columnN> = <valueN>update MySqlTableset Name = Pearlywhere Id = 3
  • 19. SQL Statements - DELETEDELETE FROM <table>WHERE <predicate>delete from MySqlTablewhere Id = 2
  • 20. SummaryWhat you learn from this chapter are:o What is MS SQL Server and how many editions does it haso How to configure MS SQL Servero Understand basic SQL Statement: • CREATE TABLE • SELECT • INSERT • UPDATE • DELETE