Module 17 Storing XML Data in SQL Server 2008 R2. Module Overview. Introduction to XML and XML Schemas Storing XML Data and Schemas in SQL Server Implementing the XML Data Type. Lesson 1: Introduction to XML and XML Schemas. Discussion: XML Usage in SQL Server Core XML Concepts - PowerPoint PPT Presentation
6232B Module 17
Module 17Storing XML Data in SQL Server 2008 R2
1Module 17: Storing XML Data in SQL Server 2008 R2Course 6232BModule OverviewIntroduction to XML and XML SchemasStoring XML Data and Schemas in SQL ServerImplementing the XML Data Type
2The intent in this module is that students become familiar with XML as a type of data and how it can be stored in SQL Server. In the next module, they will see how to query it.Module 17: Storing XML Data in SQL Server 2008 R2Course 6232BLesson 1: Introduction to XML and XML SchemasDiscussion: XML Usage in SQL ServerCore XML ConceptsFragments vs. DocumentsXML NamespacesXML SchemasAppropriate Usage of XML Data Storage in SQL ServerDemonstration 1A: Introduction to XML and XML Schemas
3Module 17: Storing XML Data in SQL Server 2008 R2Course 6232BDiscussion: XML Usage in SQL ServerTraditionally, database administrators have not worked with XMLDatabase developers often want to store XML data in SQL ServerMany aspects and components of SQL Server are now XML-based, including those often only used by administratorsXML data type and schema collectionsDDL triggersExtended eventsLogon triggersEvent notificationsService Broker
4Start by asking students why they think that two XML modules are included in the course. This question should activate the students prior knowledge on XML and also help in setting up the context for this course.
It is very common for database administrators (and many database developers) to have little or no experience working with XML.
Many aspects of the current versions of SQL Server already utilize XML widely. This is likely to continue into the future.
Even database administrators will need to have some level of proficiency with storing and querying XML to remain as above-average administrators.
References:XML Support in Microsoft SQL Server 2005: http://go.microsoft.com/fwlink/?LinkID=209443Module 17: Storing XML Data in SQL Server 2008 R2Course 6232BCore XML ConceptsIs a plain-text, Unicode-based meta-language Represents both structured and semi-structured dataIs not tied to any programming language, OS, or vendor
Dare Obasanjo One Microsoft Way Redmond WA 98052
AttributeElementProcessing Instruction5Start by asking students how XML is different from html.
Provide an overview of the Extensible Markup Language (XML). Explain how XML is a plain-text, Unicode-based meta-language: a language for defining markup languages. Be sure to mention that it is not tied to any programming language, operating system, or software vendor.
XML can be considered to be a meta-language: a language for defining markup languages.
Stress that XML tag names are always case-sensitive.
It is a good idea to mention that XML is not only useful for describing new document formats for the Web but is also suitable for describing structured data. Examples of structured data include information that is typically contained in spreadsheets, program configuration files, and network protocols.
XML is extensible, platform-independent, and supports internationalization by being fully Unicode compliant. The fact that XML is a text-based format means that when the need arises, one can read and edit XML documents using standard text-editing tools.
Question: Ask the students to look at the sample XML document shown in the slide and for them to suggest what the document might represent. Answer: Explain that a key distinction of XML is that it is self-describing. Note that you can infer most of what the document is about directly from the document itself.
Question: Do you use XML for exchanging data between your organization and another organization?Answer: Answers will vary but a good example would be if the organization interchanges data using BizTalk Server.
References:Understanding XML: http://go.microsoft.com/fwlink/?LinkID=209444
Module 17: Storing XML Data in SQL Server 2008 R2Course 6232BFragments vs. DocumentsWell-formed XML has only one top-level elementDocuments with multiple top-level elements are fragments
FRAGMENT6Start by explaining what well-formed XML is.
Briefly, this means you can have:Processing instructions these are optional but are shown by the