Is an application possible on different computers running CRUD simultaneously?

0

I am creating an application in C # using the VisualStudio 2015 enterprise next to SQL Server 2016 to save the data, but I am almost finishing the project and still do not know if it will really work! p>

I need to install this application on different computers from the same workstation (same network), where everyone used the application at the same time and performed CRUD operations on it simultaneously between computers.

My question is the following, Is there a possibility to make this happen? some other language that is more indicated as Java or another database like MySQL, I do not have problems with the development but I do not think anything related to how to make this connection between the applications in different computers with 1 single database! >     

asked by anonymous 10.11.2016 / 17:44

2 answers

5

Your scenario is one of the most common in software development (mostly commercial and business). Basically, it is made up of an SGDB (Database Management System) and machines that will access this bank through software (developed by you).

There is absolutely no problem with multiple machines accessing the database simultaneously. Note that databases are mostly designed to accept many concurrent connections.

For this reason, the bank needs to provide mechanisms to deal with the inevitable competition. The most important mechanism within this context is Transaction.

The four pillars of a transaction are Atomicity, Consistency, Isolation, and Durability ( ACID ). Isolation is what ensures that a transaction can not change one data while another is changing the same data. The bank uses locking mechanisms to ensure this.

Obviously, it is the role of the programmer to establish when a transaction begins and ends. Therefore, although the database has several features to ensure data consistency, if the programmer does not know how to use them, then certainly have headache.

    
11.11.2016 / 17:40
3

If you need to use CRUD on multiple devices, you can do this by using a bank or a (.txt for example) file. But if you really need to access the same data from multiple devices simultaneously search for RUN CONDITION.

It's a common problem and many frameworks already anticipates this problem. Also search for traffic lights and mutex (mutual exclusion).

    
10.11.2016 / 18:07