Entities

Building Vue Enterprise Application: Part 1. Entities | by Greg Solo | Level Up Coding

• Anything that can de identified by a fixed
number of its characteristics (attributes)
– Attributes have names and values
– The values are the data that’s stored in the table
• An entity defines a table
– Name of the entity is the name of the table
– Each attribute is assigned a column with column
heading being the attribute name.
• Entity instances – Rows of data • Table instance – Any table containing specific rows • Attributes have a data type – Defines the form of the information that can be stored in a field • Number, text, image, …

Tables of Entities 

• A relational database describes the
relationships among different kinds of data
– Captures ideas like those defined in the Affinity
and Collection rules
– Allows software to answer queries about them
• Any relational DB can be described in XML
– But it is not the case that every XML description
defines a relational DB.

Properties of Entities

• A relational database table can be
empty (NULL instance)
• Instances Are Unordered
– Order of the rows and columns does not
matter in databases
– Freedom to move the data is limited to
exchanging entire rows or exchanging
entire columns.
• Uniqueness
– No two rows can be the same
– Two rows can have the same value for
some attributes, just not all attributes.
• Keys
– Any set of attributes for which all attribute values
are different is called a candidate key
– Pick one and call it the primary key to decide
uniqueness
– Key must distinguish all potential and actual
entities, not just those that happen to be in the
table at a given time
– If no combination of attributes qualify as a
candidate key, assign a unique ID to each entity
• Like a student ID number issued by school.
• Atomic Data
– Values stored for attributes
– Not decomposable into any smaller parts
• Separate fields for street, city, state, postal
code
– “Only atomic data” rule relaxed for certain
types of data
• Dates, times, currency.