360 likes | 526 Views
第 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
E N D
第 3 章 數據和資訊處理 Data and Information Processing S.4-5 CS&IT CE Course 中四及中五電腦與資訊科技會考課程 CUHK FAA Thomas Cheung Sec Sch
數據處理 Data Processing • 排序 Sorting • 合併 Merging • 檢索 Searching • 更新 Updating CUHK FAA Thomas Cheung Sec Sch
數據處理 Data Processing • 排序 Sorting • 按某種次序來排列 Arranging data in a certain order • 例如:以下的記錄是按照學生姓名的筆劃數目順序排列 e.g. the records below are sorted in alphabetical order of student names CUHK FAA Thomas Cheung Sec Sch
合併 Merging • 合併是把兩個檔案的內容合併成一個檔案Merging combines the contents of two files to form one file CUHK FAA Thomas Cheung Sec Sch
合併 Merging + CUHK FAA Thomas Cheung Sec Sch
檢索 Searching • 檢索是指確定記錄在檔案中的位置Searching refers to locating a record in a file CUHK FAA Thomas Cheung Sec Sch
檢索 Searching Searching 檢索:Fiona CUHK FAA Thomas Cheung Sec Sch
Updating 更新 • 插入新記錄 Insert new records • 刪除記錄 Delete records • 修改不正確的記錄 Amend incorrect records CUHK FAA Thomas Cheung Sec Sch
插入 Insertion CUHK FAA Thomas Cheung Sec Sch
刪除 Deletion CUHK FAA Thomas Cheung Sec Sch
修改 Amendment CUHK FAA Thomas Cheung Sec Sch
更新 Updating Insert a new Record 加入一個 新紀錄 CUHK FAA Thomas Cheung Sec Sch
資訊處理 Information Processing • 是指對信息進行資訊處理,使信息的運用變得更容易 • To process information into a form that enables easy manipulation CUHK FAA Thomas Cheung Sec Sch
信息的組織 Organisation of Information • 銀行的賬戶資料以資料表格的形式顯示,每行稱為一個記錄,每個記錄包含欄Organise the information for a bank accounts inTableform. Each row is aRecordand each column is aField CUHK FAA Thomas Cheung Sec Sch
欄 Field 賬戶號碼 客戶身分證號碼 賬戶結餘 001-01-234562 C324564(4) $99,000.00 001-01-234563 A674309(1) $8,000.00 001-01-234565 G284384(8) $ 97,600.00 001-01-234567 E762398(9) $18,280.00 001-01-234577 C823976(0) $88,000.00 001-01-234587 G284384(8) $998,899.00 CUHK FAA Thomas Cheung Sec Sch
信息的組織 Organisation of Information • 選擇一個欄作為關鍵欄,藉以辨別每一個記錄A field is chosen as thekey fieldto identify each record • 賬戶號碼是獨一無二的,因此可用來作為關鍵欄The fieldBank Account Numberisunique for every record. Therefore, it is chosen to be the key field CUHK FAA Thomas Cheung Sec Sch
賬戶號碼 客戶身分證號碼 賬戶結餘 001-01-234562 C324564(4) $99,000.00 001-01-234563 A674309(1) $8,000.00 001-01-234565 G284384(8) $ 97,600.00 001-01-234567 E762398(9) $18,280.00 001-01-234577 C823976(0) $88,000.00 001-01-234587 G284384(8) $998,899.00 賬戶號碼是獨一無二 Unique CUHK FAA Thomas Cheung Sec Sch
最後,將來自同一銀行各個分行的賬戶資料表格組合起來,便成為該銀行的賬戶資料數據庫最後,將來自同一銀行各個分行的賬戶資料表格組合起來,便成為該銀行的賬戶資料數據庫 Finally, tables of bank account information from various branches of the bank are grouped together to form adatabasefor the bank CUHK FAA Thomas Cheung Sec Sch
數據庫的結構 Structure of Database • 一個數據庫是由一組資料表格所組成 • A database is a collection of tables • 一個資料表格是由一組相關的記錄所組成 A table is a collection of related records • 一個記錄是由一組相關的欄所組成 • A record is a group of related fields • 一個欄包含了屬某個特定類型的信息 • A field contains a unit of information of a special kind CUHK FAA Thomas Cheung Sec Sch
數據庫的結構 Structure of Database • 資料表格的結構是以每個記錄中的欄的數目及各欄的屬性來定義的 The table structure is defined by the number of fields in a record • 欄的屬性包括欄名、欄類型和欄寬等the attributes of each field, such asfield name, field typeandfield width CUHK FAA Thomas Cheung Sec Sch
信息的轉化 Conversion of Information 賬戶號碼 Account No 身分證號碼 ID No. 賬戶結餘Balance 001-01-234562 C324564(4) $99,000.00 001-01-234563 A674309(1) $8,000.00 001-01-234565 G284384(8) $97,600.00 001-01-234567 E762398(9) $18,280.00 001-01-234577 C823976(0) $88,000.00 001-01-234587 G284384(8) $998,899.00 身分證號碼 ID No. 姓名Name 聯絡電話TEL. C324564(4) 龔英常 26701211 A674309(1) 陸應基 23415467 G284384(8) 鍾國恩 29819070 E762398(9) 董健華 25636665 C823976(0) 游永志 28709812 相關資料表格 Related tables 公共欄 Common field CUHK FAA Thomas Cheung Sec Sch
信息的轉化 Conversion of Information 賬戶號碼Account No. 身分證號碼ID No. 賬戶結餘Balance 001-01-234562 C324564(4) $99,000.00 001-01-234563 A674309(1) $8,000.00 賬戶號碼 Account No, Name姓名 賬戶結餘Balance 001-01-234565 G284384(8) $97,600.00 001-01-234562 龔英常 $99,000.00 001-01-234567 E762398(9) $18,280.00 001-01-234563 陸應基 $8,000.00 001-01-234577 C823976(0) $88,000.00 001-01-234565 鍾國恩 $97,600.00 001-01-234587 G284384(8) $998,899.00 001-01-234567 董健華 $18,280.00 001-01-234577 游永志 $88,000.00 身分證號碼ID No, 姓名Name 聯絡電話Tel 001-01-234587 鍾國恩 $998,899.00 C324564(4) 龔英常 26701211 A674309(1) 陸應基 23415467 G284384(8) 鍾國恩 29819070 E762398(9) 董健華 25636665 C823976(0) 游永志 28709812 相關資料表格 Related tables CUHK FAA Thomas Cheung Sec Sch
數據庫報表 Database Reports • 使用數據庫管理系統軟件包將信息轉化成較容易閱讀的報表形式 By usingDatabase Management System (DBMS), information is converted into more readable report forms CUHK FAA Thomas Cheung Sec Sch
溝通和傳輸 Communication and Transmission • 電腦通常會被連接起來而形成網絡,藉此讓我們更容易傳送和共享信息 • Computers are usually linked up to form a network. It allows people to transmit and share information CUHK FAA Thomas Cheung Sec Sch
數據及資訊處理的模式Modes of Data and Information Processing • 成批處理 Batch processing • 實時處理 Real-time processing CUHK FAA Thomas Cheung Sec Sch
成批處理 Batch Processing • 把收集得的數據累積起來 All data are collected into groups • 把數據排序後,一起輸入電腦來處理 Data are sorted into sequence before being processed together CUHK FAA Thomas Cheung Sec Sch
成批處理 的例子Examples of Batch Processing • 工資計算系統 Payroll system • 處理考試成績 Processing examination marks CUHK FAA Thomas Cheung Sec Sch
成批處理的好處 Advantages of Batch Processing • 系統較易建立,合乎經濟效益 Economical: requires a simple set-up • 運作成本較低 Lower processing cost • 處理速度較高 High processing speed CUHK FAA Thomas Cheung Sec Sch
成批處理的缺點 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 CUHK FAA Thomas Cheung Sec Sch
成批處理的缺點Disadvantages of Batch Processing • 若在處理時出現操作錯誤,整批數據便須重頭再作處理 If there are operation errors, the whole batch of data must be processed again CUHK FAA Thomas Cheung Sec Sch
實時處理 Real-time Processing • 把收集得的數據作即時處理 Data are processed as soon as they are received CUHK FAA Thomas Cheung Sec Sch
實時處理的例子Examples of Real-time Processing • 電腦售票系統 Ticketing system • 易辦事系統 Easy Pay System (EPS) CUHK FAA Thomas Cheung Sec Sch
實時處理的好處 Advantagesof Real-time Processing • 所有資料都是最新的 Information is most up-to-date • 用戶不需要花很長的時間來等候信息輸出Shorter waiting time for output CUHK FAA Thomas Cheung Sec Sch
實時處理的缺點Disadvantages of Real-time Processing • 建立系統的難度較高 More difficult to set up • 建立系統的成本較高 More expensive • 運作成本較高 Higher processing cost CUHK FAA Thomas Cheung Sec Sch
堂課 Classworks • P.50 Q.8 CUHK FAA Thomas Cheung Sec Sch
功課 Homeworks • P.49 Q.1-7 CUHK FAA Thomas Cheung Sec Sch