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
23 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 ...
0
votes
0answers
32 views

Converts large csv dataset to hash then imports into MySQL/SQLITE3 database using Sequel

The main line in this script that allows Sequel to insert records into the database table is ...
2
votes
1answer
38 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 ...
0
votes
0answers
158 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
38 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
60 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
123 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
53 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 ...
4
votes
1answer
75 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
35 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
99 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 ...
3
votes
2answers
202 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
446 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
97 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
0answers
223 views

MVC Login for Android

The code for my Android application is below and so far I'm happy with it. Before anyone comments, I do acknowledge it requires the addition of further validation. The android application is a login ...
2
votes
1answer
105 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
58 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
180 views

Schema design for user profile

I have the below schema for user profile management: ...
7
votes
1answer
267 views

Android “Search” Activity and corresponding XML

Below is an Android Activity and corresponding XML layout. The function of the class is to search an ...
3
votes
1answer
415 views

Creating a fast Android dictionary (word counts)

This is a follow-up of my question here: I am currently working on an application for various statistics. One task is to analyse a good amount of sentences for their word counts. The specifications ...
8
votes
2answers
94 views

FizzBuzz in SQLite 2

This query performs a FizzBuzz in SQLite 2.8.17 without creating any tables or sprocs. First attempt: ...
6
votes
1answer
121 views

Using SQL to reorder items in a list view - is this efficient?

I'm writing an application for work that requires me to process a list of transactions. The list is small (5 records at the most) and I'm required to display that data in an android ...
7
votes
1answer
153 views

BananaQuery - Android one-line query

I created this library just for fun. Since I was a bit tired to write 10 lines of code to execute a simple select query in Android, I created a way make it simple. It's not so advanced and some ...
2
votes
1answer
66 views

Ruby Bot application [closed]

I just want to know if this looks good. ...
4
votes
1answer
465 views

Persistent key value store for Python using SQLite3

This is a module to implement a key value store in Python using SQLite3. Originally written to allow sharing of configuration among multiple threads that are already sharing a SQLite3 database, I have ...
5
votes
2answers
467 views

Benchmarking our LAMP servers with this php script

I've written a small script to benchmark our LAMP hosted servers that assess the performance based on three factors: Disk I/O Database I/O (mysql) Database I/O (sqlite) The logic is as follows: ...
6
votes
2answers
123 views

Database data insertion

...
3
votes
1answer
184 views

Seeding a file with fake records - doing concurrent updates

I need to seed a database with user data. When trying to write records to a file using sqlite3 with node, I tried writing the logic in a naive manner, without any error checks - but it was failing ...
6
votes
2answers
16k views

Using an AsyncTask to populate a ListView in a Fragment From a SQLite table

This is the first time that I have played around with AsyncTask in Android and I wanted to make sure I'm using it correctly. The idea is I'm grabbing all the rows from a table in the database using ...
10
votes
2answers
797 views

Another way to run reports on a SpiceWorks SQLite database using a linked server in SSMS?

I created a linked server in SSMS so that I could run reports on a SpiceWorks SQLite database. there are a few quirks in the whole system. These simple queries are becoming some of the most ...
3
votes
1answer
41 views

Finding users with the highest Following vs. Friends ratio

I am trying to find the users who have the highest "Following vs. Friends" ratio in my Twitter timeline. I have a SQLite database of the users in my Twitter timeline and each column contains data ...
7
votes
2answers
1k views

SQLite Helper Class in C#

Here is a SQLite Helper Class I created. Any input appreciated, including security and simplification. ...
5
votes
3answers
582 views

Optimization for SQLite result set parsing

I am retrieving information from an SQLite database that gives me back around 20 million rows that I need to process. This information is then transformed into a dict of lists which I need to use. I ...
2
votes
1answer
608 views

Unit of Work with Generic Repository Pattern MVVM, vol. 3

Continuation of this question: https://codereview.stackexchange.com/questions/36561/unit-of-work-with-generic-repository-pattern-mvvm-vol-2 I have made some modifications: Implement lazy-loading ...
3
votes
2answers
136 views

Searching database, filtering results, adding longs

My needs outpace my abilities. This code (mostly) works, but it is really ugly, doesn't always add correctly, and is in desperate need of some help refactoring. I can't wrap my head around what ...
1
vote
1answer
747 views

Unit of Work with Generic Repository Pattern MVVM, vol. 2

Continuation of this question: Unit of Work with Generic Repository Pattern MVVM I have made some modifications: Interfaces aren't forced to implement IDisposable Removed the finalizers Rebuilt UoW ...
4
votes
1answer
2k views

Unit of Work with Generic Repository Pattern MVVM

I have been writing the application. I meant to implement a repository pattern with Unit of Work. Is it correctly done? Can you make a code review? I use SQLite ...
2
votes
2answers
582 views

I need code review on using singleton to access local database

As I get to some performance issues in my app and find that I use database access in a bad way. So I decided to move to singleton pattern. I need someone to review this code and confirm me that I made ...
4
votes
1answer
446 views

Converting latitude and longitude coordinates from CSV using web service

I am working on converting a mailing list that has longitude and latitude coordinates within the CSV file. This script I came up with does what I need, but this is my first real-world use of python. I ...
2
votes
2answers
648 views

Improving SQLITE3 Left Join Performance

I occasional write simple yet long Python scripts using SQLITE3 (I'm not proficient with functional or object oriented programming...yet) Usually my sqlite3 is blazing fast. I'm use to looping ...
5
votes
1answer
1k views

Android SQLite Database management

I'd like some opinions about my approach at using SQLite databases in android. Everything seems to work very well, but there may be something wrong that I hadn't noticed. I don't like working with ...
5
votes
2answers
646 views

Adding to an index of authors

I'm new to SQLite but have programmed in BASIC (and other languages) for pushing 50 years. Given the sample code extract, please offer suggestions for improvement: ...
6
votes
1answer
7k views

Myth-busting SQLite3 performance w. pysqlite

I've read most of the posts I could find on optimizing SQLite3 performance, such as: How do I improve the performance of SQLite?, Is it possible to insert multiple rows at a time in an SQLite ...
2
votes
1answer
544 views

Working with sqlite and moving functions to class

I want to move this to a class that will open an sqlite connection that can be re-used, rather than disposing of it every time I write to the database. Furthermore I am more than happy for any best ...
3
votes
1answer
242 views

how secure is this way of writing and reading with PHP and SQLite?

This is a security question. I'm quite new to PHP and just a beginner in SQLite. For practical, and educational reasons, I'm writing a small PHP site that will serve as one-threaded discussion ...
1
vote
1answer
1k views

Insert dynamic parameters to sqlite database statements

I want to insert parameters dynamically to statements at sqlite. I now write as follows: ...
3
votes
2answers
197 views

Finding the cheapest one-way air flight fare

I'm doing a sort of exercise where I'm given a question, and I have to answer it by writing an SQL query using a database that I was given. This is the question: What is the cheapest fare for a ...
3
votes
2answers
3k views

Optimizing mass inserts into SQLite

I am trying to optimize inserts from a returned JSON which contains data from multiple tables on the remote server. My code is working, but I just want to figure out a way for it to work better. I ...
14
votes
3answers
685 views

Sample game code for applying to a development firm

I am contemplating working with a development firm, and had asked for this piece of sample code. Could you please take a look and let me know if this is a quality piece of work, or if it needs ...
2
votes
1answer
612 views

Android SQL in its simplest form [closed]

I thought I would just post a really simple wrapper for those who don't want to implement the retarded SqliteOpenHelper, which is really, really stupid. Below is a class to open/create a database, ...