1. If I look at a database table for editing - is it made up of rows or records?

  2. If I write some sql and then look at the result is this made up of the same elements as the answer to 1.?

  3. Is it the case that they are all rows but in very specific circumstances they are also records?

A recent article by Itzik Ben-Gan prompted my question and I see quite a discussion on dba.stackexchange.

In that article Aaron Bertrand brought up the same Itzik quote from his "Training Kit (Exam 70-461): Querying Microsoft SQL Server 2012"

As an example of incorrect terms in T-SQL, people often use the terms “field” and “record” to refer to what T-SQL calls “column” and “row,” respectively. Fields and records are physical. Fields are what you have in user interfaces in client applications, and records are what you have in files and cursors. Tables are logical, and they have logical rows and columns.

  • 1
    (I don't mind getting down-voted: but when I down-vote a question I generally explain why the the poster as it helps them to edit the question and improve their future questions)
    – whytheq
    Aug 19, 2013 at 12:52
  • 1
    (disclaimer: I did not downvote you) So you found already an exhaustive discussion of that topic on dba.stackexchange - no need to discuss that here again, I don't think it will bring any new insights.
    – Doc Brown
    Aug 19, 2013 at 13:45
  • 1
    "name that thing" questions, especially rather short ones where no related material is shown (I looked at X and Y and Z) tend to do poorly and are uninteresting to people. There is some discussion of this at Is asking “what is the technical term for this” on-topic?
    – user40980
    Aug 19, 2013 at 13:48
  • It's neither. Academic term is a Tuple.
    – CodeART
    Aug 20, 2013 at 12:27
  • 1
    "In relational database theory, a relation is a set of tuples (d1, d2, ..., dj), where each element dn is a member of Dn, a data domain.[1] Each distinct domain used in the definition of a relation is called an attribute, and each attribute is usually named." en.wikipedia.org/wiki/Relation_(database)
    – CodeART
    Aug 20, 2013 at 12:38

3 Answers 3

  1. row=record in relational databases, those are just two terms for the same thing
  2. "SELECT" statements (not all SQL statements) deliver a result set consisting of rows or records, whatever term you prefer.

Next time you intend to ask such a question, have a look into Wikipedia first.

  • Is the answer so cut and dry? Let me add a reference to the SQL-Server specific definitions.
    – whytheq
    Aug 19, 2013 at 12:40
  • 1
    @whytheq: there are sometimes "Microsoft terms" and "rest of the world terms". And of course, some people will make some artificial, subtle differences between "row" and "record" in some specific contexts. But I think communication with most of the database world will be best when you don't insist on differences between row and record, at least, not for the general case.
    – Doc Brown
    Aug 19, 2013 at 13:46
  • @DocBrown is right. One of the first steps to locking someone in to a particular stack is to use subtly nonstandard terminology, to make it harder for people to adjust to the parallels in another one. (Random example. Model-View-Presenter vs Model-View-Controller. Yes, there are subtle differences, they are less than divide other MVC systems from each other.)
    – btilly
    Aug 19, 2013 at 16:44

Record really isn't a a database term with a specific meaning. Which is not to say you can't use it, just that if/when you do, you should keep in mind that it is at best a useful lie but more likely just context sensitive slang.

Ether way, as long as the person you are talking to understands you, it doesn't matter.

  • +1 agree with your first comment but it seems like most programming communication involves being precise with language so I find it strange that for such an important object people are suddenly very forgiving. If I said "that dynamic language named after the English seventies comedy" you might understand that I mean Python, but why should I not just say "Python" (...not the best example I know but hopefully you see what I mean!)
    – whytheq
    Aug 20, 2013 at 6:45
  • I do see what you mean...and it's not such a bad example. Just as with the name of the language, it's normally just a background detail, setting the stage for the real technical portion of a discussion. If you want x rows and are getting x+y, then whether you call the rows rows, records, or sheep (domain object) isn't the point. In fact, about the only time the name makes a difference is when you are returning multiple rowsets, which together make up a record - in which case you should keep the distinction clear.
    – jmoreno
    Aug 20, 2013 at 15:06

This terminology dates back to paper and accounting. Records are also relevant when describing a "fetchable" part of linear media, such as magnetic tapes.

I'd say that a record hints toward the basic fetchable data unit for storage, and a row hints at a part of a report (often generated from records). Conceivably, multiple records can be combined in a single row and vice versa.

The subtle difference may or may not be of consequence to your RDB system, but I wouldn't say that the words are 100% synonymous. It's like getting into a discussion about the difference between up/downloads and streaming.

Not the answer you're looking for? Browse other questions tagged or ask your own question.