Entities, Relationships and Attributes of Relational Database
In order to define the relational database concept it is important to understand the underpinning features of relational databases. There are three core features of relational databases that underpin their design and operation. These are Entities, Relationships and Attributes.These features all relate to the concept that any information can be based on things in the real world, and these entities can be described by defining their attributes. Some attributes are made common to different entities and it is through these common attributes (called primary keys and foreign keys) that relationships are built that link the entities together into a relational database.
|
Data Type |
Description |
Comment |
|
Text |
Text or combinations of text and numbers |
Up to 255 characters. Microsoft Access only stores the characters entered in a field. You can control the maximum number of characters that can be entered using the FieldSize property. |
|
Number |
Numeric data |
Can be used for calculations but calculations involving money normally use currency type. |
|
Date/Time |
Dates and times |
Uses 8 bytes only. Different formats can be chosen. |
|
Currency |
Currency value |
Use the currency data type to prevent rounding off during calculations. Accurate to 15 digits to the left of the decimal point and 4 digits to the right. |
|
Autonumber |
Unique number incrementing by one each time |
Automatically inserted when a record is added. Uses 4 bytes only. Can also choose random numbering instead of sequential. |
|
Yes/No |
Field to contain only one of two values |
Appropriate for fields storing Yes/No, True/False or On/Off. Only uses 1 bit. |
Entities, Relationships and Attributes
Entity
The entity is any kind of object or set of elements, in a given context given by the information system. The entities are the tables of the database that allow the storage information, being collected under the name or title of the table or entity. For example, the user entity saves the personal data of the users of the library, the cataloged entity registers all the cataloged books, the circulating entity all the loaned and returned books and so on with all the cases.
Attributes
They are the characteristics, features and properties of an entity, which take as a value a particular instance. That is, the attributes of a table are actually its descriptive fields, which allow defining the properties of a particular object. For example of an entity or catalog table, you can determine the attributes title, subtitle, edition, publisher, place of publication, date of publication etc.
Relationships
Link that allows defining a dependency between sets of two or more entities. This is the relationship between the information contained in the records of several tables. For example, users are usually classified according to a list of types of users, be they teachers, students or researchers. In this way it is possible to express the relationship between the user John Williams as a student and Sarah Jones as a teacher. The relationships are defined in a natural way in a relational diagram to express a model that will later give rise to the interrelationships of the entities.
E-R model
The E-R model is to get a graphical view of essential components of Entity and how they are related. It is a conceptual model captures meanings rather than an actual implementation in SQL.

E-R diagram symbols
The E-R Model:
- Entities.
- Relationships among entities.
Symbols used in E-R Diagram
- Entity – rectangle.
- Attribute – oval.
- Relationship – diamond.
- Link – line.

Entities, Relationships and Attributes



Publicar comentario