Sync two active databases
I am in the process of building a small office application to keep track of stock , customers and so fourth.
Coming from a web development background(PHP + MYSQL) i am used to dealing with one centralized database , I plan to have one dedicated PC which will serve as my database server and have 3 - 5 client computers interact with this one database.
The problem is how do i make a portable version of the database for my laptop - so even if i am not in the office , i can sync with the main database server in the mornings allowing me to replicate a full copy of the database server to a local database on my laptop and sync again the database from my laptop to the main database the next day when i am back at the office.
Both databases will be updated frequently between syncs - how do i ensure that after each sync , the data in the main database server is updated correctly ? , is this possible or should i rather develop an online solution ?
I am using PostGresSQL.