Data Set
(From Wikipedia, the free encyclopedia)
A data set (or dataset) is a collection of data, usually presented in tabular form. Each column represents a particular variable. Each row corresponds to a given member of the data set in question. It lists values for each of the variables, such as height and weight fo an object or values of random numbers. Each value is known as a datum. The data set may comprise data for one or more members, corresponding to the number of rows.
Historically, the term originated in the mainframe field, where it had a well-defined meaning, very close to contemporary computer file. This topic is not covered here.
In the simplest case, there is only one variable, and then the data set consists of a single column of values, often represented as a list. In spite of the name, such a univariate data set is not a set in the usual mathematical sense, since a given value may occur multiple times. Normally the order does not matter, and then the collection of values may be considered to be a multiset rather than an (ordered) list.
The values may be numbers, such as real numbers or integers, for example representing a person's height in centimeters, but may also be nominal data (i.e., not consisting of numerical values), for example representing a person's ethnicity. More generally, values may be of any of the kinds described as a level of measurement. For each variable, the values will normally all be of the same kind. However, there may also be "missing values", which need to be indicated in some way.
In statistics data sets usually come from actual observations obtained by sampling a statistical population, and each row corresponds to the observations on one element of that population. Data sets may further be generated by algorithms for the purpose of testing certain kinds of software. Some modern statistical analysis software such as PSPP still present their data in the classsical data set fashion.
『翻譯如下:
數據集 來自百科,自由的百科全書
Data set(或dataset)是一個數據的集合,通常以表格形式出現。每一列代表一個特定變量。每一行都對應於某一成員的數據集的問題。它列出的價值觀為每一個變量,如身高和體重的一個物體或價值的隨機數。每個數值被稱為數據資料。對應於行數,該數據集的數據可能包括一個或多個成員。
從歷史上看,這個術語起源於大型機領域,在那裏它有一個明確界定的意義,非常接近現代的計算機檔案。這個主題是不包括在這裏。
最簡單的情況下,衹有一個變量,然後在數據集由一列列的數值組成,往往被描述為一個列表。儘管名稱,這樣一個單數據集不是一套通常的數學意義,因為某一個指定數值,可能會出現多次。通常的順序並不重要,然後這樣數值的集合可能被視為多重集,而不是(順序)列表。
值可能是數字,例如真正的數字或整數,例如代表一個人的身高多少釐米,但也可能是象徵性的數據(即不包括數字),例如代表一個人的種族問題。更一般的說,價值可以是任何類型描述為某種程度的測量。對於每一個變量,通常所有的值都是同類。但是也可能是“遺漏值”,其中需要指出的某種方式。
在統計數據集通常來自實際觀測得到的抽樣統計人口,每一行對應於觀測的一個組成部分,人口。數據集可能會進一步産生算法為測試目的某些種類的軟件。一些現代統計分析軟件,如PSPP仍然存在的數據中的經典數據集的方式。
』
數據集在斷開緩存中存儲數據。數據集的結構類似於關係數據庫的結構;它公開表、行和列的分層對象模型。另外,它包含為數據集定義的約束和關係。
數據集可以類型化或非類型化。類型化數據集是這樣一種數據集,它先從基類派生,然後使用XML架構文件(.xsd文件)中的信息生成新類。架構中的信息(表、列等)被作為一組第一類對象和屬性生成並編譯為此新數據集類。
因為類型化DataSet類從基類DataSet繼承,所以此類型化類承接DataSet類的所有功能,並且可與將DataSet類的實例作為參數的方法一起使用。
相形之下,非類型化數據集沒有相應的內置架構。與類型化數據集一樣,非類型化數據集也包含表、列等,但它們衹作為集合公開。
(摘自WordPress中文)
Delphi 4中有四種類型的標準數據集構件,分別是TTable、TQuery、TStoredProc和TClientDataSet。這些數據集構件都是從一個共同的基類TDataSet繼承下來的,其中,衹有TClientDataSet是直接從TDataSet繼承下來的,而TTable、TQuery、TStoredProc的直接上級是TDBDataSet,TDBDataSet的上級是TBDEDataSet,TBDEDataSet 的上級纔是TDataSet。這幾個類之間的繼承關係可以用圖6.1來表示。
TDataSet是所有數據集的抽象基類,它的大部分屬性和方法是虛擬的或抽象的。所謂虛擬的方法,是指這些方法可以被派生類重載。所謂抽象的方法,是指這些方法衹有聲明,沒有定義,派生類必須給出定義後才能調用這些方法,不同的派生類可以有不同的定義。
由於TDataSet中包含抽象的方法,您不能直接創建它的實例,否則會引起運行期錯誤。
如果從功能上劃分,TDataSet的屬性和方法可以分為這麽幾大塊:打開和關閉數據集、瀏覽記錄、編輯數據、書簽管理、控製連接、訪問字段、記錄緩衝區管理、過濾、事件。