28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8 Defining Web-based Data Access<br />

<strong>SAP</strong> <strong>HANA</strong> extended application services (<strong>SAP</strong> <strong>HANA</strong> XS) provide applications and application developers with<br />

access to the <strong>SAP</strong> <strong>HANA</strong> database using a consumption model that is exposed via HTTP.<br />

In addition to providing application-specific consumption models, <strong>SAP</strong> <strong>HANA</strong> XS also host system services that<br />

are part of the <strong>SAP</strong> <strong>HANA</strong> database, for example: search services and a built-in Web server that provides access<br />

to static content stored in the <strong>SAP</strong> <strong>HANA</strong> repository.<br />

The consumption model provided by <strong>SAP</strong> <strong>HANA</strong> XS focuses on server-side applications written in JavaScript and<br />

making use of a powerful set of specially developed API functions. However, you can use other methods to<br />

provide access to the data you want to expose in <strong>SAP</strong> <strong>HANA</strong>. For example, you can set up an ODATA service or<br />

use the XML for Analysis (XMLA) interface to send a Multi-dimensional Expressions (MDX) query. This section<br />

describes how to set up a service that enables you to expose data using OData or XMLA.<br />

8.1 Data Access with OData in <strong>SAP</strong> <strong>HANA</strong> XS<br />

In <strong>SAP</strong> <strong>HANA</strong> Extended Application Services (<strong>SAP</strong> <strong>HANA</strong> XS), the persistence model (for example, tables, views,<br />

and stored procedures) is mapped to the consumption model that is exposed to clients - the applications you<br />

write to extract data from the <strong>SAP</strong> <strong>HANA</strong> database.<br />

You can map the persistence and consumption models with OData, a resource-based Web protocol for querying<br />

and updating data. An OData application running in <strong>SAP</strong> <strong>HANA</strong> XS is used to provide the consumption model for<br />

client applications exchanging OData queries with the <strong>SAP</strong> <strong>HANA</strong> database.:<br />

You can use OData to enable clients to consume authorized data stored in the <strong>SAP</strong> <strong>HANA</strong> database. OData<br />

defines operations on resources using RESTful HTTP commands (for example, GET, PUT, POST, and DELETE)<br />

and specifies the URI syntax for identifying the resources. Data is transferred over HTTP using either the Atom<br />

(XML) or the JSON (JavaScript) format.<br />

Applications running in <strong>SAP</strong> <strong>HANA</strong> XS enable accurate control of the flow of data between the presentational<br />

layer, for example, in the Browser, and the data-processing layer in <strong>SAP</strong> <strong>HANA</strong> itself, where the calculations are<br />

performed, for example, in SQL or SQLScript. If you develop and deploy an OData service running in <strong>SAP</strong> <strong>HANA</strong><br />

XS, you can take advantage of the embedded access to <strong>SAP</strong> <strong>HANA</strong> that <strong>SAP</strong> <strong>HANA</strong> XS provides; the embedded<br />

access greatly improves end-to-end performance.<br />

8.1.1 OData in <strong>SAP</strong> <strong>HANA</strong> XS<br />

OData is a resource-based web protocol for querying and updating data. OData defines operations on resources<br />

using HTTP commands (for example, GET, PUT, POST, and DELETE) and specifies the uniform resource<br />

indicator (URI) syntax to use to identify the resources.<br />

Data is transferred over HTTP using the Atom or JSON format:<br />

164<br />

Note: OData makes it easier for <strong>SAP</strong>, for partners, and for customers to build standards-based<br />

applications for many different devices and on various platforms, for example, applications that are based<br />

on a lightweight consumption of <strong>SAP</strong> and non-<strong>SAP</strong> business application data.<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Defining Web-based Data Access

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!