XML Background from HTML to XML HTML Example in XML XML As A

Total Page:16

File Type:pdf, Size:1020Kb

XML Background from HTML to XML HTML Example in XML XML As A <Course> XML Background <Title> CS 186 </Title> <Semester> Fall 2002 </Semester> • eXtensible Markup Language <Lecture Number = “12”> • Roots are HTML and SGML <Topic> XML </Topic> – HTML mixes formatting and semantics <Topic> Databases </Topic> – SGML is cumbersome </Lecture> • XML is focused on content </Course> – Designers (or others) can create their own sets of tags. – These tag definitions can be exchanged and shared “The reason that so many among various groups (DTDs, XSchema). people are excited about XML is – XSL is a companion language to specify presentation. that so many people are excited • <Opinion> XML is ugly </Opinion> about XML.” – Intended to be generated and consumed by applications --- not people! ANON From HTML to XML HTML <h1> Bibliography </h1> <p> <i> Foundations of Databases </i> Abiteboul, Hull, Vianu <br> Addison Wesley, 1995 <p> <i> Data on the Web </i> Abiteoul, Buneman, Suciu <br> Morgan Kaufmann, 1999 HTML describes the presentation Example in XML XML as a Wire Format • People quickly figured out that XML is a convenient <bibliography> way to exchange data among applications. <book> <title> Foundations… </title> – E.g. Ford’s purchasing app generates a purchase order <author> Abiteboul </author> in XML format, e-mails it to a billing app at Firestone. <author> Hull </author> – Firestone’s billing app ingests the email, generates a bill <author> Vianu </author> in XML format, and e-mails it to Ford’s bank. <publisher> Addison Wesley </publisher> • Emerging standards to get the “e-mail” out of the picture: SOAP, WSDL, UDDI… <year> 1995 </year> • The basis of “Web Services” --- potential impact is tremendous. </book> • Why is it catching on? … It’s just text, so… </bibliography> •Platform, Language, Vendor agnostic •Easy to understand, manipulate and extend. XML describes the content •Compare this to data trapped in an RDBMS. 1 What’s this got to do with Databases? XML – Basic Structure <?xml version="1.0" encoding="UTF-8"?> • Given that apps will communicate by exchanging XML <!DOCTYPE article SYSTEM data, then databases must at least be able to: "http://xml.cXML.org/schemas/cXML/1.1.010/cXML.dtd"> – Ingest XML formatted data – Publish their own data in XML format <article key="Codd70"> •Preamble hasXML declaration, <author>E.F.Codd</author>, root element, ref to “DTD” • Thinking a bit harder: <title>A Relational Model •Elements have start and end –XML is kind of a data model. of Data for Large Shared Data Banks. Tags – Why convert to/from relational if everyone wants XML? </title>, •Well Formed: has root, proper • More cosmically: <pages>377-387</pages>, nesting, … <year>1970</year>, – Like evolution from spoken language to written language! •Valid: Conforms to DTD <volume>13</volume>, •Note that order matters (i.e. no • The (multi-) Billion Dollar Question: <journal>CACM</journal>, <number>6</number>, sets, only lists) – Will people really want to store XML data directly? <url>db/journals/cacm/cacm13.html#Codd70</url> – Current opinion: ORACLE, IBM, INFORMIX say no, other <ee>db/journals/cacm/Codd70.html</ee> DB vendors say Yes, or at least, “Maybe” <cdrom>CACMs1/CACM13/P377.pdf</cdrom> </article> Another (partial) Example Can View XML Document as a Tree <Invoice> <Buyer> <Name> ABC Corp. </Name> Invoice as a tree <Address> 123 ABC Way </Address> </Buyer> Invoice <Seller> <Name> Goods Inc. </Name> Buyer Seller Itemlist <Address> 17 Main St. </Address> </Seller> Name Address Name Item <ItemList> Address Item Item ABC Corp. 123 ABC Way Goods Inc. 17 Main widget thingy jobber <Item> widget </Item> St. <Item> thingy </Item> <Item> jobber </Item> </ItemList> Question: What Normal Form is this in? </Invoice> Mapping to Relational New splinters from XML Very expensive to store variable • Relational systems handle highly structured document types data ≠ ≠ ≠ Difficult to search trees that are broken into tables 2 Mapping to Relational I Mapping to Relational II • Question: What is a relational schema for • Can leverage Schema (or DTD) information to storing XML data? create relational schema. • Answer – Depends on how “Structured” it is… • Sometimes called “shredding” • If unstructured – use an “Edge Map” • For semi-structured data use hybrid with edge map for overflow. ParentLabel ID 0 NULL article 0 article STORED table Overflow buckets 0 author 1 (author, year, journal, …) article 1 E.F. Codd NULL 1 2 3 4 5 … 0 pages 2 author pages year journal number … 2 377-387 NULL author pages year journal cdrom … … … E.F. 377- 1970 CACM 6 Codd 387 E.F. 377- 1970 CACM P377.pdf Codd 387 Other XML features Document Type Definitions (DTDs) • Elements can have “attributes” (not clear why). • Grammar for describing the allowed structure of XML Documents. <Price currency="USD">1.50</Price> • Specify what elements can appear and in what order, nesting, etc. • XML docs can have IDs and IDREFs, URIs • DTDs are optional (!) – reference to another document or document element • Many “standard” DTDs have been developed • Two APIs for interacting with/parsing XML Docs: for all sorts of industries, groups, etc. –Document Object Model (DOM) – e.g. NITF for news article dissemination. • A tree “object” API for traversing an XML doc • Typically for Java –SAX • Event-Driven: Fire an event for each tag encountered during parse. • May not need to parse the entire document. DTD Example (partial) Beyond DTDs - XML Schemas, etc. <?xml version="1.0" encoding="UTF-8"?> <!ENTITY % datetime.tz "CDATA"> Here’s a DTD for a Contract <!ENTITY % string "CDATA"> • XML Schema is a proposal to replace/augment <!ENTITY % nmtoken "CDATA"> <!-- Any combo of XML name chars. --> <!ENTITY % xmlLangCode "%nmtoken;"> DTDs <!ELEMENT SupplierID (#PCDATA)> – Has a notion of types and typechecking <!ATTLIST SupplierID – May introduce some notions of IC’s domain %string; #REQUIRED Elements contain others: > – Quite complicated, controversial ... not really <!ELEMENT Comments (#PCDATA)> ? = 0 or 1 <!ELEMENT ItemSegment (ContractItem+)> * = 0 or more adopted yet <!ATTLIST ItemSegment + = 1 or more • XML Namespaces segmentKey %string; #IMPLIED > – Can import tag names from others <!ELEMENT Contract (SupplierID+, Comments?, ItemSegment+)> – Disambiguate by prefixing the namespace name <!ATTLIST Contract • I.e. berkeley-eecs:gpa is different from uphoenix:gpa effectiveDate %datetime.tz; #REQUIRED expirationDate %datetime.tz; #REQUIRED > 3 Querying XML XPath • Syntax for tree navigation and node selection • Xpath – Navigation is defined by “paths” – A single-document language for “path expressions” – Used by other standards: XSLT, XQuery, XPointer,XLink • / = root node or separator between steps in path • XSLT – XPath plus a language for formatting output • * matches any one element name • @ references attributes of the current node • XQuery • // references any descendant of the current node – An SQL-like proposal with XPath as a sub-language – Supports aggregates, duplicates, … • [] allows specification of a filter (predicate) at a – Data model is lists, not sets step – “reference implementations” have appeared, but language is • [n] picks the nth occurrence from a list of elements. still not widely accepted. • SQL/XML • The fun part: – the SQL standards community fights back Filters can themselves contain paths XPath Examples XQuery • Parent/Child (‘/’) and Ancestor/Descendant (‘//’): /catalog/product//msrp <result> • Wildcards (match any single element): FOR $x in /bib/book WHERE $x/year > 1995 /catalog/*/msrp RETURN <newtitle> • Element Node Filters to further refine the nodes: $x/title – Filters can contain nested path expressions </newtitle> //product[price/msrp < 300]/name </result> //product[price/msrp < /dept/@budget]/name – Note, this last one is a kind of “join” XQuery XQuery Main Construct (replaces SELECT-FROM-WHERE): • FOR $x in expr -- binds $x to each value in the • FLWR Expression: FOR-LET-WHERE-RETURN list expr FOR/LET Clauses • LET $x = expr -- binds $x to the entire list Ordered List of tuples expr – Useful for common subexpressions and for WHERE Clause aggregations Filtered list of tuples RETURN Clause XML data: Instance of Xquery data model 4 XQuery Advantages of XML vs. Relational <big_publishers> • ASCII makes things easy FOR $p IN distinct(document("bib.xml")//publisher) –Easy to parse LET $b := document("bib.xml")/book[publisher = $p] – Easy to ship (e.g. across firewall, via email, etc.) • Self-documenting WHERE count($b) > 100 – Metadata (tag names) come with the data RETURN $p • Nested </big_publishers> – Can bundle lots of related data into one message – (Note: object-relational allows this) • Can be sloppy –don’t have to define a schema in advance distinct = a function that eliminates duplicates • Standard count = a (aggregate) function that returns the number of elms – Lots of free Java tools for parsing and munging XML • Expect lots of Microsoft tools (C#) for same • Tremendous Momentum! What XML does not solve Reminder: Benefits of Relational • XML doesn’t standardize metadata – It only standardizes the metadata language • Data independence buys you: • Not that much better than agreeing on an alphabet – Evolution of storage -- vs. XML? – E.g. my <price> tag vs. your <price> tag – Evolution of schema (via views) – vs. XML? • Mine includes shipping and federal tax, and is in $US • Database design theory • Yours is manufacturer’s list price in ¥Japan – IC’s, dependency theory, lots of nice tools for ER – XML Schema is a proposal to help with some of this • Remember, databases are long-lived and reused • XML doesn’t help with
Recommended publications
  • Differential Fuzzing the Webassembly
    Master’s Programme in Security and Cloud Computing Differential Fuzzing the WebAssembly Master’s Thesis Gilang Mentari Hamidy MASTER’S THESIS Aalto University - EURECOM MASTER’STHESIS 2020 Differential Fuzzing the WebAssembly Fuzzing Différentiel le WebAssembly Gilang Mentari Hamidy This thesis is a public document and does not contain any confidential information. Cette thèse est un document public et ne contient aucun information confidentielle. Thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Technology. Antibes, 27 July 2020 Supervisor: Prof. Davide Balzarotti, EURECOM Co-Supervisor: Prof. Jan-Erik Ekberg, Aalto University Copyright © 2020 Gilang Mentari Hamidy Aalto University - School of Science EURECOM Master’s Programme in Security and Cloud Computing Abstract Author Gilang Mentari Hamidy Title Differential Fuzzing the WebAssembly School School of Science Degree programme Master of Science Major Security and Cloud Computing (SECCLO) Code SCI3084 Supervisor Prof. Davide Balzarotti, EURECOM Prof. Jan-Erik Ekberg, Aalto University Level Master’s thesis Date 27 July 2020 Pages 133 Language English Abstract WebAssembly, colloquially known as Wasm, is a specification for an intermediate representation that is suitable for the web environment, particularly in the client-side. It provides a machine abstraction and hardware-agnostic instruction sets, where a high-level programming language can target the compilation to the Wasm instead of specific hardware architecture. The JavaScript engine implements the Wasm specification and recompiles the Wasm instruction to the target machine instruction where the program is executed. Technically, Wasm is similar to a popular virtual machine bytecode, such as Java Virtual Machine (JVM) or Microsoft Intermediate Language (MSIL).
    [Show full text]
  • XML a New Web Site Architecture
    XML A New Web Site Architecture Jim Costello Derek Werthmuller Darshana Apte Center for Technology in Government University at Albany, SUNY 1535 Western Avenue Albany, NY 12203 Phone: (518) 442-3892 Fax: (518) 442-3886 E-mail: [email protected] http://www.ctg.albany.edu September 2002 © 2002 Center for Technology in Government The Center grants permission to reprint this document provided this cover page is included. Table of Contents XML: A New Web Site Architecture .......................................................................................................................... 1 A Better Way? ......................................................................................................................................................... 1 Defining the Problem.............................................................................................................................................. 1 Partial Solutions ...................................................................................................................................................... 2 Addressing the Root Problems .............................................................................................................................. 2 Figure 1. Sample XML file (all code simplified for example) ...................................................................... 4 Figure 2. Sample XSL File (all code simplified for example) ....................................................................... 6 Figure 3. Formatted Page Produced
    [Show full text]
  • Document Object Model
    Document Object Model DOM DOM is a programming interface that provides a way for the values and structure of an XML document to be accessed and manipulated. Tasks that can be performed with DOM . Navigate an XML document's structure, which is a tree stored in memory. Report the information found at the nodes of the XML tree. Add, delete, or modify elements in the XML document. DOM represents each node of the XML tree as an object with properties and behavior for processing the XML. The root of the tree is a Document object. Its children represent the entire XML document except the xml declaration. On the next page we consider a small XML document with comments, a processing instruction, a CDATA section, entity references, and a DOCTYPE declaration, in addition to its element tree. It is valid with respect to a DTD, named root.dtd. <!ELEMENT root (child*)> <!ELEMENT child (name)> <!ELEMENT name (#PCDATA)> <!ATTLIST child position NMTOKEN #REQUIRED> <!ENTITY last1 "Dover"> <!ENTITY last2 "Reckonwith"> Document Object Model Copyright 2005 by Ken Slonneger 1 Example: root.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE root SYSTEM "root.dtd"> <!-- root.xml --> <?DomParse usage="java DomParse root.xml"?> <root> <child position="first"> <name>Eileen &last1;</name> </child> <child position="second"> <name><![CDATA[<<<Amanda>>>]]> &last2;</name> </child> <!-- Could be more children later. --> </root> DOM imagines that this XML information has a document root with four children: 1. A DOCTYPE declaration. 2. A comment. 3. A processing instruction, whose target is DomParse. 4. The root element of the document. The second comment is a child of the root element.
    [Show full text]
  • Extensible Markup Language (XML) and Its Role in Supporting the Global Justice XML Data Model
    Extensible Markup Language (XML) and Its Role in Supporting the Global Justice XML Data Model Extensible Markup Language, or "XML," is a computer programming language designed to transmit both data and the meaning of the data. XML accomplishes this by being a markup language, a mechanism that identifies different structures within a document. Structured information contains both content (such as words, pictures, or video) and an indication of what role content plays, or its meaning. XML identifies different structures by assigning data "tags" to define both the name of a data element and the format of the data within that element. Elements are combined to form objects. An XML specification defines a standard way to add markup language to documents, identifying the embedded structures in a consistent way. By applying a consistent identification structure, data can be shared between different systems, up and down the levels of agencies, across the nation, and around the world, with the ease of using the Internet. In other words, XML lays the technological foundation that supports interoperability. XML also allows structured relationships to be defined. The ability to represent objects and their relationships is key to creating a fully beneficial justice information sharing tool. A simple example can be used to illustrate this point: A "person" object may contain elements like physical descriptors (e.g., eye and hair color, height, weight), biometric data (e.g., DNA, fingerprints), and social descriptors (e.g., marital status, occupation). A "vehicle" object would also contain many elements (such as description, registration, and/or lien-holder). The relationship between these two objects—person and vehicle— presents an interesting challenge that XML can address.
    [Show full text]
  • An XML Model of CSS3 As an XƎL ATEX-TEXML-HTML5 Stylesheet
    An XML model of CSS3 as an XƎLATEX-TEXML-HTML5 stylesheet language S. Sankar, S. Mahalakshmi and L. Ganesh TNQ Books and Journals Chennai Abstract HTML5[1] and CSS3[2] are popular languages of choice for Web development. However, HTML and CSS are prone to errors and difficult to port, so we propose an XML version of CSS that can be used as a standard for creating stylesheets and tem- plates across different platforms and pagination systems. XƎLATEX[3] and TEXML[4] are some examples of XML that are close in spirit to TEX that can benefit from such an approach. Modern TEX systems like XƎTEX and LuaTEX[5] use simplified fontspec macros to create stylesheets and templates. We use XSLT to create mappings from this XML-stylesheet language to fontspec-based TEX templates and also to CSS3. We also provide user-friendly interfaces for the creation of such an XML stylesheet. Style pattern comparison with Open Office and CSS Now a days, most of the modern applications have implemented an XML package format that includes an XML implementation of stylesheet: InDesign has its own IDML[6] (InDesign Markup Language) XML package format and MS Word has its own OOXML[7] format, which is another ISO standard format. As they say ironically, the nice thing about standards is that there are plenty of them to choose from. However, instead of creating one more non-standard format, we will be looking to see how we can operate closely with current standards. Below is a sample code derived from OpenOffice document format: <style:style style:name=”Heading_20_1” style:display-name=”Heading
    [Show full text]
  • Markup Languages SGML, HTML, XML, XHTML
    Markup Languages SGML, HTML, XML, XHTML CS 431 – February 13, 2006 Carl Lagoze – Cornell University Problem • Richness of text – Elements: letters, numbers, symbols, case – Structure: words, sentences, paragraphs, headings, tables – Appearance: fonts, design, layout – Multimedia integration: graphics, audio, math – Internationalization: characters, direction (up, down, right, left), diacritics • Its not all text Text vs. Data • Something for humans to read • Something for machines to process • There are different types of humans • Goal in information infrastructure should be as much automation as possible • Works vs. manifestations • Parts vs. wholes • Preservation: information or appearance? Who controls the appearance of text? • The author/creator of the document • Rendering software (e.g. browser) – Mapping from markup to appearance •The user –Window size –Fonts and size Important special cases • User has special requirements – Physical abilities –Age/education level – Preference/mood • Client has special capabilities – Form factor (mobile device) – Network connectivity Page Description Language • Postscript, PDF • Author/creator imprints rendering instructions in document – Where and how elements appear on the page in pixels Markup languages •SGML, XML • Represent structure of text • Must be combined with style instructions for rendering on screen, page, device Markup and style sheets document content Marked-up document & structure style sheet rendering rendering software instructions formatted document Multiple renderings from same
    [Show full text]
  • Swivel: Hardening Webassembly Against Spectre
    Swivel: Hardening WebAssembly against Spectre Shravan Narayan† Craig Disselkoen† Daniel Moghimi¶† Sunjay Cauligi† Evan Johnson† Zhao Gang† Anjo Vahldiek-Oberwagner? Ravi Sahita∗ Hovav Shacham‡ Dean Tullsen† Deian Stefan† †UC San Diego ¶Worcester Polytechnic Institute ?Intel Labs ∗Intel ‡UT Austin Abstract in recent microarchitectures [41] (see Section 6.2). In con- We describe Swivel, a new compiler framework for hardening trast, Spectre can allow attackers to bypass Wasm’s isolation WebAssembly (Wasm) against Spectre attacks. Outside the boundary on almost all superscalar CPUs [3, 4, 35]—and, browser, Wasm has become a popular lightweight, in-process unfortunately, current mitigations for Spectre cannot be im- sandbox and is, for example, used in production to isolate plemented entirely in hardware [5, 13, 43, 51, 59, 76, 81, 93]. different clients on edge clouds and function-as-a-service On multi-tenant serverless, edge-cloud, and function as a platforms. Unfortunately, Spectre attacks can bypass Wasm’s service (FaaS) platforms, where Wasm is used as the way to isolation guarantees. Swivel hardens Wasm against this class isolate mutually distursting tenants, this is particulary con- 1 of attacks by ensuring that potentially malicious code can nei- cerning: A malicious tenant can use Spectre to break out of ther use Spectre attacks to break out of the Wasm sandbox nor the sandbox and read another tenant’s secrets in two steps coerce victim code—another Wasm client or the embedding (§5.4). First, they mistrain different components of the under- process—to leak secret data. lying control flow prediction—the conditional branch predic- We describe two Swivel designs, a software-only approach tor (CBP), branch target buffer (BTB), or return stack buffer that can be used on existing CPUs, and a hardware-assisted (RSB)—to speculatively execute code that accesses data out- approach that uses extension available in Intel® 11th genera- side the sandbox boundary.
    [Show full text]
  • Development and Maintenance of Xml-Based Versus Html-Based Websites: a Case Study
    DEVELOPMENT AND MAINTENANCE OF XML-BASED VERSUS HTML-BASED WEBSITES: A CASE STUDY Mustafa Atay Department of Computer Science Winston-Salem State University Winston-Salem, NC 27110 USA [email protected] ABSTRACT HTML (Hyper Text Markup Language) has been the primary tool for designing and developing web pages over the years. Content and formatting information are placed together in an HTML document. XML (Extensible Markup Language) is a markup language for documents containing semi-structured and structured information. XML separates formatting from the content. While websites designed in HTML require the formatting information to be included along with the new content when an update occurs, XML does not require adding format information as this information is separately included in XML stylesheets (XSL) and need not be updated when new content is added. On the other hand, XML makes use of extra tags in the XML and XSL files which increase the space usage. In this study, we design and implement two experimental websites using HTML and XML respectively. We incrementally update both websites with the same data and record the change in the size of code for both HTML and XML editions to evaluate the space efficiency of these websites. KEYWORDS XML, XSLT, HTML, Website Development, Space Efficiency 1. INTRODUCTION HTML (Hyper Text Markup Language) [1] has been the primary tool for designing and developing web pages for a long time. HTML is primarily intended for easily designing and formatting web pages for end users. Web pages developed in HTML are unstructured by its nature. Therefore, programmatic update and maintenance of HTML web pages is not an easy task.
    [Show full text]
  • Webassembly Backgrounder
    Copyright (c) Clipcode Limited 2021 - All rights reserved Clipcode is a trademark of Clipcode Limited - All rights reserved WebAssembly Backgrounder [DRAFT] Written By Eamon O’Tuathail Last updated: January 8, 2021 Table of Contents 1: Introduction.................................................................................................3 2: Tooling & Getting Started.............................................................................13 3: Values.......................................................................................................18 4: Flow Control...............................................................................................27 5: Functions...................................................................................................33 6: (Linear) Memory.........................................................................................42 7: Tables........................................................................................................50 1: Introduction Overview The WebAssembly specification is a definition of an instruction set architecture (ISA) for a virtual CPU that runs inside a host embedder. Initially, the most widely used embedder is the modern standard web browser (no plug-ins required). Other types of embedders can run on the server (e.g. inside standard Node.js v8 – no add-ons required) or in future there could be more specialist host embedders such as a cross- platform macro-engine inside desktop, mobile or IoT applications. Google, Mozilla, Microsoft and
    [Show full text]
  • Schema Based Storage of Xml Documents in Relational Databases
    International Journal on Web Service Computing (IJWSC), Vol.4, No.2, June 2013 SCHEMA BASED STORAGE OF XML DOCUMENTS IN RELATIONAL DATABASES Dr. Pushpa Suri1 and Divyesh Sharma2 1Department of Computer Science and Applications, Kurukshetra University, Kurukshetra [email protected] 2Department of Computer Science and Applications, Kurukshetra University, Kurukshetra [email protected] ABSTRACT XML (Extensible Mark up language) is emerging as a tool for representing and exchanging data over the internet. When we want to store and query XML data, we can use two approaches either by using native databases or XML enabled databases. In this paper we deal with XML enabled databases. We use relational databases to store XML documents. In this paper we focus on mapping of XML DTD into relations. Mapping needs three steps: 1) Simplify Complex DTD’s 2) Make DTD graph by using simplified DTD’s 3) Generate Relational schema. We present an inlining algorithm for generating relational schemas from available DTD’s. This algorithm also handles recursion in an XML document. KEYWORDS XML, Relational databases, Schema Based Storage 1. INTRODUCTION As XML (extensible markup language) documents needs efficient storage. The concept of Relational data bases provides more mature way to store and query these documents. Research on storage of XML documents using relational databases are classified by two kinds : Schema oblivious storage, Schema Based storage .Schema oblivious storage does not use any DTD (document type definition) or XML schema to map XML document in to relations[4][5][6][7][8][9][10]. Schema based storage requires DTD attached with the XML documents itself .
    [Show full text]
  • Automatically Indexing Millions of Databases in Microsoft Azure SQL Database Sudipto Das, Miroslav Grbic, Igor Ilic, Isidora Jovandic, Andrija Jovanovic, Vivek R
    Automatically Indexing Millions of Databases in Microsoft Azure SQL Database Sudipto Das, Miroslav Grbic, Igor Ilic, Isidora Jovandic, Andrija Jovanovic, Vivek R. Narasayya, Miodrag Radulovic, Maja Stikic, Gaoxiang Xu, Surajit Chaudhuri Microsoft Corporation ABSTRACT tools [2, 14, 46] have helped DBAs search the complex search An appropriate set of indexes can result in orders of magni- space of alternative indexes (and other physical structures tude better query performance. Index management is a chal- such as materialized views and partitioning). However, a lenging task even for expert human administrators. Fully au- DBA still drives this tuning process and is responsible for tomating this process is of significant value. We describe the several important tasks, such as: ¹iº identifying a representa- challenges, architecture, design choices, implementation, and tive workload; ¹iiº analyzing the database without impact- learnings from building an industrial-strength auto-indexing ing production instances; ¹iiiº implementing index changes; service for Microsoft Azure SQL Database, a relational data- ¹ivº ensuring these actions do not adversely affect query base service. Our service has been generally available for performance; and ¹vº continuously tuning the database as more than two years, generating index recommendations the workload drifts and the data distributions change. for every database in Azure SQL Database, automatically Cloud database services, such as Microsoft Azure SQL implementing them for a large fraction, and significantly im- Database, automate several important tasks such as provi- proving performance of hundreds of thousands of databases. sioning, operating system and database software upgrades, We also share our experience from experimentation at scale high availability, backups etc, thus reducing the total cost with production databases which gives us confidence in our of ownership (TCO).
    [Show full text]
  • Formally Verifying Webassembly with Kwasm
    Formally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contracts Master’s thesis in Computer Science and Engineering RIKARD HJORT Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY UNIVERSITY OF GOTHENBURG Gothenburg, Sweden 2020 Master’s thesis 2020 Formally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contracts RIKARD HJORT Department of Computer Science and Engineering Chalmers University of Technology University of Gothenburg Gothenburg, Sweden 2020 Formally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contracts RIKARD HJORT © RIKARD HJORT, 2020. Supervisor: Thomas Sewell, Department of Computer Science and Engineering Examiner: Wolfgang Ahrendt, Department of Computer Science and Engineering Master’s Thesis 2020 Department of Computer Science and Engineering Chalmers University of Technology and University of Gothenburg SE-412 96 Gothenburg Telephone +46 31 772 1000 Cover: Conceptual rendering of the KWasm system, as the logos for K ans Web- Assembly merged together, with a symbolic execution proof tree protruding. The cover image is made by Bogdan Stanciu, with permission. The WebAssembly logo made by Carlos Baraza and is licensed under Creative Commons License CC0. The K logo is property of Runtime Verification, Inc., with permission. Typeset in LATEX Gothenburg, Sweden 2020 iv Formally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contracts Rikard Hjort Department of Computer Science and Engineering Chalmers University of Technology and University of Gothenburg Abstract A smart contract is immutable, public bytecode which handles valuable assets. This makes it a prime target for formal methods. WebAssembly (Wasm) is emerging as bytecode format for smart contracts.
    [Show full text]