Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to database

Similar presentations


Presentation on theme: "Introduction to database"— Presentation transcript:

1 Introduction to database
黃獻華

2 Outline 資料 vs. 資訊 何謂資料庫與其特性 介紹關聯式資料庫系統 簡單介紹SQL的語法 應用方面 Data mining
References

3 資料 vs. 資訊 資料(data) : 實際儲存且未經過處理的值 資訊(information): 已經過處理的且對使用者有意義的值 資料

4 什麼是資料庫(database)? 可視為一種電子化的檔案櫃 - 儲存電腦化資料檔的處所 相關資料的收集處所 科目 學號 成績 資結
22334 90 51211 54 電網導 87 22336 85

5 資料庫系統(Database system)
使用者(user) 軟體(software) – database management system (DBMS) 硬體(hardware) 資料(data)

6 了解資料庫管理系統(DBMS) 處理所有對資料庫存取的軟體 資料庫 DBMS SQL commands 應用程式

7 資料庫特性 長存資料 實體與關係 性質(property) jbs住在Chapel Hill 性質 實體

8 為何使用資料庫 簡潔 (compactness) 訊速 (speed) 節省人力 (less drudgery)
即時性 (currency) 可以減少重複 可以避免不一致 資料獨立於程式之外 資料可以共用 安全性限制 你看,有多方便啊!

9 網頁搜尋系統 - Google

10 認識關聯式資料庫系統(Relational Databases)

11 關聯式資料庫系統(Relational Databases)
學號 姓名 科系 年齡 22334 王XX 電機 20 22336 陳XX 19 51211 張XX 資工 今日主流 關聯性 (relation) 資料都是表格 從舊表格產生新的表格 橫列(columns) : attributes 直行(rows): 實體(entities) Superkey 科目 學號 成績 資結 22334 90 51211 54 電網導 87 22336 85

12 關聯式例子 : wms 住在 Binghampton
Attribute Entity Name ssn strAddr City State Zip Salary jbs Sitterson Hall Chapel Hill NC 27599 120000 lkb 32 Juniper Rd Bethel CT 06801 100000 橫列子集 Name State Zip jbs NC 120000 wms NY 60000 lkb CT 100000 dkb RI 30000 PU 1000 SQL command 直行子集 關聯式例子 : wms 住在 Binghampton

13 資料庫語言 一個關聯資料庫需要以下的操作 查詢資料 改變資料:新增,刪除,更新等 控制資料:使用者權限,確定資料變更等 那就是要用SQL啦!

14 認識SQL語法 處理關聯式資料庫的標準程式語言 Data definition language (DDL) – 資料庫管理員操作的
Data manipulation language (DML) – 終端使用者操作的

15 簡單的SQL指令 CREATE DATABASE databasename; USE databasename;
CREATE TABLE Song (Title varchar(20) not null, Artist varchar(16) not null, Album varchar(20), Time char(5) ); INSERT INTO Song VALUES ("Roundabout", "Yes", "Fragile", "9:35"); SELECT * from Song; Title Artist Album Time Title Artist Album Time Roundabout Yes Fragile 9:35 Almost similar to English language

16 SQL的使用方式 在線上直接輸入SQL指令 使用高階語言如C/C++, Fortran, PHP等呼叫SQL

17 資料庫之應用 Oracle Informix Sybase Microsoft access
Open source : PostgreSql and MySql

18 認識Data Mining

19 全球資料成長率 全世界資料庫的資料量每20個月就增加一倍 很多大公司需要管理的資料量到達terabytes(1012)
資訊量的成長速度遠超過人類的分析能力

20 為何用Data Mining? We are drowning in data, but starving for knowledge!
在龐大的資料中,可能隱藏了很多重要的知識 美國的一項研究報告更是將Data Mining視為二十一世紀十大明星產業 Times時代雜誌曾預估:“Data Mining將是21世紀最熱門之五大新興行業“

21 什麼是Data Mining? 在龐大的數據庫中尋找出有價值的隱藏事件.

22 Data Mining 的工作循環 應用的領域包括金融業、保險業、零售業、直效行銷業、通訊業、制造業以及醫療服務業等。 

23

24 可以預測

25 References Data Management – Richard T. Watson
A first course in database systems – Jeffrey D. Ullman & Jennifer Widom 資料庫系統概論 – C.J. Date


Download ppt "Introduction to database"

Similar presentations


Ads by Google