database 行、记录和元组有什么区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13057663/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 08:45:32  来源:igfitidea点击:

What is the difference between a row, record and tuple?

databaserowtuplesrecord

提问by Peter Stuart

I am studying in a database development course at the moment and I am having trouble getting my head this!

我目前正在学习数据库开发课程,但我无法理解这个问题!

My course notes describe a tuple as: A tuple is a row of a relation

我的课程笔记将元组描述为:元组是关系的一行

From what I have understood since working with MySQL you search for row(s). Or when browsing through a database you are looking through rows in a table.

根据我自从使用 MySQL 以来的理解,您可以搜索行。或者在浏览数据库时,您正在浏览表中的行。

And from what I understood a record is information within a row.

据我所知,记录是一行中的信息。

Is there any distinct differences between the three?

三者之间有什么明显的区别吗?

I know someone has posted something similar but I couldn't really understand his answer.

我知道有人发布了类似的内容,但我无法真正理解他的回答。

Thanks for all help in advnce!

感谢所有的帮助!

Peter

彼得

采纳答案by sampson-chen

In your context they are different words to mean exactly the same thing.

在您的上下文中,它们是不同的词,表示完全相同的事物。

A tuple, in general, means an ordered list with possibly repeated elements (as contrasted to a set, which has all unique elements and is not ordered)

元组通常表示包含可能重复元素的有序列表(与集合相反,集合具有所有唯一元素且未排序)

回答by Vikram

They mean exactly same thing: tuple, rows or records.

它们的意思完全相同:元组、行或记录。

Your SELECT query will generate results that may contain 0 or more rows/records or tuples. A SELECT query can span 1 or more tables

您的 SELECT 查询将生成可能包含 0 个或多个行/记录或元组的结果。SELECT 查询可以跨越 1 个或多个表

回答by Dennis

They are the same.

他们是一样的。

A row—also called a record or tuple—represents a single, implicitly structured data item in a table.

一行(也称为记录或元组)表示表中的单个隐式结构化数据项。