Skip to content

Tag: SQLite

Tip: SQLite in RAM … to improve speed!

It’s very usual to use encrypted SQLite databases in our Xojo projects where we expect to get the maximum read speed from them. But the truth is that encrypting the data in these databases can introduce a penalty in our queries, both from read and writing/updating data to them. How can we improve this? One technique is the creation of a new in-memory based SQLite database, where we will be able to copy the table (or tables) we are interested in getting the maximum speed possible with. Continue reading to see how to do this.

Comments closed

#JustCode Challenge Week 9 – Quote Web Service

We’re wrapping up week 9 of #JustCode with a web app that demonstrates a web service, JSON and SQLite. The web app functions as both an app with a UI and a web service. It lets you enter your own quotes which are saved in a SQLite database. The web service randomly fetches a quote and returns it as JSON.

Comments closed

Appreciating SQL

Noted recently at the SQLizer blog, the SQL language was first created 43 years ago. And what is remarkable about that is that SQL is still used today. According to the Stack Overflow 2017 developer survey it is the #2 programming language. Not many languages remain in use for such a long period of time. Although we’re happy to also note that Xojo celebrated our 20th anniversary in 2016!

Comments closed

Database Usage with Web Apps

Using databases with web apps is not much different than using them with desktop apps, but there are a few things to keep in mind. The most important thing to note is that a web app allows multiple users. This means you’ll want your database connection to be unique for each user that connects to the web app, rather than global to the app itself (as is common in desktop apps). The simplest way to ensure this is to create the connection to your database in the WebSession.Open event handler, saving a reference to the connection as a property that you add to WebSession.

6 Comments