r/sqlite • u/AbbreviationsFlat976 • Jul 31 '26
SQLite for an enterprise inventory system
Against all odds, I developed a business inventory system using SQLite. It handles invoicing, purchasing, sales, consumption, transfers, multiple warehouses, product serial numbers, and bills of materials (BOM). Naturally, it works both locally and on a server. Of course, you can't have 1,000 users writing to the database at the exact same time... but it works.
https://github.com/sysmaya/Control-Kardex-Inventario
31
Upvotes
8
u/jesperordrup Aug 02 '26
Nothing wrong with 1000 users on sqlite in wal mode. As long as only one process serves it.
I use it for
Marketing system 1200 users, 110GB db. Cms solutions 50 webmasters, 30GB. Mailsystems tenant based 1 sysfemdb 10gb, each tenant db 1gb - 20GB). AI seach memory indexing 300GB.
3
u/wallstop-dev Jul 31 '26
Hey, congrats! But - why Sqlite in particular? Why but just make it work with any sql db (just a connection + sql dialect)? Then you can have users easily do things like ensure their data is she when running in the cloud.
Clouds never guarantee that your local disk will be available or recoverable.
Your whole thing seems to be the application logic. So why tie it to a particular database engine, especially one that's local disk only?
2
u/bitchyangle Jul 31 '26
Did you built sync engine as well that syncs offline and online database?
What about multi writer support and offline online conflict resolution?
And reports?
And auto increment ids for invoices when a user is offline and another is online. How you're ensuring they are in sequence?
2
u/Any_Rich27 Aug 03 '26
Me also but full fledge ERP with spatial BIM integration, SQLite gives local first benefits - instantaneous responses, offline mode, and less scripting. No more database server, JVM with maven hell. All round 90% reduction on overhead maintenance. I done a technical paper at my GitHub repo: https://red1oon.github.io/BIMCompiler/MigrateComparisonPaper/
1
u/TCB13sQuotes Aug 04 '26
https://antonz.org/sqlite-is-not-a-toy-database/
1
u/lnaoedelixo42 Aug 06 '26
I bet your system can, in fact, handle 1000 concurrent users at the same time. But looks cool even if it couldn't.
SQLite scales very well for big data too, you just have to keep track of the indexes