A popular open-source embeddable (i.e. non client-server) RDBMS implemented as a C library.

learn more… | top users | synonyms

2
votes
3answers
15 views

Restriction insertion for the particular age group

Actually i have a table called "Customer" Customer cid varchar2(6) - primary key cAge number I want the age of the customer to be between 18 and 30. Can i put any constraints while insertion ...
0
votes
0answers
11 views

SQLite text columns

When having a table in SQLite that has a TEXT data type, is there any implication if the length of the contained string differ significantly?
1
vote
1answer
43 views

Take 5 minute averages from second data

I want to preface this post by saying that I am a complete newbie with SQL and any help will be highly appreciated. For some project I am working with high frequency stock data, below is a small ...
1
vote
0answers
10 views

SQLite vs MemSQL vs other SQLAlchemy compatible in memory databses

What is the recommended in-memory database which connects to SQLAlchemy? Requirements: Connects to SQLAlchemy. Minimal memory usage when empty (it will store <50MB). Easy to work with (e.g. ...
1
vote
1answer
22 views

Sqlite, DB clients & BLOB's: Practical DB Use

I'm looking for an SQLite client that can help me to make practical use of the DB. The plan is to insert mp3's as BLOBs (or perhaps just as references to external files). Each record will also ...
1
vote
2answers
50 views

Bus timetable Database structure

I am creating a database for bus timetable in android app. I have created four tables: stops, route, detail_route and schedule. columns in each table are as follows. Database structure route (id, ...
0
votes
0answers
15 views

Recover data from a corrupted, encrypted SQLite database file

We use the System.Data.SQLite library to use SQLite in .NET applications, which allows the database file to be encrypted with a password. We have a user who is getting an error that the database disk ...
3
votes
1answer
39 views

How to maintain trees and their roots in SQLite

I have a (SQLite) database with a table representing nodes in a forest (set of trees): create table "Node" ( "id" Text primary key, "parent" Text references "Node" ("id") -- parent node ...
1
vote
0answers
26 views

Would it be good practice to represent MongoDB ObjectId as a String or a Blob type in SQL Lite (RDMS world)?

All: We have a software application with 1) Web-based component 2) Mobile-based component Our 1) Web-based component uses a) MongoDB as the Database b) ASP.NET C# Our 2) Mobile-based component ...
1
vote
0answers
20 views

How to add in carriage-return/line-feeds without starting a new row in a tabbed txt SQLite import

I'm using a tab-delimited .txt file to save my data before importing it into a SQLite database with the SQLite Manager add-on for Firefox. I've tried a couple of ways to add ...
2
votes
2answers
78 views

How to optimize this crazy SQL Query (Specific)

