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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The schema name must adhere to the <strong>SAP</strong> <strong>HANA</strong> rules for database identifiers.<br />

● Name usage<br />

The Data Definition Language (DDL) rendered by the repository contains the schema name as a delimited<br />

identifier.<br />

5.2 Creating Schemas<br />

A schema defines the container that holds database objects such as tables, views, and stored procedures.<br />

<strong>SAP</strong> <strong>HANA</strong> Extended Application Services (<strong>SAP</strong> <strong>HANA</strong> XS) enables you to create a database schema as a design-<br />

time file in the repository.<br />

To create a schema definition file in the repository, perform the following steps:<br />

1. Start the <strong>SAP</strong> <strong>HANA</strong> studio.<br />

2. Open the <strong>SAP</strong> <strong>HANA</strong> Development perspective.<br />

3. Open the Project Explorer view.<br />

4. Create the schema definition file.<br />

Browse to the folder in your project workspace where you want to create the new schema-definition file and<br />

perform the following tasks:<br />

a) Right-click the folder where you want to save the schema-definition file and choose New in the contextsensitive<br />

popup menu.<br />

b) Enter the name of the schema in the File Name box and add the file suffix .hdbschema, for example,<br />

MYSCHEMA.hdbschema.<br />

c) Choose Finish to save the new schema in the repository.<br />

5. Define the schema name.<br />

To edit the schema file, in the Project Explorer view double-click the schema file you created in the previous<br />

step, for example, MYSCHEMA.hdbschema, and add the schema-definition code to the file:<br />

Note: The following code example is provided for illustration purposes only.<br />

schema_name=”MYSCHEMA”<br />

6. Save the schema file.<br />

7. Commit the changes to the repository.<br />

a) Locate and right-click the new schema file in the Project Explorer view.<br />

b) In the context-sensitive pop-up menu, choose Team Commit .<br />

5.3 Tables<br />

In the <strong>SAP</strong> <strong>HANA</strong> database, as in other relational databases, a table is a set of data elements that are organized<br />

using columns and rows. A database table has a specified number of columns, defined at the time of table<br />

76<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 />

Setting Up the Persistence Model

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

Saved successfully!

Ooh no, something went wrong!