We will cover some of the following SQL queries to create the tables:
Create a schema first, if it hasn't already been created for you—HANA_DEMO
; you can choose any name.
A database schema is the skeleton structure that represents the logical view of the entire database (objects such as tables, views, and stored procedures). It defines how the data is organized and how the relations among them are associated. It formulates all the constraints that are to be applied on the data, whereas Table
is one of the objects contained in schema. It is a set of data elements (values) that is organized using a model of vertical columns (which are identified by their name) and horizontal rows:
The following command creates the SALES_FACTS
table:
The following command creates the CUSTOMER
table:
The following command creates the PRODUCTS
table:
The following command creates the REGION
table:
The following are sample insert
queries:
Tip
I am inserting single values, but you can insert or re-run the query with different values or download the Excel file from our website for demo data.