Database features
1. Entities are classes of essential stuff which must be kept (recorded) since the
businesses rely on them. Basically, an entity is a fact that should be memorized
(usually a noun). An entity instance is an item of that class. For example, “IT
Technician” is an instance of “JOB” class. An instance will probably represent a row in
the table.
There are three types of entities:
Prime – this type of entity exists individually (CUSTOMER)
Characteristic – a characteristic entity is based on another prime entity (ORDER)
Intersection – this type of entity solves many to many relationships (ORDER ITEM)
2. Attributes are characteristics of the entities which describe certain information
that should be known. For example, phone number, address, age etc. An attribute
can be mandatory (represented by *) or optional (represented by lowercase o).
An attribute can also be:
Volatile – it means that the value might change in time such as ages
Nonvolatile – the value is stable and shouldn’t be changed e.g. date of birth
3. Primary key - in a relational table, the primary key should be unique because it
will help to identify specific rows in that table. If you have a table which contains a
record of each employer in your company, you might want to set a unique
identification number for every one of them – that will be the primary key in your
database.
4. Foreign key - it is formed by one or more columns and it’s used to create a link
between data in two tables. In other words, it associates one table with the primary
key of another table. At the end of this document, you can see the foreign key
represented by the “#ID” characters in the second table – where the entity is called
“JOB”.
1. Entities are classes of essential stuff which must be kept (recorded) since the
businesses rely on them. Basically, an entity is a fact that should be memorized
(usually a noun). An entity instance is an item of that class. For example, “IT
Technician” is an instance of “JOB” class. An instance will probably represent a row in
the table.
There are three types of entities:
Prime – this type of entity exists individually (CUSTOMER)
Characteristic – a characteristic entity is based on another prime entity (ORDER)
Intersection – this type of entity solves many to many relationships (ORDER ITEM)
2. Attributes are characteristics of the entities which describe certain information
that should be known. For example, phone number, address, age etc. An attribute
can be mandatory (represented by *) or optional (represented by lowercase o).
An attribute can also be:
Volatile – it means that the value might change in time such as ages
Nonvolatile – the value is stable and shouldn’t be changed e.g. date of birth
3. Primary key - in a relational table, the primary key should be unique because it
will help to identify specific rows in that table. If you have a table which contains a
record of each employer in your company, you might want to set a unique
identification number for every one of them – that will be the primary key in your
database.
4. Foreign key - it is formed by one or more columns and it’s used to create a link
between data in two tables. In other words, it associates one table with the primary
key of another table. At the end of this document, you can see the foreign key
represented by the “#ID” characters in the second table – where the entity is called
“JOB”.