Questions tagged [sqlite]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
2k 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 ...
5
votes
1answer
6k 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
921 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
2k 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
2k 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
4k 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 ...
3
votes
2answers
173 views

Querying a database with PHP

I'm new to PHP programming. I would love some feedback on this simple code I wrote which queries a database based on some arguments supplied by a user and returns an HTML table displaying the data. ...
6
votes
2answers
727 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: ...
17
votes
1answer
21k 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
2k 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
428 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 (...
3
votes
3answers
6k views

SQLite helper class

I have recently implemented my SQLite helper class that supports SQLite in a memory class to be opened to not to be lost. Please review it and tell me if there is a coding problem and tell me what to ...
2
votes
1answer
132 views

SQLite class to manage recipes for an Android application

I have a class file that would be used to connect and execute queries into the database. The only thing I am confused about is this: do you really need to drop tables and re-create them everytime you ...
7
votes
4answers
430 views

Storing .h files in SQLite using SQLJet

I’m trying to learn as much as I can on my own by reading lots of examples, documentations, and asking here. I would like to improve my style to write efficient code and adhere to Java standards. In ...
1
vote
1answer
4k 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
254 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
8k 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 ...
15
votes
3answers
797 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 ...
8
votes
1answer
26k views

Optimize JSON insertion to SQLite (insert … on duplicate key ignore)

In current task, I'm refactoring the code of converting JSON file into SQLite database on Android device. Code compliant with Java 6. As a benchmark, grabbing the code from remote server takes ...
4
votes
1answer
603 views

Clumsy PHP5 code reading from an SQLite3 database

Some time ago I wrote myself a simple blog. The index page is generated with PHP5, using an SQLite3 database via the variable id handed to it via the URL. The ...
6
votes
1answer
467 views

Database interaction logic

I have a database-intensive app, almost every activity requires access to the database, both reading and writing. I had a lot of problems with separate threads and activities on the stack closing ...
3
votes
1answer
4k views

Database class design

I'm writing a SQLite wrapper for C++. I have this class representing a database: ...
34
votes
7answers
50k views

Database design for a school system

This system has to manage students, teachers, staff and grading. This is for production and is not a school assignment. As such, please let me know if I can improve on any aspect. :) My main concern ...
6
votes
1answer
809 views

Android ListAdapter design advice

I want to write an Android ListAdapter to serve data from a database that look like this: ...