The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →OptiQ’s database plan looked simple: keep a SQLite file beside the app and let the edge function use it. That assumption nearly shipped a broken sales-tracking app. Harry Agustiana’s fix was to connect the function to a managed database over HTTP, and to make a prescription relationship optional in the schema where the business rules allowed it.
Why did the database work locally but become risky after deployment?
A local SQLite file can persist on a traditional server with a durable disk. An edge function is different: requests may run in isolated instances, and a later request is not guaranteed to reach the same one. A database file written in one instance is therefore not automatically durable or shared with the next.
As an Amazon Associate I earn from qualifying purchases.
In his account of building OptiQ, a sales-tracking app for small optical shops, Harry Agustiana describes the risk plainly: “A .db file written on one request could be gone — or inconsistent — by the next.” That is his explanation of the deployment problem he encountered, not an independently reproduced incident. Read Agustiana’s account.
The issue is not that SQLite is inherently unsuitable. It is that a file inside an application or temporary execution environment is not a reliable shared database unless the platform explicitly provides durable, coordinated storage for it. The app needed a storage system that could serve requests regardless of which edge instance handled them.
#1 Best Overall
What did OptiQ need its database to represent?
The app tracked several kinds of shop sales: frames, lenses, complete pairs, soft contact lenses, and accessories. Refraction data could belong to a customer and sometimes relate to a sale, but not every sale involved a prescription.
That domain detail mattered both to the storage choice and to the schema. The data was relational, and the app needed joins, constraints, and aggregate queries. A key-value store could hold records, but the author anticipated having to build indexes and aggregate results in application code for the app’s access patterns.
Rank #2
How did the storage options compare for this app?
Agustiana considered three approaches. The comparison below reflects his evaluation in the article; it is not a current feature, pricing, or performance comparison of the services.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Option | What the author considered | Trade-off for OptiQ |
|---|---|---|
| EdgeOne native KV | A fast, simple key-value option | The app’s relational queries and aggregates would require more indexing and application-side logic. |
| Supabase | Managed Postgres with a free tier | The author says he read that free projects paused after about seven days of inactivity and required manual restoration. That was his plan evaluation at the time, not a verified statement of current terms. |
| Turso | Managed SQLite/libSQL accessed over HTTP | The author reports choosing it because remote access fit the edge-function environment while retaining the relational features he wanted. |
The practical decision was to match the persistence model and query needs to the execution environment. In this case, a remote database connection fit better than relying on a local file; the need for relational operations made a database with SQL capabilities a better fit than a simple key-value structure, in the author’s judgment. Agustiana’s article describes the selection and its rationale.
What fixed the optional prescription relationship?
OptiQ’s transactions used a nullable refraction_id foreign key. A sale of lens-cleaning solution, for example, could exist without a prescription record. The schema could represent that directly, rather than inserting a fake prescription or splitting sales into separate transaction tables.
The general modeling lesson is narrow but useful: when a relationship is genuinely optional in the real domain, make it optional in the data model. A nullable foreign key still needs appropriate integrity rules, input validation, and query handling; it is not a substitute for deciding what records the application should permit.
Rank #4
How can you tell a persistence problem from a deployment problem?
Not every failure after deployment points to the database. EdgeOne Makers documentation distinguishes Preview and Production environments, each associated with its own branch, domain, and environment variables. The build guide also says that changing environment variables does not alter earlier deployments; the change applies to new deployments. If a database URL or credential was corrected but the existing deployment still behaves the same way, confirm that a new deployment has been created. EdgeOne Makers documentation.
Deployment status and build logs help isolate failures that occur before the function reaches the database. Tencent’s deployment documentation describes deployment states, targets, and build-log retrieval; a successful deployment can return a Preview URL. Deployment documentation.
Best Value
- Used Book in Good Condition
- Suspect the persistence design if writes appear to succeed but are missing or inconsistent across later requests or instances.
- Check environment configuration if the function cannot connect, credentials differ between Preview and Production, or a fix has not reached a newly created deployment.
- Check the build and output configuration if deployment fails before the app or function can run.
Tencent’s troubleshooting guide lists a 5 GiB account storage capacity limit and a 20,000-file per-project limit; the page does not state a publication year. These are separate platform limits, not an explanation for the local-database persistence risk. The guide also recommends checking the configured output directory and running a local build to locate the generated artifacts when that directory is missing, empty, or invalid. Troubleshooting guide.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What should you take from Agustiana’s fix?
- Do not treat a file bundled with an edge-function app as durable, shared database storage unless the platform specifically guarantees that behavior.
- Choose storage around both the runtime and the app’s data access patterns: relations, constraints, joins, and aggregates may make a relational database more suitable than key-value storage.
- Represent optional relationships as optional when the underlying business rules permit it, and enforce the rest of the integrity rules deliberately.
- Debug the persistence model separately from environment variables, build output, and deployment status.
EdgeOne Makers is described by Tencent Cloud as a frontend development and deployment platform built on EdgeOne infrastructure, with Preview available to validate changes separately from Production. That separation can help verify a new configuration without confusing a deployment check with a database architecture decision. Tencent Cloud platform overview.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →




