




免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Lions College F.7 Computer Application Teaching Notes 2003-2004Topic 4 Databases 數據庫4.1 Concept and Terminology 概念及術語Data versus Information數據及信息的分別 data characteristics: independence, redundancy, integrity 數據特性:獨立性,冗餘,完整性Database terminology:Database, file, record, field, base table, table, column, row數據庫術語:數據庫,檔案,記錄,欄,庫登記表,表,欄,列Data versus Information 數據及信息的分別Data is defined as the symbols used to represent information to be processed by the computer. Data could be a set of no meaning random numbers, a phone number, or a string of words. It may or may not make sense when read.Information is the interpreted data that can be comprehensible by people and contains meaning. 數據是一些符號用作表示電腦處理的信息,數據可以是一些沒有意義的隨機數,電話號碼,或一些字串,有意義或沒有意義均可。信息是一些經已翻譯有意義及可以理解的數據。 Data Characteristics數據特性1.Data Independence數據獨立性The structure of the database depends on the necessity of users. The setting is independent from the application program. Users can search, reorganize, and retrieve data in the database. Also, data can be added, delete, and change without requiring change in programs.數據庫的實質結構獨立於用戶需求,其設定也獨立於應用程序。用戶可檢索和重新組織數據庫內的數據,然後提取資料。亦可隨意增加、删除或修訂數據,而不影響程序運作2.Data Redundancy 多餘數據User stores data in the database only require to store in one location. Storing the same field values more than once (unnecessarily) is referred to as data redundancy.每用戶儲存自己數據在數據庫,祇需在一個位置貯存,便可供不同用戶使用。儲存用樣數據多於一次便屬多餘數據(冗餘)。Three problems are caused by data redundancy. 1.Storing values multiple times wastes space. 2.When a field value changes, multiple occurrences need to be updated. 3.If we forget to change the values in any of the records, the database would then have inconsistent data.冗餘數據有三個缺點:1. 增加儲存時間及浪費儲存位置。2. 如修改數據,不同檔案的數據要隨之更新。3. 如忘記修改檔案內的數據,數據庫的數據便不協調。3.Data Integrity 數據完整性Data Integrity means the consistency of data. After processing or moving data, we need to maintain data integrity. It includes to validate the content of in the database, to compare and validate data between tables then update. 指數據的精確性及期望值的一致性,在數據移動或處理之後,在數據庫系統中要 維護數據完整性。包括確認各個數據區內容、數據區之間的校核、將一個文件或表格中的數據與另一個文件或表格進行比較,校對並進行確認。在經過處理之後, 數據庫才被更新。Database Terminology數據庫術語Database 數據庫A database is a large repository of data. It can collect, index, store and display data systematically. It can also combine related data together. Normally database is controlled by a software package Database Management System (DBMS). Information is retrieved, edited and stored using commands.數據庫是一個儲存大量數據的儲存庫,能有系統地收集、分類、貯存和顯示數據,並能把相關的數據整理合併一起。通常是由數據庫管理系統控制(DBMS). When data is stored in a computer, it is stored in files. Before any data is stored in a database, a structure must be defined for the data file. For example, a student information data file will consist the student name, class, class number, address, telephone, parent names etc. Different records represent different students similar to a table. Therefore, the data files in a database are also called base tables (tables). 數據儲存於電腦是以檔案型式儲存,數據儲存時,必須先設定數據檔案的結構。例如一個學生的資料數據檔案會包括學生的姓名,班級,班號,地址,電話,家長姓名等資料。不同的記錄代表不同學生如表格型式表示,所以數據檔案亦稱為庫登記表(表)。Fields, Records and Tables 欄、記錄、表The database for Lions College can consist of a number of data files. For example, one file is used to store the employee personnel information, one for the students information, one for the students records, and for the school calendar.獅子會中學的數據庫包括不同的數據檔案,例如:其中一檔案是用作儲存僱員的個人資料,另一個儲存學生的資料,亦有一個儲存校曆表。There are five teachers in Lions College. They are stored in the file teacher.dbf as follows:假設獅子會有個教師,儲存於teacher.dbf 檔案的資料如下:Teacher TableRec#ClassNameAddress PhoneRecord 11AMr. Chan20 Abc Street 1234567Record 21BMiss Lee130 Sai Yi Street2345678Record 31CMiss Wong226 Prince Road3456789Record 41DMiss Lau783 Hing Shing Road4567891Record 52AMr. Chan1 Nathan Road5678912 The above data appear in the form of a table with 5 rows and 4 columns. Thus a data file is also called a table. Each row corresponds to one record. Each column corresponds to the data in the same field. A record represents one teacher data. In each record, there are four fields, representing four pieces of information of a teacher. 上述的資料是用列欄的表形式排列,故數據檔案亦可稱為表。每列為一記錄,每欄儲存同一欄位數據。一個記錄代表一個教師的記錄。在每一記錄中,會有欄,代表一教師的資料。Visual FoxPro uses fixed length records. In designing the structure of a table, we need to specify the data type and the length of each field. The structure for the teacher.dbf table is depicted as follows:Visual FoxPro 用一個固定長度的記錄,在設計表的結構,要先決定數據的種類及記錄的長度,教師的數據表是用下列的結構:Structure for table teacher.dbfFieldField NameTypeWidth1CLASSCharacter32NAMECharacter103ADDRESSCharacter204PHONECharacter10The records in the data file teacher.dbf can be accessed through the field CLASS, NAME, ADDRESS, or PHONE. However, the field NAME not a good candidate for accessing records, since Mr. Chan appears in both Record 1 and Record 5. The field NAME has duplicated values or not unique在教師teacher.dbf 數據檔案的數據可以用欄CLASS, NAME, ADDRESS, 或PHONE。但欄位NAME不是一個選取記錄的好欄位,因為Mr. Chan在記錄及均有出現,NAME欄位有重覆的數據或者可以說不是單一記錄。Student Name: _ Class: _ Class Number: _Exercise1. Explain why a database file is often called a table ?2. What is data independence, data redundancy, data inte
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 组织结构调整中的薪酬体系变革试题及答案
- 2025年工业互联网平台计算机视觉技术在航空航天领域缺陷检测的创新应用报告
- 2025年智能建筑系统集成与节能降耗技术培训与人才培养报告
- 2025年大型体育场馆运营社会稳定风险评估与风险评估应用报告
- 2025年科技与互联网行业发展趋势深度解析报告
- 2025年环保产业园园区产业集聚与区域产业协同政策效果评价报告
- 共享汽车使用协议书
- 2025年度三人合伙创办高端美容养生馆合作协议
- 2025房地产项目财务管理人员劳动合同范本
- 2025年度绿色石粉原材料供应与采购合作协议
- 《先进制造技术课件》
- 2024年五年级英语上册 Unit 10 What does that sign mean教案 湘少版
- 食品安全日管控、周排查及月调度记录表
- 飞机设计适航保证手册模板
- 心律失常课件
- 《社群运营》全套教学课件
- JT-T-1116-2017公路铁路并行路段设计技术规范
- 线虫病疫木及异常枯死松树处置投标方案(技术方案技术标)
- 突发事件救援培训中的心理急救和心理疏导
- 电梯日管控、周排查、月调度内容表格
- 《社会工作导论》课件
评论
0/150
提交评论