SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.

learn more… | top users | synonyms

3
votes
1answer
52 views

A class to create and modify SQLite3 databases with a terminal

I would like feedback on the class I've written. The purpose is to dynamically create and interact with SQLite3 databases, accepting lists of complete or incomplete statements. ...
10
votes
4answers
5k views

Inserting robot moves into an SQLite3 database

I'm just wondering if you would consider this to be safe from SQL injection. A peculiarity of my program is I need to dynamically access table names depending on my scenario. This is not for ...
3
votes
0answers
43 views

SQLite Databse inserting + Unit tests in Java

Genereal Introduction This is my first project which involves a Database which involves testing (especially unit testing) where the quality is really important for me. The long term aim is to ...
1
vote
2answers
97 views

Properly structuring SQLite classes/operations in Android

I am new to Android development and I want to ensure I'm learning decent practices for doing things. Right now this is my database class, which currently allows me to make a new instance of the ...
5
votes
1answer
65 views

Merging trips to the same location with overlapping dates

I have a SQLite database that only contains the holidays for 1 user. I have a new Trip object (newTrip) that has a ...
4
votes
1answer
54 views

Pulling from data from SQLite DB on Android

Apart from merging the 2 get methods, what else can I do to optimise this? Both input and output cannot be changed. Is there a way to iterate a map while writing to it? ...
4
votes
2answers
105 views

Check existence of a row then update a column

not too experienced with SQL, wondering if I can make this better... I am trying to check if a row exists and then add one to the frequency column if it does, if it does not exist it should return ...
3
votes
1answer
79 views

Android SQLite architecture for a task list

I'm writing a simple Android app with a database and am trying to make the right architecture for accessing a database. MainActivity.java ...
6
votes
2answers
196 views

Saving and Loading data with SQLite

I'm in the process of learning SQLite in C# and I've come up with some generic methods for finding and updating data. I would appreciate any pointers with the design of my methods and/or my SQL syntax....
4
votes
0answers
293 views

Unit of Work and repositories in MVVM / Windows 10 app

