Proper Database Structures for You Now

After the database structure is determined, it is required to formalize the datalogical model in the language of a particular DBMS, in other words, to describe the tables. Most modern DBMSs provide convenient visual constructors for this purpose (for example, we mentioned Microsoft Access table designer above). The description (design) of each table includes:

Definition of a table name

If the table is a representation of some entity, then the name usually corresponds to the name of the entity. The names of the relationship tables, as a rule, are formed from the names of the related entities. For the 먹튀검증  this is important now. This is the reason for you now.

Definition of field names and types

  • At the same stage, it is usually required to establish the specific properties of specific fields can the field contain “empty” (undefined) values, what should be the default value, etc.
  • Definition of a primary key. Despite the fact that the relational model requires a primary key in each table, most DBMSs do not need to define a key in the table. This, of course, should be avoided. To the credit of the DBMS, they almost always try to “guide the developer on the right path” (see, for example, the figure).

Definition (if necessary) of indexed fields

After designing the tables, you need to establish the relationship between them. Microsoft Access has a special tool for this “Data Schema”. In the diagram it is very convenient to “draw” the relations between the tables by dragging and overlapping related fields. In most cases, Access is able to determine the type of communication being established. For example, if the primary key of one table is associated with a field of another that is not a primary key, then it is easy to understand – and Access understands that this is a one-to-many relationship.

  • Other DBMSs have similar visual design features and functions.

Data Description Language

Whatever visual interface a particular DBMS provides to developers, in the vast majority of cases behind the scenes is the common SQL language for all relational DBMSs ( Structured Query Language ). (Generally speaking, this can be guessed from general considerations. The articles in this section have repeatedly mentioned the possibility of migrating databases from system to system. It is clear that this feature can be provided only if there is some general system-independent kernel, which is SQL.)

 

SQL is often spoken of as a data processing language (query language), this is described in the corresponding article. However, it is important not to forget that SQL is a language for describing and processing data. In particular, it is in SQL that a set of compatible data types is defined, denoted by the corresponding keywords.

 

No Comments