In short, I have this SQLite3 query that uses up 30% of CPU when being run. SELECT s.* ,r.RaagEnglish ,( SELECT w.WriterEnglish FROM Writer w WHERE w.WriterID = ( ...
0
votes
1answer
32 views

Trigger with multiple inserts based on JSON data

I am using sqlite and have its json1 extension available. I have the following tables (reduced to a minimal example): -- table filled from external source, -- with only a little possible impact on ...
1
vote
1answer
63 views

Finding interval overlap between two tables

I have two tables that have top_depth, bottom_depth, lith_type. One defines the different layers found in a borehole and the other define where samples are extracted in each of the layers. I would ...
0
votes
1answer
16 views

Matching separate unicode characters as one

I am writing a C# program, and I'm querying a SQLite database. I have multiple diacritical characters (e.g ã, õ, ó, ê) which I need to match in my search. I have the command "SELECT * FROM ...
1
vote
1answer
233 views

SQL query to compute longest travel time for each id number

I am a novice in SQL and I have a problem as follows. There are two tables TRNSCTN_TAB: CREATE TABLE TRNSCTN_TAB( `transactionId` int , `UniqueId` int , `transactionTimeStamp` ...
1
vote
1answer
31 views

Two queries run much longer when combined into one

The first two queries below are very similar. The third is practically the union of the first two: sql> SELECT sigla_partido, SUM(receita_valor) FROM prestacao_conta_eleicao_candidato_2014 ...
0
votes
0answers
24 views

Sync, not import, CSV files with SQLite

In MySQL I have observed that under table options, the storage engine can be configured as a CSV file. This gives me a nice clean csv file in the database directory. This file doesn't come with column ...
2
votes
2answers
56 views

Update function to enter random/unique GUID per row

I am new to SQL and am trying to do the following. i am using SQLite browser to edit the current file I have I do have a SQLite database with around 1500 rows of data that I would like to create a ...
3
votes
0answers
74 views

Is this user-storage database system efficient, effective and secure?

I am using: PHP Version 5.2.17-MIT-BACKPORT-GnuTLS SQLite 2.8.17 I have a database called users, which currently has a table called root. There will be others, once I get all the rows for root ...
0
votes
1answer
39 views

SQLite3 foreign key mismatch

I have following SQLite3 statement inside Qt/C++ class method: bool UeSettings::ueSaveSettings(const QString& address, const QString& port, ...
0
votes
1answer
26 views

Can sqlite dump database schema in a fixed order?

I am using SQLiteStudio 3.0.7 to dump the database schema regularly for versioning purposes and it seems to change the order of the table definitions at random. This wreaks havoc on the diffs as even ...
0
votes
1answer
29 views

How to get average of views before clicking on advertisement?

I've got two tables containing information about viewing and clicking on advertisement by each user: Clicks: userID Action Time 123 c 2016-01-08 01:57:00 123 c 2016-01-11 ...
1
vote
0answers
41 views

how to directly import a csv gzip'ed file into SQlite 3?

I'd like to import a 15GB file comma delimited gzip compressed file into Sqlite 3 without having to use temporary files. I'd like to run a command like: zcat input/surgical_code.csv.gz | tail -n ...
1
vote
1answer
47 views

Square root in SQLite studio

SQLite studio does not support square root function, so I have defined it in function editor as proc SqrtA {num} { set ans [expr {sqrt($num)}] return $ans } with function nameSqrtA and one input ...
0
votes
0answers
39 views

Optimization beyond creating indexes

From the Explain query Output i already created db.execute("CREATE INDEX x1 ON TRAVELDAYS(Day, Value);") db.execute("CREATE INDEX x2 ON TRAINS(TrainDaysUID);") db.execute("CREATE INDEX x3 ON ...
0
votes
1answer
51 views

sqlite database table with 1000's of columns

I am using sqlite3 in an application to conduct an alalysis of distances between sets of points. Distances between these points have been precomputed using dijkstra's algorithim and left me with a ...
0
votes
0answers
37 views

How to get row position in sqlite after sorting?

I have table, UUID | INT | LONG AAA | 1 | 123 BBB | 3 | 241 CCC | 2 | 145 And i sort it by INT value. SELECT * FROM table ORDER BY int_val DESC then i want to get a row from table and ...
1
vote
1answer
57 views

Which database should I look at for analyzing ~30gb, 700M records dataset?

I'm looking at analyzing a kaggle dataset which is pretty normalized, specifically joining, grouping, slicing and dicing the 3 tables patients(2M) <-> diagnosis(700M) <-> doctors(2M). I ...
1
vote
1answer
73 views

SQLite query rows nearest to hour

My question is similar to the one asked here. I'm new to SQL and I'm creating a weather app that stores part of the data locally in a db, so I'm writing the query using the sqlitedatabase java class ...
-1
votes
1answer
33 views

Inserting longer numbers in SQLite

Which data type is suitable to insert larger numbers in SQLite. Can anybody please guide me? I want to insert numbers greater than 10 digits.
3
votes
2answers
66 views

How to use LIKE with subquery?

In a SQLITE3 DB, I have a table A with a column 'word' containing search words that partially match a column in another table B. I'd like to SELECT all rows FROM table B WHERE B.name LIKE ...
1
vote
0answers
33 views

Merge databases with sql only: firefox places and visits

I have two tables in each of two dbs: places: id, url (unique), visits: id, place_id, timestamp, type. I need to merge those databases: There are one main database and one "to-merge". The unique ...
0
votes
0answers
20 views

SQLite: choosing a unique separator

I'm working on a project that will result in an SQLite database of about 6 GB of text content (encoded UTF-8). The text will be diverse: it will have a great deal of plain text writing, but also a ...
1
vote
1answer
48 views

Suitability of mysql and sqllite?

I am about to build a C# wpf application. I need to easily port the application e.g. one click installation. I am not sure should I use sqllite or mysql db? The range of data wont run into billion at ...
3
votes
2answers
93 views

SQLite Like clause match whole word only

I have a SQLite database with a table named: minecraft +----+----------------------+ | id | name | +----+----------------------+ | 1 | Pocket Mine MP | | 2 | Open Computers ...
1
vote
1answer
47 views

Combine 2 SQLite result sets to calculate percentage

I have a single sqlite table that I'm trying to pull two resultsets from and then calculate the percentage. Table columns: email Location Clicked? Test# Test# 123 has a list of users (identified ...
2
votes
1answer
733 views

Is it possible to store and query JSON in SQLite?

I need to store JSON objects in a SQLite database, and then do complex queries on it. I did a table like this: +--------------------------------------+ |document | property | string | number| ...
0
votes
0answers
21 views

Switching SQLite environments

I submitted this on SuperUser without response; someone suggested I try it here. I like Firefox's SQLite Manager plugin because it's easy to show people how to use it. This is helpful if I want to ...
0
votes
0answers
91 views

How to import data from Sqlite into SQL Server 2012

I need to import data from sqlite into SQL Server so we can include it in our data warehouse. Based on previous system volume. Id expect there to be 50-100,000 rows after a couple of years. For ...
0
votes
0answers
43 views

force SQLite view column type affinity

Using SQLite 3, I have some view columns which are defined with an expression, and so have no type affinity. Is it possible to define them in a way that forces them to have a certain type affinity? ...
0
votes
0answers
48 views

No foreign key constraint with PRAGMA foreign keys

This is my code. It's SQLITE3 in Python 3. conn = sqlite3.connect(db) c = conn.cursor() c.execute('BEGIN') c.execute("PRAGMA foreign_keys = ON") c.execute('CREATE TABLE ...
0
votes
0answers
93 views

Database design for storing historical stock exchange Level2 (depth) data

I am developing C# software using embbeded SQLite Database which shows historical level2 (market depth - asks/bids) stock exchange data graph. Example Simply speaking, there are 25 asks (price, ...
2
votes
1answer
33 views

sqlite3 foreign keys ignored

I am working on a small sqlite3 database for a small simple mailserver. I have created a new sqlite3 database and add executed this to pürepare it for data: BEGIN TRANSACTION; CREATE TABLE ...
0
votes
0answers
24 views

Structure of an SQLite database for storing analytics with counters and hits

Before making this post, I referred to this and this which contain extremely complex solutions and hence, this question: I am building a spam filtering app that takes posts from a feed and deletes ...
0
votes
0answers
78 views

SQLite no such column: table.columnName

I have a query SELECT Bookies.Name, Exchanges.Name, Bets.Completion_Date, Bets.BMStake, Bets.Liability, Bets.Profit, Bets.Type, ...
0
votes
1answer
102 views

Derived classes with same base class and class specific ids

I have three classes in my project. One base class and two derived classes. public class Animal { public long Id { get; set; } public DateTime Created { get; set; } public string Name { ...
0
votes
1answer
136 views

Efficient way to get last 10 rows of each group in SQLite, can CTE help?

Consider there is a table of job runs history with the following schema: job_runs ( run_id integer not null, -- identifier of the run job_id integer not null, -- identifier of the job ...
1
vote
0answers
57 views

SQLite reference table question

I'm using SQLite and Python for making a sensor network database. I have a table holding the nodes: NODE, another 2 tables for sensor specification: SENSOR_TYPE ("Temperature, Humidity...) and ...
2
votes
2answers
64 views

Create Sqlite3 database

I am simply trying to create a database. In my account's home directory, I type in sqlite3 test.db Then once I am in sqlite, I type .quit That should create the database file in the ...
1
vote
1answer
76 views

Getting data according to last hours from sqlite

I want to get records out of sqlite database according to hours. following are my questions 1) I have to extract all data from sqlite for past one hour. I have tried following query but it provide me ...