How to maintain sqlite on the server

Asked 2 years ago, Updated 2 years ago, 77 views

What is the most common method of maintaining (registering/deleting data) the sqlite database (file) on the server from a local location in an application that uses sqlite?

·Do you want to be able to view files locally on SMB?
·Download, maintain and upload locally?

sqlite

2022-09-30 14:42

1 Answers

I don't think it's a very recommended method because it can slow down the processing speed of the file, such as SMB, or corrupt the file if there is a bug in the network file system and input from multiple locations in the same database at the same time.

See alsoSQLite Documentation Approduce Uses For SQLite Page

If there are many client programs sending SQL to the same database over a network, then use a client/server database engine instead of SQLite. SQLite will work over a network filesystem, but because of the latency associated with most network filesystems, performance will not be great. Also, file locking logic is buggy in many network filesystem implementations (on both Unix and Windows). If file locking does not work correctly, two more clients right try to modify the same part of the same database at the same time, resulting in correction. Because this problem results from bugs in the underlying files implementation, there is not a SQLite can do to present.

A good rule of thumb is to use SQLite sites where the same database will be accessed directly (without an interviewing application server) and simulatively from many computers over a network.

The only problem with downloading, maintaining and uploading locally is that it is difficult to handle any input on the server during maintenance.

I think it would be better to log in to the server with SSH and use the SQLite command line tool for maintenance, but I also think that the simplicity that SQLite benefits is lost.Using SQLite means it's not a very large system, so I think it's okay to do it by "downloading, maintaining and uploading locally."


2022-09-30 14:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.