2013年3月5日 星期二

資料庫(1)


第一章 Why using a DB?
Database System:DBMS+data
一個資料庫就是一群有關系的資料所成的集合

Operations on a DB
1.add/remove files
2.insert/delete/update data in existing files
3.retrieve data 最常用read-only (select)

field(attribute) → record(tuple) → file

一個資料庫系統能提供資料分享,整合,一致性,標準化,安全限制及避免重複資料的儲存

(ADV.)
1.Redundancy
2.Inconsistency(Avoided)
3.Shared
4.Standards
5.Security restrictions
6.Integrity
7.Conflicting requirements
8.Data Independence

an architecture for a DB
Three layers:Internal, Conceptual, External → 資料庫有三層

Internal schema → storage structures and access paths
Conceptual schema → structure and constraints
External schema → user views

1.Logical Data Independence
2.Physical data Independence
3.Mapping

Data Definition Language(DDL):Used by the DBA and database designer to specify the conceptual schema of a database.
Data Manipulation Language(DML):Used to specify database retrievals and updates.
DML commands(data sub-language)

Objects of Database Design
1.easy to use
2.easy to maintain
3.cost effective

沒有留言:

張貼留言