SQL Basics For HANA-Unit1:Motivation And Basic Concepts

1.DB、DBS、DBMS

1)Database(DB):structured collection of “records”。

2)Database System(DBS):specific database + DBMS。

· DBS = DB + DBMS

3)Database Management System(DBMS):manage the database。

2.3 Level Schema Architecture

1)目标:底层修改不应影响高层。

2)External Level:应用层,和用户/应用交互。——VIEW

3)Conceptual Level:逻辑层。——TABLE

4)Internal Level:物理层。——INDEX

3.Database Models

1)Hierarchical Database Model

2)Network Database Model

3)Relational Database Model

4)Object-relational Database Model

5)Object-oriented Database Model

6)XML-based Database Model

4.Relational Database Model

1)Relations:A relation(in the sense of mathematics) is the subset of the Cartesian product of sets.

2)关系型语言:

· Relational Algebra

· Relational Calculus

· SQL

3)SAP HANA is a relational data base management system and supports SQL.

4)Different application architectures and development models are possible with SAP HANA.

· Data Marts with SAP HANA

· Standalone HANA Apps

· HANA as Accelerator(secondary DB)

· HANA as primary Database(for AS ABAP)

5)HANA supports an extended version of SQL.

5.SQL特性

1)SQL is standardized。

2)SQL is descriptive(rather than procedural).

3)SQL execution is optimized.

· SQL statement is first parsed and optimized, and then executed.

4)SQL is multi-set oriented(not single record-based).

6.SQL语言的子语言

1)DML(Data Manipulation Language):SELECT, INSERT, UPDATE, DELETE.

2)DDL(Data Definition Language):CREATE, ALTER, DROP, RENAME.

3)DCL(Data Control Language):GRANT, REVOKE.

7.SQL不是纯粹的关系型

1)主键不是必须的。允许有重复数据。

2)允许NULL。此时“A=A”不一定正确。

3)语言非闭包。

· 结果的顺序与ORDER BY相关。

· 允许匿名结果列。

· 允许重复列名的结果。

8.DB objects

1)Table

2)View

3)Index

4)Constraint

5)Stored procedure

6)Trigger

9.Table

1)表即关系。

2)表由rows和columns组成,是二维的。

10.Key

1)Key:a set of columns,which serves to uniquely identify any row in the table.

2)可以有多个键,但primary key仅有一个,其他作为候选键。

11.Foreign-Key

1)Foreign-Key:set of columns, which is a (primary) key in an (other) table.

2)外键可以引用该表本身。

3)外键不必用相同的名字。

4)外键仅能是其他表的键(允许NULL)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值