Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database - (rows or records, columns or fields)?

In database terminology:

What is the difference between a row and a record?

Likewise, aren't columns and fields the same thing?

On the blog Joe Celko The SQL Apprentice , I noticed that the banner mentions that they are different things.

like image 727
toop Avatar asked Feb 04 '12 11:02

toop


People also ask

What are rows and columns in a database?

A row is a horizontal alignment of data, while a column is vertical. Data in a row contains information that describes a single entity, while data in a column describes a field of information all entities possess. Objects placed in a row typically face forward, while objects in a column are aligned head to tail.

What is row or record in database?

In relational databases, a row is a data record within a table. Each row, which represents a complete record of specific item data, holds different data within the same structure. A row is occasionally referred to as a tuple.

Are fields columns or rows?

Tables contain rows and columns, where the rows are known as records and the columns are known as fields. A column is a set of data values of a particular type (like numbers or alphabets), one value for each row of the database, for example, Age, Student_ID, or Student_Name.

What Is column or field in database?

A column is a collection of cells alligned vertically in a table. A field is an element in which one piece of information is stored, such as the received field. Usually a column in a table contains the values of a single field. However, you can show several fields in a column by using a Formula or a Combination field.


1 Answers

Row and record can arguably be considered as the same thing.

Fields and columns are different, a field is the intersection of a row and a column.
i.e. if your table has 10 rows and 10 columns, it has 100 fields.

When you create a table using DDL statements, you define columns (metadata). When you add rows using DML statements, you define rows and their fields.

like image 142
vc 74 Avatar answered Sep 17 '22 17:09

vc 74