I’m currently aiming to make my first app for the Universal Windows Platform (UWP) / windows 10. It’s a small app but should follow some best practices patterns (although I’m considering it as a first ...
7
votes
1answer
360 views

Optimizing SQLite SELECT Performance

I need to read Databases which contain 44-50 Tables, with around 5 Million entries in Total (~ 100k entries per Table). The Data consists of Positional Tracking Data in Sports (Players,Refs and the ...
0
votes
0answers
81 views

SQLite Select Performance

I need to read Databases which contain 44-50 Tables, with around 5 Million entries in Total (~ 100k entries per Table). The Data consists of Positional Tracking Data in Sports (Players,Refs and the ...
0
votes
1answer
72 views

Storing results of a game in a sqlite table

This is a section of code in a program I have created to store and review the results of a game based upon the "class_number" the user gives. This section is very bulky and I was wondering how I could ...
7
votes
1answer
280 views

Generic asynchronous SQLite search builder

I am writing a database manager that reads and writes to a local SQLite database on a mobile device. It works pretty well for the most part, but read access is somewhat slow - it takes about 2-5 ...
5
votes
1answer
63 views

SQLite search disregarding spaces and Pinyin tones

I have a column where, pretty much, each entry has numbers (specifically #1-4) and spaces (' '). I wanted to make a query that could avoid having to know these numbers and spaces. ...
1
vote
0answers
40 views

C++ generic SqLite 3 table to vector

I just coded method for loading data from SqLite 3 database, it is working and in test run it was successfully checked for no memory leaks: ...
1
vote
1answer
33 views

Queries using multiple tables and ANDs: should that be avoided?

This is a part of a project I am working on. I need advice and criticism regarding the data base design and general approach to querying the data. I am not at all experienced with relational data ...
0
votes
0answers
56 views

SQLite app for local storage

When I make an app using SQLite for local storage I've settled into a nice routine; create a contract class and a extended BaseColumns class to hold column names ...
1
vote
1answer
162 views

Key Value Store for Android on top of Sqlite3

I wrote this simple key-value interface on top of Sqlite3 to use in my Android app. I am using this to persist Java objects as strings converted using Gson. The public API has 3 methods. get(...
2
votes
1answer
232 views

Basic CRUD application for Product, Category & Location with SQLite

I improved the code from my previous question. At this moment, the 3 entities have not yet a connection with each other. They should only be available for CRUD actions in a SQLite database. I would ...
4
votes
2answers
108 views

ProductManager: a basic CRUD for products with SQLite

I would like to have a review of this basic CRUD application so I can improve and learn from your experience. The code can be found here. Design pattern/coding principles improvement that could be ...
3
votes
2answers
68 views

Advanced CSV-to-SQLite converter

I just wrote an advanced CSV parser that translates CSV to SQL(SQLite Compatible) statements, which are then inserted into the database. It translates variable names in the CSV to values defined in ...
0
votes
1answer
1k views

WPF filling a DataGrid

I'm creating a WPF application with a DataGrid. I'd like some advice on the code I've written: ...
6
votes
2answers
151 views

Terrain height map generator

I wrote a Perl script that implements the algorithm described in this article to generate terrain height maps. The idea is to raise a random hill \$i\$ of size \$r_i\$ centered at point \$(x_i, y_i)\$...
1
vote
1answer
118 views

Inserting data into an SQLite database

I've execute this code in Android for inserting 100+ rows in SQLite database. My current approach takes more time to initialize the database. ...
4
votes
2answers
61 views

SQLite UPDATEs for persons and a subclass

I am using Java with SQLite and I am wondering if I am in the right track onto writing good code i.e. more or less reusable: SQL scheme: ...
5
votes
1answer
807 views

Nested SQLite transactions in jQuery

I'm using Cordova with jQuery and jQuery Mobile to develop a hybrid app. In this app I need to save data that I get from a server. The data is a ...
6
votes
1answer
526 views

Multiple Choice Guessing Game

I've built an app for members of an organization I'm in--the app shows the picture of a member with four multiple choice buttons, and the user then tries to guess the member's name. Pretty simple, ...
4
votes
2answers
84 views

Program to provide CRUD operations for a Boxers(Fighter) table in a database

I have been through a few SQLite tutorials and wrote this code on my own to reinforce the principles. The tutorials I went through varied widely in a few areas so this is what I came up with as a ...
1
vote
1answer
28 views

Writing an SQL SELECT statement

I'd like to Select columns from Table 1 with a Row Filter, Select columns from Table 2 and join. This works but it's a bit verbose. I was wondering if there is a cleaner way to write this. ...
2
votes
1answer
63 views

Searching for log entries in SQLite that involve a particular IP subnet

This reads a huge database (SQLite) and extract any IP address similar to ip_base: ...
3
votes
1answer
151 views

Data cleansing and formatting script

This is a script that creates a base dataframe from a sqlite database, adds data to it (also from SQLite), cleanse it and formats it all to an Excel file. I feel like it is incredibly verbose and my ...
2
votes
0answers
188 views

Structured use of Android SQLite transactions

I got tired of following Android-SQLite's transaction idiom, briefly documented here. It requires too much boilerplate code, IMHO, especially when you add the obligatory null checks. So I came up ...
3
votes
1answer
186 views

Fetching, processing, and storing Mixpanel analytics data to SQLite

I'm a self-taught Python programmer and I never really learned the fundamentals of programming, so I want to see how to improve upon this script and make it adhere to best practices. The script has ...
2
votes
1answer
87 views

Downloading, decompressing and inserting data into an SQLite database

I have implemented a Service, which executes three operations, in the following order: Downloading a compressed (.zip) CSV file Decompress the CSV file Reading the CSV file and inserting the data ...
2
votes
0answers
5k views

Python TKinter data entry window GUI for SQLITE3 table

I would like to offer for review a simple tkinter GUI window in Python 3 to be used for data entry into an SQLite database table. As a noob, this is my first attempt at OOP and my first experience ...
1
vote
1answer
50 views

Empty product model

I don't think I am using MVC concept in Ruby on Rails properly. Model accesses db, controller works on logic and view displays information/data. But in my below code, My Model code is empty. Can ...
0
votes
2answers
85 views

Transferring a CSV file to a database while merging some columns

Say I am given a csv file that I want to import into an sqlite3 database. The first two columns in the csv file contain unique, important information while the rest of the columns are really a list ...
2
votes
1answer
1k views

Restore SQLite database backup

I have an application that provides the user the ability to backup the local SQLite database to another location. I then provide the ability to restore the backup database and overwrite the current ...
1
vote
2answers
125 views

Binning and calculating a huge range of data

I have a code that I'm fairly certain does what I want. Bear with me as I explain what I'm doing: Imagine that there is 10 houses, where there can be one to an infinite number of persons. Each of ...
5
votes
2answers
2k views

Is there a better SQLite update / insert pattern than this?

I've got a function which updates an existing record or inserts a new one, but it looks very clunky to me. ...
1
vote
1answer
106 views

Optimizing the performance of a nested for loop over millions of messages from SQLite Query - v2

I've posted and gotten help to optimize my code before here and here. Now I have implemented the following changes, after very helpful advice: I have implemented a Dictionary instead of using list ...
1
vote
1answer
143 views

Find the highest frequency of messages inside a time slot of 24 hours

I have a very large number (millions) of messages, each labeled with the unixtime it was sent in a SQLite database. Each message has its own userid, for the user that have sent it. I want to know what'...
5
votes
2answers
2k views

Create SQLite backups

I have this script for creating SQLite backups, and I was wondering whether you'd have any suggestions on how to improve this. I was thinking that maybe it should create the backup ...
3
votes
3answers
4k views

Inserting persons in file into SQLite

I've just started working with SQLite in C# to test various features of an application. In building my first SQLite example I wanted to insert a large .csv into a table (Person) with two columns, A ...
3
votes
1answer
417 views

Flask form validation technique

This is currently the code that I'm using to validate and check for errors in a flask app, where the form fields are coming from a /registration html page: ...
2
votes
1answer
440 views

Adding items to a database from a dialog

I have a spinner in my activity that upon selection of one of it's options needs to handle the addition of a new object to my <...
2
votes
1answer
63 views

Getting recent stations

I made a database for my Android app using SQLite and it works fine. However, as I understood, SQLite calls shouldn't be made on UI thread. Is the below okay or not? ...
5
votes
3answers
739 views

Schema design for user profile management

Is this a good design? I would like to create a view on user table to get a list of users based on filtered conditions. Please suggest ways of improving this schema design. A view example that I ...
3
votes
0answers
736 views

Real-time bitcoin data feed and storage using websocket framework

I'm trying to create data feed script for real time bitcoin data for OkCoin exchange using their websocket API (documentation) and a database manager for storing. There are two channels I am ...