在应用软件或系统内包含数据一组的档案或表称为数据库....doc_第1页
在应用软件或系统内包含数据一组的档案或表称为数据库....doc_第2页
在应用软件或系统内包含数据一组的档案或表称为数据库....doc_第3页
在应用软件或系统内包含数据一组的档案或表称为数据库....doc_第4页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Database 數據庫A set of files or tables containing data, relating to an application or a system.is called a database. Data are centrally stored in a single file or a set of files to keep data duplication to a minimum and reduced the storage space. Traditional databases are organized by fields, records, and files.在應用軟件或系統內包含數據一組的檔案或表稱為數據庫。數庫會中央儲存於一個或多個檔案內使數據重覆的情況減至最低,節省儲存空間。傳統上數據庫是由欄,記錄及檔案組成。Field 欄A field is a single piece of information or individual data item in the file or table. In database management systems, column is another name for field. 欄是檔案或表內的個別資料或數據,在數據庫內Column 亦即是field。Record記錄A record is one complete set of fields, the gathering of all data in all the fields.記錄是一完整的欄,包括各欄的數據而成。FileA file is a collection of records. 檔案是由多個記錄組成。TableTable are all fields about an object collected together to form a table to store data. Data in the table are arranged in rows and columns. In relational database management systems, all information is stored in the form of tables. 表是將有關項目的欄組成去儲存數據,在表內的數據會以列和欄排列,在關係數據庫中,所有資料均以表方式去儲存。Database Management System (DBMS) 數據庫管理系統To access information from a database, you need a database management system (DBMS). This is a collection of programs that enables you to enter, organize, and select data in a database. 在數據庫中獲取資料,我們需要數據庫管理系統,數據庫管理系統包括一系列的程式容許你去輸入,組織,選擇數據。Components of database management system 數據庫系統的組成部份, (i) Software Programs軟件程式A database management system (DBMS) can be an extremely complex set of software programs. It serves the following functions:1. set up database structure2. controls the organisation, storage and retrieval of data (fields, records and files) in a database. 3. process the stored data in a database4. controls the security and integrity of the database. 5. accepts requests for data from the application program 6. instructs the operating system to transfer the appropriate data. 7. provides views of the data for different users 8. provides an environment for program development.數據庫管理系統可以是一些極為複雜的軟件程式,可提供下列功能:1. 建立數據庫結構。2. 管理組織,儲存及提取數據庫內數據。3. 處理數據庫內數據。4. 控制數據庫內的保安及保持數據完整。5. 提供數據給應用軟件。6. 提示操作系統去傳送數據。7. 向不同使用者提供視圖。8. 提供發展程式的環境。(ii) Base Table (Data Dictionary) 庫登記表Base table (Data Dictionary) is a repository of information about the tables in a database. It serves the following functions:1. managing all the data elements2. contains information includes table names, field names, field validation information, data types, data sizes and index expressions. 3.provides a convenient way to manage the information. 4.provides a convenient way to keep track of the changes in table structure, index expression etc.庫登記表是數據庫內儲存資料表,可提供下列功能:1. 管理所有數據元素。2. 儲存數據庫內資料,包括表名稱,欄名,欄校驗資料,數據種類,數據大小及索引語句3. 提供一個方便管理資料方法4. 提供一個方便去追蹤表中更改的資料。(iii)Derived datum 衍生數據In some situation, the data of some individual data item is dependent on two independent data and we dont need to be stored in the database. For example, the salary of a staff depends on the number of days worked in a month and the daily wages. We dont need to include the salary field in the database. Otherwise, once the value of a field changed. Either daily wages or month working days, we need to update salary field also. Salary field is called derived datum i.e. the data field derived from other data fields) 在一些情況下,某些數據是由其他獨立數據而產生,我們不需將其儲存。例如:職員的人工是由工作日數和日薪而產生,我們不需將此數據加入為一欄,否則當更改其中某一數據例如人工或工作日數時,便要同時將薪金欄同時更新。薪金數據稱為衍生數據。(iv) View 視圖We have to retrieve stored data from a database in various forms according to the requirement of different users, Different views of the same set of data are required. A view can contain data items as well as derived data items. It does not need to contain all the data or fields in a file. For example, account department is provided with a view that contains only salary, leave record while marketing department is provided with a view that contains staff telephone number or height. To fulfill the requirement of all users, some DBMSs provide programming interface for users to develop their own program tailored for their own needs to increase the power of DBMS.不同的使用者需要由數據庫提取所需數據,一個視圖可包括數據及由該數據衍生出的其他數據,它不需包括所有數據或所有的欄,例如會計部祇需有人工,請假記錄,但市場調查部門可能需要職員的身高及電話號碼,去符合所有侯用者的要求,有些數據庫系統會提供程式介面讓使用者自己去發展為他們自己度身訂做的程式去增強數據庫系統的功能。 Relational database關係數據庫In this model, both objects and relationships are represented by structures called tables. Tables are represented by two-dimensional arrays. The fields are represented by the columns of the table. The rows in the table are the data.在此數據庫下,所有目標的關係是以表去關聯,表是用兩維陣列形式去儲存,欄是用表的欄,表的列是數據。For the enrollment database example, three tables, namely students table, subject table and enrollment tables, are created. The relationship between these records can be seen in the common fields of these tables.在一個註冊的數據庫例子中,建立分別為student table, subject table, 及enrollment table 的三個表,各表的關聯可從表中共有的欄位而組成。The implementation by relationship DBMS 關係數據庫內容Student table:StudentIDStudentName-s1JohnnyExample:.RelationshipJohnny, student ID is s1, he enrolls in Chinese class, subject number is 1. 例子:各表關聯 Johnnny學生編號s1號註冊科目是中文,科目編號是1號s2Michaels3Toms4MarySubject TableSubjectNoSubjectName-1 Chinese2 English3 MathematicsEnrollment TableSubjectNoStudentID-1s11s3

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论