36
CUHK FAA Thomas Cheung Sec Sch 1 3 3 第第第第第第第 Data and Information Processing S.4-5 CS&IT CE Course S.4-5 CS&IT CE Course 第第第第第第第第第第第第第第第第 第第第第第第第第第第第第第第第第

第 3 章

  • Upload
    quincy

  • View
    58

  • Download
    0

Embed Size (px)

DESCRIPTION

第 3 章. 數據和資訊處理 Data and Information Processing. S.4-5 CS&IT CE Course 中四及中五電腦與資訊科技會考課程. 數據處理 Data Processing. 排序 Sorting 合併 Merging 檢索 Searching 更新 Updating. 數據處理 Data Processing. 排序 Sorting 按某種次序來排列 Arranging data in a certain order - PowerPoint PPT Presentation

Citation preview

Page 1: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 1

第 第 33 章章第 第 33 章章數據和資訊處理Data and Information Processing

S.4-5 CS&IT CE CourseS.4-5 CS&IT CE Course

中四及中五電腦與資訊科技會考課程中四及中五電腦與資訊科技會考課程

Page 2: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 2

數據處理 Data Processing

1. 排序 Sorting

2. 合併 Merging

3. 檢索 Searching

4. 更新 Updating

Page 3: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 3

1.排序 Sorting• 按某種次序來排列 Arranging data in a certain order• 例如:以下的記錄是按照學生姓名的筆劃數目順序排列 e.g.

the records below are sorted in alphabetical order of student names

數據處理 Data Processing

Page 4: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 4

2. 合併 Merging

• 合併是把兩個檔案的內容合併成一個檔案Merging combines the contents of two files to form one file

Page 5: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 5

2. 合併 Merging

Name

Class

No Student ID

Tel

Amy 4B 1 981209 2448 3111

Fiona

4B 2 981532 2244 5559

Ben 4B 3 983456 2445 4746

David

4B 4 983212 2345 6789

Name

Class

No Student ID

Tel

Ada 4C 1 981208 2444 4111

Cindy

4C 2 991121 2987 5432

Eva 4C 3 993411 2981 4632

Tina 4C 4 984522 2145 3467

+

Name

Class

No Student ID

Tel

Amy 4B 1 981209 2448 3111

Fiona 4B 2 981532 2244 5559

Ben 4B 3 983456 2445 4746

David

4B 4 983212 2345 6789

Ada 4C 1 981208 2444 4111

Cindy 4C 2 991121 2987 5432

Eva 4C 3 993411 2981 4632

Tina 4C 4 984522 2145 3467

Page 6: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 6

3. 檢索 Searching

• 檢索是指確定記錄在檔案中的位置Searching refers to locating a record in a file

Page 7: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 7

3. 檢索 Searching

Name

Class No Student ID

Tel

Amy 4A 2 981209 2448 3111

Ben 4A 22 983456 2445 4746

Fiona 4B 9 981532 2244 5559

…David 4D 22 983212 2345 6789

Searching 檢索: Fiona

Page 8: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 8

4. Updating 更新• 插入新記錄 Insert new records

• 刪除記錄 Delete records

• 修改不正確的記錄 Amend incorrect records

Page 9: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 9

插入 InsertionName Class No Student ID TelAmy 4A 2 981209 2448 3111Fiona 4B 9 981532 2244 5559David 4D 22 983212 2345 6789

Name Class No Student ID TelAmy 4A 2 981209 2448 3111Fiona 4B 9 981532 2244 5559David 4D 22 983212 2345 6789Ben 4A 22 983456 2445 4746

Page 10: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 10

刪除 DeletionName Class No Student ID TelAmy 4A 2 981209 2448 3111Ben 4A 22 983456 2445 4746Fiona 4B 9 981532 2244 5559David 4D 22 983212 2345 6789

Name Class No Student ID TelAmy 4A 2 981209 2448 3111Fiona 4B 9 981532 2244 5559David 4D 22 983212 2345 6789

Page 11: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 11

修改 AmendmentName Class No Student ID TelAmy 4A 2 981209 2448 3111Fiona 4B 9 981532 2244 5559David 4D 22 983212 2345 6789

Name Class No Student ID TelAmy 4A 2 981209 2448 3111Fiona 4B 9 981532 2190 3219David 4D 22 983212 2345 6789

Page 12: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 12

Name Class No Student ID Tel

Amy 4B 1 981209 2448 3111

Fiona 4B 2 981532 2244 5559Ben 4B 3 983456 2445 4746

David 4B 4 983212 2345 6789Tim 4B 5 986798 2211 5698

Insert a new Record加入一個新紀錄

4. 更新 Updating

Page 13: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 13

• 是指對信息進行資訊處理,使信息的運用變得更容易

To process information into a form that enables easy manipulation

資訊處理 Information Processing

Page 14: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 14

•銀行的賬戶資料以資料表格的形式顯示,每行稱為一個記錄,每個記錄包含欄 Organise the information for a bank accounts in Table form. Each row is a Record and each column is a Field

信息的組織

Organisation of Information

Page 15: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 15

$998,899.00G284384(8)001-01-234587

$88,000.00C823976(0)001-01-234577

$18,280.00E762398(9)001-01-234567

$ 97,600.00G284384(8)001-01-234565

$8,000.00A674309(1)001-01-234563

$99,000.00C324564(4)001-01-234562

賬戶結餘客戶身分證號碼賬戶號碼

欄 Field

Page 16: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 16

•選擇一個欄作為關鍵欄,藉以辨別每一個記錄 A field is chosen as the key field to identify each record

•賬戶號碼是獨一無二的,因此可用來作為關鍵欄 The field Bank Account Number is unique for every record. Therefore, it is chosen to be the key field

信息的組織

Organisation of Information

