What is the difference between a file-based database and a server-based database?

database, sql

Solution

what is the difference between a file-based database and a server-based database

First of all databases are stored in files! So a simplified answer would be there is no difference.

But when we refer to file-based databases we mean databases that we interact with/update directly (via an SQL abstraction offered by the JDBC driver) but in essence we just read/write to a file directly. Example would be `SQLite`

When we talk about server based databases we mean that there is a server process running (bind to some port), that accepts requests (i.e. SQL queries). Your process connects to the server and sends queries to the server which itself is responsible to update the database files. Example is `MS-SQL Server`.

The server based database could be anywhere (could be accessed via network) while the file-based database must be in a file in the local file-system.

Which one to choose depends on your needs.

Problem

I know SQL, and I know the basic structure of a database, but what I don't know is how exactly does a file-based database work as opposed to a server-based one.

Original source