TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do you use SQLite?

12 pointsby jlelseover 4 years ago
I was wondering about special use cases for SQLite. How do you use it?

5 comments

geraldbauerover 4 years ago
I use SQLite for sharing structured open data - it&#x27;s a better alternative to zipped csv datasets, for example. See the football.db [1] as some example SQLite datasets e.g. the English Premier League in england.db and so on. [1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;openfootball&#x2F;england&#x2F;releases" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;openfootball&#x2F;england&#x2F;releases</a><p>PS: The big elephant for SQLite data packages is Simon Willison&#x27;s Datasette [2]. [2]: <a href="https:&#x2F;&#x2F;datasette.io" rel="nofollow">https:&#x2F;&#x2F;datasette.io</a>
godotover 4 years ago
I have a hobby project where I have two different kinds of IDs and I have to maintain lookups of one type of ID to another and vice versa. It&#x27;s a web socket server with no need for a persistent data store.<p>Rather than maintaining two separate hash maps and keeping them both updated, it was easier to simply have a sqlite instance in memory and do inserts&#x2F;updates&#x2F;selects in sql.
jolmgover 4 years ago
I mostly use it for convenient ad-hoc processing of CSVs with SQL using this tool I wrote:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jolmg&#x2F;cq" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jolmg&#x2F;cq</a>
zzo38computerover 4 years ago
I have used it to deal with the SQLite databases that some programs use, as well as for data queries in general where SQL is helpful (in addition to SQLite databases, the command-line tool can also load CSV and JSON, so it is very helpful for a lot of kind of data), and also I have used in the following programs I write:<p>- bystand (NNTP client) - Saves the article and configuration database; also for user customization (including the header displays)<p>- sqlnetnews (NNTP server) - Saves the article database, including list of newsgroups, and overview data<p>- Free Hero Mesh (a puzzle game engine) - Batch operations , user customization, user cache, and storing user data such as move lists (although solutions can be exported to another file); not used for the game rules (which uses a custom programming language)<p>- frezed (ZZT external editor) - Batch operations, queries, user customization, and more; almost half of this program is written in SQL<p>- TeXnicard (a similar purpose to Magic Set Editor and similar programs) - Store the card database, make queries and batch operations, PCRE callouts (mainly because, as far as I know, the PostScript interpreter may not be reentrant), custom random pack&#x2F;deck definitions (defined as views), and can call SQL codes from PostScript codes<p>In all of these programs the user can also enter their own SQL codes (Fossil, below, also supports this), except sqlnetnews (which is server software, so the user input is not considered trusted in this case).<p>I also use Fossil, which also uses SQLite.<p>I would also like to have virtual table interfaces for some remote data (some sort of standardized protocol(s) with open source implementations), especially that which changes often, or that incremental updates will be useful; then SQLite can be used for that, too. For other data, SQLite databases that you can just download and query on your own computer, would be a good things to have, too.<p>So, SQLite is very good, for many more things than I had just listed, too. A few other things which use SQLite are listed at: <a href="http:&#x2F;&#x2F;fileformats.archiveteam.org&#x2F;wiki&#x2F;Category:SQLite_based_file_formats" rel="nofollow">http:&#x2F;&#x2F;fileformats.archiveteam.org&#x2F;wiki&#x2F;Category:SQLite_base...</a>
jlelseover 4 years ago
To add my own example: I use SQLite for the backend of my blog. (<a href="https:&#x2F;&#x2F;jlelse.blog&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jlelse.blog&#x2F;</a>)
评论 #25232985 未加载