Click here to Skip to main content
15,904,655 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to use the distributed databases concept. I have 3 different C# windows forms applications, each on a PC. Each app is accompanied by a database respective to it. However, the 3 applications need to share some data which should be available to the others as soon as it is entered on one. How do l connect them such that even if one is off, there is no disruption to availability of data for the others. I am new to the concept of DDBMS

What I have tried:

I have tried to follow steps from some articles but l cannot get through. I actually need a step by step guide of instructions that l can practically implement.
Posted
Updated 8-May-22 23:51pm
v2
Comments
Maciej Los 5-Apr-22 14:33pm    
Not enough details!
1) Does all databases are placed on single PC?
2) What DBMS?
3) Does all databases are available in LAN/WAN?
Dave Kreskowiak 5-Apr-22 18:14pm    
Without knowing anything about the database engine in use or the databases themselves, it's impossible to answer your question.
PIEBALDconsult 5-Apr-22 20:30pm    
Any way you like.
Richard Deeming 6-Apr-22 3:50am    
You need to use a server DBMS like SQL Server / Oracle / MariaDB / etc.

You will need a central server which all three PCs access. And that server needs to be on and running for your applications to access the database.

1 solution

This is a classic client/server issue.
You have several application instances which use the same database.

This could be basically done with nearly all types of database.
If the chosen database (or DBMS) is a good choice depends on how intensive the database is used and how often data changes.

The safest choice is to a DBMS like SQL Server, MySQL or others (shoudl run on a 24/7 server).
The unsafe way is to use a desktop database like MS Access (or maybe SqLite, client access the database file via SMB share). I you can live with the fact that user could overwrite data and you have very little data writes that works (e.g. 5 Users work edit only their on records).

Under bad circumstances the database file could be corrupted. To minimize that risk you could set a flag on the record if a user opens the record for edit (IsLocked=true) and remove the flag if the record is saved (IsLocked=false). Beware not to run into a deadlock.

For futher information search for client-server-database or microsoft access client server application)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900