A database relationship is a situation in which one entity refers to the primary key of the second entity. The relationships are determined during the database design process. To determine these relations it is necessary to analyze the essence and identify the logical connections that exist between them. The type of relationship determines the number of entity records associated with a record of another entity.
The names of the relationship and the attributes of this relationship are called the schema of the relationship. is represented as the name of the relationship, followed by a list of attributes enclosed in parentheses, for example: movies (name, year, duration, genre)( (Vyawahare et al., 2018). A database project executed within the framework of a relational model includes one or more relationship schemes (Vyawahare et al., 2018). A set of relationship schemas is called a relational database schema; relationships are divided into three main types (Vyawahare et al., 2018). The first type is one-to-one relationship where each record of the first entity corresponds to only one record from the second entity and vise versa. For example, there are two entities: people and birth certificates, and one person can have only one birth certificate.
In the relation of the kind one-to-many, each record of the first entity can correspond to several records from the second entity. However, each record of the second entity corresponds to only one record from the first entity. For example, there are two entities: an order and an order item. While there may be many products in the order, every product from it refers to only one order. In many-to-many relationship, each record of the first entity can correspond to several records from the second entity and vise versa. For example, there are two entities: the author and the book. One author can write many books but a book can have multiple authors.
Database design is a set of processes that facilitate the design, development, implementation and maintenance of database management systems (DBMS). Properly designed databases help improve data consistency for disk storage. The tools used for designing database diagrams include such programs as Create Database Diagram Wizard, Dbdiagram.io, SqlDBM, Dbdesigner.net and some others (Vyawahare et al., 2018). Creating a database is related to describing the structure of future tables. The user must specify the names of all fields in the table, their types and formats.
Creating a new database begins with a description of the table structure. The user is asked to fill in a table of the table type where it is necessary to specify the primary key of the table (Goelman & Dietrich, 2018). This stage of work is similar to building a vegetable base. Compartments, refrigerators, containers, storage boxes for potatoes, carrots, onions, and cabbage, are put in it. In other words, a storage place is being prepared, but vegetables are not being imported yet. After the vegetable base is created, it is ready to receive vegetables. As a result of creating a database, a file with the specified name appears, the structure of the data that will be stored in it is determined (Goelman & Dietrich, 2018). But the database is empty, there is no information in it yet. After this, one should fill the database with data, which would equal to bringing vegetables in the above example. The input can occur through a form that takes into account the structure of the table entries (Goelman & Dietrich, 2018). Adding entries or input is repeated until the last entry is entered. After saving the file, the creation of the database is completed, and now it can be accessed with queries.
References
Vyawahare, H. R., Karde, P. P., & Thakare, V. M. (2018). A hybrid database approach using graph and relational database. In 2018 International Conference on Research in Intelligent and Computing in Engineering (RICE) (pp. 1-4).
Goelman, D., & Dietrich, S. W. (2018). A Visual introduction to conceptual database design for all. In Proceedings of the 49th ACM Technical Symposium on Computer Science Education (pp. 320-325).