词条 | Table (database) |
释义 |
A table is a collection of related data held in a table format within a database. It consists of columns, and rows. In relational databases, and flat file databases, a table is a set of data elements (values) using a model of vertical columns (identifiable by name) and horizontal rows, the cell being the unit where a row and column intersect.[1] A table has a specified number of columns, but can have any number of rows.[2] Each row is identified by one or more values appearing in a particular column subset. A specific choice of columns which uniquely identify rows is called the primary key. "Table" is another term for "relation"; although there is the difference in that a table is usually a multiset (bag) of rows where a relation is a set and does not allow duplicates. Besides the actual data rows, tables generally have associated with them some metadata, such as constraints on the table or on the values within particular columns.{{Dubious|reason=Metadata is "data about data". A check constraint doesn't have such property|date=September 2012}} The data in a table does not have to be physically stored in the database. Views also function as relational tables, but their data are calculated at query time. External tables (in Informix[3] or Oracle,[4][5] for example) can also be thought of as views. Tables versus relationsIn terms of the relational model of databases, a table can be considered a convenient representation of a relation, but the two are not strictly equivalent. For instance, a SQL table can potentially contain duplicate rows, whereas a true relation cannot contain duplicate tuples. Similarly, representation as a table implies a particular ordering to the rows and columns, whereas a relation is explicitly unordered. However, the database system does not guarantee any ordering of the rows unless an An equally valid representation of a relation is as an n-dimensional chart, where n is the number of attributes (a table's columns). For example, a relation with two attributes and three values can be represented as a table with two columns and three rows, or as a two-dimensional graph with three points. The table and graph representations are only equivalent if the ordering of rows is not significant, and the table has no duplicate rows. ComparisonsHierarchical databasesIn non-relational systems, hierarchical databases, the distant counterpart of a table is a structured file, representing the rows of a table in each row of the file and each column in a row. This structure implies that a row can have repeating information, generally in the child data segments. Data are stored in sequence of physical records. SpreadsheetsUnlike a spreadsheet, the datatype of a column is ordinarily defined by the schema describing the table. Some SQL systems, such as SQLite, are less strict about column datatype definitions. See also
References1. ^{{Citation | url = http://www.merriam-webster.com/dictionary/cell | type =definition | contribution = cell | title = Merriam-Webster | accessdate = May 29, 2012}}. {{Databases}}{{DEFAULTSORT:Table (Database)}}2. ^{{cite web|title= SQL Guide: Tables, rows, and columns|url= http://publib.boulder.ibm.com/infocenter/soliddb/v6r3/index.jsp?topic=/com.ibm.swg.im.soliddb.sql.doc/doc/tables.rows.and.columns.html|work= IBM|accessdate= 11 December 2013}} 3. ^{{cite web| url = http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_2053.htm| title = CREATE EXTERNAL TABLE Statement| website = IBM Knowledge center| series = IBM Informix 12.10| publisher = IBM| access-date = 2015-08-14| quote = You use external tables to load and unload data to or from your database. You can also use external tables to query data in text files that are not in an Informix database.}} 4. ^{{cite web| url = http://www.orafaq.com/wiki/External_table| title = External table| year = 2015| website = Oracle FAQ| publisher = Oracle FAQ| access-date = 2015-08-14| quote = An external table is a table that is NOT stored within the Oracle database. Data is loaded from a file via an access driver (normally ORACLE_LOADER) when the table is accessed. One can think of an external table as a view that allows running SQL queries against files on a filesystem [...].}} 5. ^{{cite book| last1 = Bryla| first1 = Bob| last2 = Thomas| first2 = Biju| title = OCP: Oracle 10g New Features for Administrators Study Guide: Exam 1Z0-040| url = https://books.google.com/books?id=XX8qSa1x0G4C| publisher = John Wiley & Sons| publication-date = 2006| page = 90| isbn = 9780782150858| accessdate = 2015-08-14| quote = Oracle 9i introduced external tables [...] read-only from the Oracle database. In Oracle 10g, you can write to external tables.}} 3 : SQL|Data modeling|Relational database management systems |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。