2

各种文档将行定义为记录的同义词。不幸的是,记录可以是列表或单个项目。同样,一行通常包含多个项目,但有时称为“单个条目”。

一个字段可以是一个容器(例如,在 html 中),它可以被认为是输入一个项目的地方,或者它可以被认为是一个输入许多项目的地方(尽管有时在不同的场合)。

如果有人可以简单地说,那肯定会很好。例如,一行是通过插入语句的单项、单字段条目的结果。一个字段代表所有行并与一列相交。

任何人都可以提供一个明确的答案,因为谷歌只是没有削减它。谢谢你。

编辑:

在 excel 中,它肯定是一刀切的。柱子都是水平的。行都是垂直的。单元格是一个行列对;一个条目。尽管关系数据库语言就像处理多个电子表格(表格),但列、行、单元格的方法似乎最有意义。

我正在查看各种不同的解释,这些解释似乎在答案中彼此不一致。我们能否在操作上定义我目前正在编写的教程的术语,但不清楚?链接:http: //zetcode.com/databases/sqlitetutorial/introduction/#about

4

4 回答 4

4

如果这是一张桌子...

O--O-------------O-------------O
|ID|   my_col_1  |   my_col_2  |
O--O-------------O-------------O
|0 | fskdjfh     | jfkhgdkfj   |
|1 | NULL        | hfkjsdh     |
|2 | jfkdhsdkjh  | NULL        |
|3 | fdfhkjh     | NULL        |
|4 | NULL        | NULL        |
O--O-------------O-------------O

这是一排...

|0 | fskdjfh     | jfkhgdkfj   |

这是一个领域...

| jfkhgdkfj   |

怎么样?

于 2012-11-08T13:40:20.797 回答
4

Imagine you have to describe many aspect of the same thing. You have to choose which aspects you want to take care of: these are the columns of your table. For each of the column you can choose the data type to represent (numeric, String, ...). The column could be also a composite data type (ex: date) or a reference to another object.

The description of an object consists in all the values contained in the columns relative to that object: this is the row/record (the two terms have the same meaning in ER databases).

The field is the value assumed by a column--let's say that it is a cell in a table. It is part of the row, but it may have no sense outside the context provided by the row and the columns.

Maybe the confusion is due to the fact that to simplify the notation, the term field is used as the term column. When you see a query like "select * from foo where somefield=something" it means that you select the rows in which the field relative to the column "somefield", assumes the value "something".

This definition is ok also with HTML fields. A field of a form is the place where you enter the value the column will have in your case, that means, in the row that represents you.

于 2012-11-08T16:08:43.540 回答
1

一行/记录,一列/字段:

+---+
| x |
+---+

一行/记录,三列/字段:

+---+---+---+
| x | y | z |
+---+---+---+

三行/记录,一列/字段:

+----+
| x1 |
+----+
| x2 |
+----+
| x3 |
+----+

三行/记录,三列/字段:

+----+----+----+
| x1 | y1 | z1 |
+----+----+----+
| x2 | y2 | z2 |
+----+----+----+
| x3 | y3 | z3 |
+----+----+----+
于 2012-11-08T13:40:48.340 回答
0

fields or columns are defined with the table, and are the part of table structure, they hold information vertically. they describe the records or rows in the table.

Example: name, age, salary etc.

Rows or records are the real data that is stored in the table, these records are the actual information. one horizontal row represent one record.

Example: 'John', 23, 23000.00

于 2012-11-08T14:02:32.690 回答