Microsoft SQL Server 2008

1,360 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,360
On SlideShare
0
From Embeds
0
Number of Embeds
538
Actions
Shares
0
Downloads
1
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Microsoft SQL Server 2008

  1. 1. MSSQL 2008 - ©2012 Hossein Zahed - AUTHossein ZahedMCPD & .Net TeacherAmir Kabir University of TechnologyEmail: hossein.aspx@gmail.comWebsite: http://www.hzahed.com
  2. 2. MSSQL 2008 - ©2012 Hossein Zahed - AUTData, Information, KnowledgeData Facts of the world Your height, weight, color of your eyes Height and color of a tree
  3. 3. MSSQL 2008 - ©2012 Hossein Zahed - AUTData, Information, KnowledgeInformation Movable and Shareable data Beyond the range of your senses Photo, Music, Movie, …
  4. 4. MSSQL 2008 - ©2012 Hossein Zahed - AUTData, Information, KnowledgeKnowledge What we know Processing information and data tomake decisions
  5. 5. MSSQL 2008 - ©2012 Hossein Zahed - AUTDatabaseDefinition An organized collection of data, typically indigital form Database System implies that the data ismanaged to some level of quality (measuredin termsof accuracy, availability, usability, andresilience) The availability of rooms in hotels Finding a hotel with vacancies
  6. 6. MSSQL 2008 - ©2012 Hossein Zahed - AUTDatabaseTypes Active Database: securitymonitoring, alerting, statistics gathering andauthorization Cloud Database: in the cloud Data Warehouse: data centers Distributed database: a single DBMS overprocesses, computers, and sites
  7. 7. MSSQL 2008 - ©2012 Hossein Zahed - AUTDatabaseTypes - Continued Document-Oriented Database:storing, retrieving, and managing document-oriented, or semi structured data, information Embedded Database: requires access to storeddata in a way that the DBMS is “hidden” from theapplication’s end-user and requires little or noongoing maintenance
  8. 8. MSSQL 2008 - ©2012 Hossein Zahed - AUTDatabaseTypes - Continued Real-time Database: responses users request ina given time period, it can be regarded as a realtime database Temporal Database: a database with built-in timeaspects, for example a temporal data model anda temporal version of Structured Query Language(SQL)
  9. 9. MSSQL 2008 - ©2012 Hossein Zahed - AUTDatabase Management System(DBMS)Well Known Examples Microsoft SQL Server Oracle IBM DB2 MySQL PosterSQL Microsoft Access
  10. 10. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerSpecifications Relational Database Management System(RDBMS): means that data is stored in tablesand the relationships among the data are alsostored in tables. The data can be accessed orreassembled in many different ways withouthaving to change the table forms. Primary Query Language: Transact SQLknown as T-SQL
  11. 11. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerVersions Genesis: Sybase SQL Server to Microsoft – 1989 Microsoft SQL 2000 Microsoft SQL 2005 Microsoft SQL 2008 Microsoft SQL Azure – Cloud DB
  12. 12. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerVersions - Continued Microsoft SQL Server 2008 R2 Microsoft SQL Server 2012
  13. 13. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerEditions Datacenter Enterprise Developer Standard Web Workgroup Express Azure Compact (SQL CE)
  14. 14. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerArchitecture Protocol Layer: Protocol layer implements the external interfaceto SQL Server. All operations that can be invoked on SQL Server arecommunicated to it via a Microsoft-defined format, called Tabular DataStream (TDS). TDS is an application layer protocol, used to transfer databetween a database server and a client. Initially designed and developedby Sybase Inc. for their Sybase SQL Server relational database enginein 1984, and later by Microsoft in Microsoft SQL Server, TDS packetscan be encased in other physical transport dependentprotocols, including TCP/IP, Named pipes, and Shared memory.Consequently, access to SQL Server is available over these protocols. Inaddition, the SQL Server API is also exposed over web services.
  15. 15. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerArchitecture - Continued Data Storage: Data Types: integer, decimal, char, varchar, datetime, … UDT (User-Defined Data Types) DBO (Database Objects):tables, views, indexes, logs, stored procedures Maximum 231 objects Maximum Database Volume: 220 TB Primary (Master) Data File extension: .mdf Secondary Data File (Metadata) extension: .ndf Log Data File extension: .ldf
  16. 16. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerArchitecture - Continued Buffer Management: Storage space allocated to a database is divided intosequentially numbered pages, each 8 KB in size. A page is the basic unit of I/O for SQL Server operations. SQL Server buffers pages in RAM to minimize disc I/O. The amount of memory available to SQL Server decideshow many pages will be cached in memory. The buffercache is managed by the Buffer Manager. The page is updated on the disc by the Buffer Manageronly if the in-memory cache has not been referenced forsome time.
  17. 17. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerArchitecture - Continued Loggin & Transactions: SQL Server ensures that any change to the datais ACID-compliant.(Atomicity, Consistency, Isolation, Durability) It uses transactions to ensure that the database willalways revert to a known consistent state on failure. All the operations performed will be written to alog, along with the transaction ID which the operationwas a part of. Each log entry is identified by anincreasing Log Sequence Number (LSN) which is usedto ensure that all changes are written to the data files.
  18. 18. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerArchitecture - Continued Concurrency & Locking: Multi users using the same database at the same time Pessimistic Concurrency Exclusive: no access for other users Shared: read access for other users Optimistic Concurrency A new row created in Tempdb 2 Rows added if they are different
  19. 19. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerArchitecture - Continued Data Retrival: The main mode of retrieving data from an SQL Serverdatabase is querying for it using T-SQL. T-SQL ► Query ► Query Processor ► Query Plan ►Selecting Optimized Query (by Time) ► Execute Stored Procedures (SP): Parameterized T-SQL Queriesthat can have input/output results
  20. 20. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerArchitecture - Continued SQL CLR (Common Langauge Runtime): SQL Server has it’s own .Net Framework Runtime (CLR) OS Independent in Memory Management, Threadingand Resource Management
  21. 21. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices Service Broker: Guarantees internal/external processes betweeninstances of SQL on the same server or externalservers. Communicates over TCP/IP and allows the differentcomponents to be synchronized together, via exchangeof messages.
  22. 22. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices - Continued Replication: Replicate / Synchronize database objects1. Transaction Replication: Each transaction in publisheris synched out to subscribers (almost realtime)2. Merged Replication: Changes made to both publisherand subscribers are synchronized Bi-Directionally3. Snapshot Replication: A copy of database is sent outfrom publisher to subscribers at a certain time.
  23. 23. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices - Continued Analysis Services: Adds OLAP and Data Mining capabilities for SQLServer databases OLAP (Online Analytical Processing): shortly answersMulti-Dimensional analytical queries using thefollowing technics (MOLAP / ROLAP / HOLAP) Data Mining: Decision Trees, ClusteringAlgorithm, Navie Bayes, TimeSeries, Regression, Logistic, Neural Networks, GeneticAlgorithm
  24. 24. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices - Continued Reporting Services: A report generation environment for data gathered fromSQL Server databases RDL files can be rendered in a variety offormats including Excel, PDF, CSV, XML, TIFF (andother image formats) and HTML
  25. 25. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices - Continued Integration Services: Is used to integrate data from different data sources Includes GUI tools to build data extraction workflowsintegration various functionality such as extractingdata from various sources, querying data, transformingdata including aggregating, duplication and mergingdata, and then loading the transformed data onto othersources, or sending e-mails detailing the status of theoperation as defined by the user
  26. 26. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices - Continued Notification Service: Originally introduced as a post-release add-on for SQLServer 2000 A mechanism for generating data-drivennotifications, which are sent to Notification Servicessubscribers Used one of three methods to send a message to thesubscriber informing about the occurrence of theevent. These methods include SMTP, SOAP, or bywriting to a file in the filesystem. Deprecated in MSSQL 2008 by introducing Agents
  27. 27. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices - Continued Full Text Search Service: A specialized indexing and querying service forunstructured text stored in SQL Server databases The full text search index can be created on anycolumn with character based text data. It allows forwords to be searched for in the text columns The Full Text Search engine is divided into twoprocesses - the Filter Daemon process (msftefd.exe)and the Search process (msftesql.exe)
  28. 28. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerServices - Continued Full Text Search Service:
  29. 29. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerDevelopment Tools SQL CMD (Command Line) SQL Management Studio (2005/2008/20012) Visual Studio (2005/2008/2010) Business Intelligence Development Studio SQL Native Client
  30. 30. MSSQL 2008 - ©2012 Hossein Zahed - AUTMicrosoft SQL ServerQuestions & Answers

×