1

I am creating a Java application, in which I want to create a class that will relate to a row in database.

I decided to use Entity while naming the class with a prefix/suffix. But, This page says:

An entity is a lightweight persistence domain object. Typically, an entity represents a table in a relational database, and each entity instance corresponds to a row in that table.

I am too conscious & put much time while naming classes, packages etc.

So, what are the other terms, a row in a database can be referred with?

Akshat
  • 113
  • 5
  • 2
    A row is a row. There is no other name for it. Some people use the term "record", but as Joe Celko put it: "Rows are not records; fields are not columns; tables are not files" –  Apr 17 '15 at 06:24
  • 2
    I think, his statement states that "In DBMS terminology a row should not be called a record". But, when a row has been retrieved & transformed into a bean instance that you app holds, it can be referred as a record. That's what I understand from this answer. Am I right? – Akshat Apr 17 '15 at 08:39
  • Yes, that's true –  Apr 17 '15 at 09:25

1 Answers1

2

It's right to use Entity name for prefix/suffix to represent a table schema as your class Entity is a mapping to table schema not the data of the table.

And in terms of data mapping a single instance of the Entity will always represent the row as the row will have all those columns which are attributes in entity and a List of the Entity will represent a table.

vijayp
  • 2,766
  • 1
  • 16
  • 20