You get a bonus - 1 coin for daily activity. Now you have 1 coin

Representation. Tables and graphs

Lecture



Tabular way of presenting information

Example: Let the attribute “Employee number” be defined on the domain of three-digit integers, then it can be presented in the form of a table:


Employee number

100

105

...

523

The value of this attribute is set, and therefore the order of the elements is not important and duplicates are not allowed.
The title of the table is the name of the attribute.
The value of the table is called its extension.
Consider another case: attribute - salary.

Here the order of the records and the presence of duplicates can be significant. In this case, the attribute is represented by an extended set, which can be represented as a special table:

Salary

100

200

150

80

100

Salary

100

one

200

2

150

3

80

four

100

five

Numbers (1) - (5) indicate the order (position of values ​​in the complex). This table defines the second type of presentation.
An entity type as an attribute aggregate can be represented as a table:


Employee number

Surname

Salary

100

Ivanov

100

105

Petrov

200

...

...

...

Representation.  Tables and graphs

  1. If duplicate rows are not allowed, and the order in the table does not matter, then such a table is called a DB relation. In addition, each row in a table that is an implementation of an entity type is called a tuple . The table as a whole is called the entity set implementation. Such a table is also called relational.
  2. If duplicate records are valid, and the order of the table matters, that is, the table is an extended set, it is called the record type. In this case, the columns of the table are data elements, and the rows are the implementation, and the entire table is an ordered set of records.

Relational tables are designed to apply the mathematical apparatus of the theory of relations, that is, operations on sets.
Tables of records are intended, first of all, to store time - version support tables.

Representation of communication types

Relationship types can be represented as a separate table. The intensional (definition) of this table consists of intensions of the entities involved in the communication. Extension type of communication - tuples of the implementation of the entities involved in the relationship.
Connection type is a relationship, not a record type.
Example: consider the link "works":
Works (employee, company)
Both the employee and the company are sets, therefore the communication implementation works , there is an employee and company subset of the Cartesian product of sets.


No

Surname

Address

Floor

Company name

Dislocation

123

Ivanov

Sumy

M

Wescom

Kharkov

705

Petrova

Sverdlov

F

Wescom

Kharkov

324

Smith

New York

F

Ibm

New York

Link type is a relationship, not a record type. Duplicates are not permitted.

Representation using graphs

Representation of the type of entity.
Vertices are attribute types, and arcs are aggregates of attribute type pairs.
More than one aggregate can be built on one pair of attributes. Dougie can be called.
Representation.  Tables and graphs

Moving along arcs we get an aggregate that forms an entity.
With the help of the graph can be represented and implementation.
The vertices of the graph can be both sets and extended sets.
With the help of graphs can be represented and types of relationships .
Vertices are an entity type.
Dougie is a type of connection.


Representation.  Tables and graphsRepresentation.  Tables and graphs

The arc works like other arcs, but its semantics is different.

created: 2014-12-18
updated: 2021-11-17
132507



Rating 9 of 10. count vote: 2
Are you satisfied?:



Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Data models

Terms: Data models