database in MS SQL

How to create the simplest database in MS SQL

The database is currently needed for a variety of niches, and now you can create the simplest option. And on an example, you can consider a cinema, where the base performs a number of tasks at once:

  1. Analysis of the subject area in order to determine not only the composition of information, but also its content, everything that the system processes. At the same time, the needs of the user are also taken into account.
  2. Development of a conceptual model of the subject area, where the data will be displayed in the form of an ER diagram.
  3. Physical design with further implementation using MS SQL.

What do you need to know when analyzing a subject area?

Most often, any cinema includes several halls of various configurations, while any client has the opportunity to choose the right ticket. And he immediately sees the current state of the hall. When selected, he reports information to the cashier, who indicates in the system that these seats are now purchased. And this is how everything works most often, but there are other points to consider:

  1. Someone enters the cinema schedule and assortment. For example, this is a manager.
  2. Both the visitor and the cashier should be able to view the schedule. And for example, from a certain place, from the current moment. And here there are variations, both in terms of time shown, and in separate halls or showing a certain film.

Based on this, the main functionality should be clear:

  1. Filters.
  2. Scheduling.
  3. View the schedule.
  4. Sale of tickets.

In this case, there is no need to create something new. But the data required to execute this use case is required. And in this case, you will need to describe the entities, otherwise it will not be clear what the manager needs to enter.

Model creation

It is important that the system also reflects the role of each user, and here you need to take into account the work of the administrator, who can create tables or add halls, rows, cashiers or managers.

The role of the visitor in this case is not needed. Of course, each manager can have his own role and his own capabilities. For example, one adds a large number of movies, while the other has some limitations in this regard.

Physical design

This stage includes several processes at once:

  1. Formation and normalization of relational relations.
  2. Installation of MS SQL Server with subsequent development of an empty database.
  3. Creation of tables.
  4. Filling the base.
  5. Designing the most demanded requests.

Of course, each of these stages has its own nuances and technical difficulties that should be dealt with at the initial stage.

Popular articles