I was recently introduced to MongoDB and going through the installation guide I came to know that we have to first run the daemon (mongod) and then we have to connect to the daemon through mongo.exe (for windows) to actually run the commands. I have noticed this is a general structure for most of the DBMS where we have to start a server and then connect to it to run the commands.
Why can't we run DBMS in a single program instance as we do with Python or Node.js? Specifically, why we need the server-client architecture for a DBMS?
Yes you can. It is not strictly needed.
What you describe is how SQLite works. Other "embedded" database engines do the same.
The main advantage of a separated server is that multiple clients can connect to it at the same time. Simultaneously writing and reading to shared data files without a central coordination process (a server) becomes more and more complex and unreliable to a point where a separated, dedicated process is easily justified.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With