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?
Best Answer
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.