Page 17: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 17

$998,899.00G284384(8)001-01-234587

$88,000.00C823976(0)001-01-234577

$18,280.00E762398(9)001-01-234567

$ 97,600.00G284384(8)001-01-234565

$8,000.00A674309(1)001-01-234563

$99,000.00C324564(4)001-01-234562

賬戶結餘客戶身分證號碼賬戶號碼

賬戶號碼是獨一無二 Unique

Page 18: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 18

最後,將來自同一銀行各個分行的賬戶資料表格組合起來,便成為該銀行的賬戶資料數據庫Finally, tables of bank account information from various branches of the bank are grouped together to form a database for the bank

Page 19: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 19

數據庫的結構 Structure of Database

1.一個數據庫是由一組資料表格所組成 A database is a collection of tables

1.一個資料表格是由一組相關的記錄所組成 A table is a collection of related records

2.一個記錄是由一組相關的欄所組成 A record is a group of related fields

4.一個欄包含了屬某個特定類型的信息 A field contains a unit of information of a special kind

Page 20: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 20

數據庫的結構 Structure of Database

資料表格的結構是以每個記錄中的欄的數目及各欄的屬性來定義的 The table structure is defined by the number of fields in a record

欄的屬性包括欄名、欄類型和欄寬等 the attributes of each field, such as field name, field type and field width

Page 21: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 21

相關資料表格 Related tables

$88,000.00C823976(0)001-01-234577

$998,899.00G284384(8)001-01-234587

$18,280.00E762398(9)001-01-234567

$97,600.00G284384(8)001-01-234565

$8,000.00A674309(1)001-01-234563

$99,000.00C324564(4)001-01-234562

賬戶結餘 Balance身分證號碼 ID No. 賬戶號碼 Account No

C823976(0)

E762398(9)

G284384(8)

A674309(1)

C324564(4)

身分證號碼 ID No.

28709812游永志

25636665董健華

29819070鍾國恩

23415467陸應基

26701211龔英常

聯絡電話 TEL.姓名 Name

信息的轉化 Conversion of Information

公共欄 Common field

Page 22: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 22

相關資料表格 Related tables

$88,000.00C823976(0)001-01-234577$998,899.00G284384(8)001-01-234587

$18,280.00E762398(9)001-01-234567

$97,600.00G284384(8)001-01-234565

$8,000.00A674309(1)001-01-234563

$99,000.00C324564(4)001-01-234562

賬戶結餘 Balance身分證號碼 ID No.賬戶號碼 Account No.

C823976(0)

E762398(9)

G284384(8)

A674309(1)

C324564(4)

身分證號碼 ID No,

28709812游永志

25636665董健華

29819070鍾國恩

23415467陸應基

26701211龔英常

聯絡電話 Tel姓名 Name$88,000.00游永志001-01-234577

$998,899.00鍾國恩001-01-234587

$18,280.00董健華001-01-234567$97,600.00鍾國恩001-01-234565

$8,000.00陸應基001-01-234563$99,000.00龔英常001-01-234562

賬戶結餘 BalanceName 姓名賬戶號碼 Account No,

信息的轉化 Conversion of Information

Page 23: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 23

數據庫報表 Database Reports 使用數據庫管理系統軟件包將信息轉化成較容易閱讀的報表形式By using Database Management System (DBMS), information is converted into more readable report forms

Page 24: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 24

電腦通常會被連接起來而形成網絡,藉此讓我們更容易傳送和共享信息Computers are usually linked up to form a network. It allows people to transmit and share information

溝通和傳輸 Communication and Transmission

Page 25: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 25

數據及資訊處理的模式 Modes of Data and Information Processing

• 成批處理 Batch processing

• 實時處理 Real-time processing

Page 26: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 26

成批處理 Batch Processing

• 把收集得的數據累積起來All data are collected into groups

• 把數據排序後,一起輸入電腦來處理 Data are sorted into sequence before being processed together

Page 27: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 27

成批處理 的例子 Examples of Batch Processing

• 工資計算系統 Payroll system

• 處理考試成績 Processing examination marks

Page 28: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 28

成批處理的好處 Advantages of Batch Processing

• 系統較易建立,合乎經濟效益Economical: requires a simple set-up

• 運作成本較低 Lower processing cost• 處理速度較高 High processing speed

Page 29: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 29

成批處理的缺點 Disadvantages of Batch Processing

• 收集數據後會隔一段時間才進行處理,到時有關資料可能已經過時Takes place only after a certain period of time: information may be out-of-date

• 當處理大量數據時,需要花很長時間來等候完成整批數據的處理If a large amount of data are being processed, have to wait for a long time for the batch processing to be finished

Page 30: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 30

成批處理的缺點 Disadvantages of Batch Processing

• 若在處理時出現操作錯誤,整批數據便須重頭再作處理 If there are operation errors, the whole batch of data must be processed again

Page 31: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 31

實時處理 Real-time Processing

• 把收集得的數據作即時處理Data are processed as soon as they are received

Page 32: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 32

實時處理的例子 Examples of Real-time Processing 電腦售票系統 Ticketing system易辦事系統 Easy Pay System (EPS)

Page 33: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 33

實時處理的好處 Advantages of Real-time Processing

• 所有資料都是最新的 Information is most up-to-date

• 用戶不需要花很長的時間來等候信息輸出 Shorter waiting time for output

Page 34: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 34

實時處理的缺點 Disadvantages of Real-time Processing

• 建立系統的難度較高 More difficult to set up

• 建立系統的成本較高 More expensive

• 運作成本較高 Higher processing cost

Page 35: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 35

堂課 Classworks

• P.50 Q.8

Page 36: 第  3  章

CUHK FAA Thomas Cheung Sec Sch 36

功課 Homeworks

• P.49 Q.1-7