Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:01
    wdscxsj commented #2744
  • 03:50
    fenjianren edited #2660
  • 03:46
    fenjianren commented #2660
  • 03:46
    justinclift commented #2750
  • 03:45
    justinclift commented #2751
  • 02:16
    wdscxsj commented #2744
  • 02:15
    wdscxsj commented #2744
  • 02:14
    wdscxsj commented #2744
  • 02:14
    wdscxsj commented #2744
  • 01:49
    oldlaptop edited #2751
  • 01:49
    oldlaptop edited #2751
  • 01:45
    oldlaptop opened #2751
  • Jun 21 20:53
    mgrojo commented #2744
  • Jun 21 20:40
    mgrojo commented #2750
  • Jun 21 20:40
    mgrojo closed #2583
  • Jun 21 20:40

    mgrojo on master

    Fix #2583: quote identifiers, n… Merge pull request #2750 from o… (compare)

  • Jun 21 20:40
    mgrojo closed #2750
  • Jun 21 19:34
    oldlaptop edited #2750
  • Jun 21 19:26
    oldlaptop edited #2750
  • Jun 21 19:26
    oldlaptop synchronize #2750
Chris Locke
@chrisjlocke
Dropping the table after creating it would just delete it again. Are you sure that's what you mean?
What do you mean by 'not insert to FK key' ?
I appreciate you've resolved this, but I'm not convinced you've actually resolved it... if you follow...
Scott Furry
@scottfurry
jessie-github
@jessie-github
HI. Not sure if this is a limitation of DB Browser or not: I have a huge table (25GB) with an index on column "ID". If I execute "select * from table where ID = 123, this is very fast (almost instant result). But if I try to use the Browser with a filter (ID = 123), it takes 20 seconds to display the count number with a lot of "loading" for the cell values. Then I have to wait 2-3mn in order to have the values displayed. Is it expected or am doing something wrong ? Thanks
Tested on v3.12.1 in Windows 64
jessie-github
@jessie-github
Nevermind, I found the issue: I forgot to use the "=" operator...slap forehead
Hilmi Kaan Genç
@Ciyradyl
Hey guys, I have an android project and I created my database via SQlite Browser also I'm using kotling at android side but i didn't find any source about how am i going to connect my database with my android app. Do you have any resource? (video, article etc.)
Chris Locke
@chrisjlocke
Kotling? Did you mean Kotlin? (https://kotlinlang.org/)
You say you didn't 'find any source' - have you seen this tutorial?
https://www.javatpoint.com/kotlin-android-sqlite-tutorial
Hilmi Kaan Genç
@Ciyradyl
@chrisjlocke I was looking for something like a video but this is also good thanks buddy. I will check this out.
Selvaganesh
@selvaganesh3m

CREATE TABLE IF NOT EXISTS categories (
category_value VARCHAR(4) NOT NULL PRIMARY KEY
);
INSERT INTO categories (category_value) VALUES ("food"),("trav"),("cine"),("misc");

CREATE TABLE IF NOT EXISTS Expences (
expence_id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT(64) NOT NULL,
description TEXT(255) NOT NULL,
amount DECIMAL (5,2) CHECK(amount > 0 and amount < 10000.00) NOT NULL,
transaction_date DATE NOT NULL,
category_value VARCHAR(4) NOT NULL,
FOREIGN KEY (category_value)
REFERENCES categories (category_value)
ON UPDATE RESTRICT
ON DELETE CASCADE);

Please can someone tell me what wrong with this
Chris Locke
@chrisjlocke
Sqlite doesn't support varchar for a start ... only text, integer, numeric, real and blobs. I assume you're copying this from another source to replicate in sqlite?
When you say, "what's wrong with it" what are you asking - what part of it isn't working? Are you getting errors? What error? It's a bit not working? Which bit?
Selvaganesh
@selvaganesh3m
My doubt is is in foreign key reference part
whether the foreign key referred is right or wrong thats my doubt the whole declaration part is wrong I thing
That's what need an Explanation why it is Wrong
Chris Locke
@chrisjlocke
image.png
OK, have put all that lot into DB4S, and it just swallowed it.
Again - what makes you think it's not working - what isn't working.
Chris Locke
@chrisjlocke
If I add 'blah' as a category, it doesn't like that, which is as expected.
image.png
If I enter 'misc', it does.
image.png
That what the constraint is for - it'll only allow values you've entered into the categories table.
image.png
Chris Locke
@chrisjlocke
In an ideal world, the category table would be like the expenses table and have an ID, and you'd link on that id, not the word itself. Later on, it'll be problematic to rename 'misc' to something else - you'd have to add a new entry and edit every record which points to 'misc'. One line of SQL, but still problematic.
brightinnovator
@brightinnovator

Hi,

I have 5,000 txt files. I want to create a mobile app to do full text search

When i looked for it few suggested the following

a) use sqlite fts5 (or)
b) search-index library

I'm now sure what the drawbacks and how much slower sqlite would be when to do a full text search for 5,000 files which can be converted to 5,00,000 records as each file would have 100 paragraphs and each paragraph can be saved as a row

Is it worth to put 5 lakhs records in SQLite and do a full text search. Will it be faster?

Please let me know in detail

Thanks

sebastianolafhandjojo
@sebastianolafhandjojo
Hi , i would like a request , a check box to enable/disable latest release on startup, because we are behind firewall
Chris Locke
@chrisjlocke

Hi,

I have 5,000 txt files. I want to create a mobile app to do full text search

You don't need SQLite for this. SQLite is a database - to store data. Doesn't sound like your data is changing. Just search the text files for the search text and display any results. Using a database for this would be like using a hammer to make a milkshake. Possible, but unnecessary.

Hi , i would like a request , a check box to enable/disable latest release on startup, because we are behind firewall

If you click 'Edit' then select 'Preferences', you should get a tabbed dialog of many options. The first tab is 'General'.
Near the bottom of this is an option, 'Automatic updates'. If it is ticked, then DB4S will check for updates. If this is unticked, then it won't. Uncheck this option, then click on 'OK' and restart DB4S to confirm you no longer get an error at startup.

image.png
sebastianolafhandjojo
@sebastianolafhandjojo
ok thanks didn't realize that
Chris Locke
@chrisjlocke
No problem! Hope it resolves your issue. 😊
TheDemLabs
@TheDemLabs
Suggestions on the easiest way to share data to non-technical users who will be canvassing offline in the field using their phones? The file size could be upto 1m records but only have 6 columns. Search by Name & Date of Birth. Display Address, Phone, Voting status. Volunteers will make any corrections and then upload them when they have connectivity. Right now we are using SQLite to put the data on the phone but I need a simpler interface for volunteers to work with the data. Thanks.
TheDemLabs
@TheDemLabs
@chrisjlocke Hi Chris, Any suggestions on the easiest way to share data to non-technical users who will be canvassing offline in the field using their phones? The file size could be upto 1m records but only have 6 columns. Search by Name & Date of Birth. Display Address, Phone, Voting status. Volunteers will make any corrections and then upload them when they have connectivity. Right now we are using SQLite to put the data on the phone but I need a simpler interface for volunteers to work with the data. Thanks.
Chris Locke
@chrisjlocke
The first problem I see is confidential data - surely this would need to be encrypted somehow? If someone left a phone somewhere it would be easy to access this data.
When you say 'corrections', how much entry is entered?
You mention you're using a SQLite database already, but what app is accessing this on the phone currently?
Selvaganesh
@selvaganesh3m
Some one please help me
Any one here
Please I've doubt
Someone please clarify my doubt
TheDemLabs
@TheDemLabs
The data we are using is publicly available data, but we would like to keep it encrypted on the phone if possible. Corrections will be minor such as an incorrect address or phone number. Or they might a record for a person who is an eligible voter but not currently on the rolls. The information that the volunteers collect will be uploaded when they do have connectivity. Other people will screen and verify the volunteers' input before doing anything with that information. We are using the query tool that comes with SQLite (Filter). But I think this will be hard for many non-technical volunteers and am hoping that there is a more user-friendly app or front end we can use with SQLite.
Chris Locke
@chrisjlocke

Someone please clarify my doubt

Apologies - this chat isn't monitored 24/7, but feel free to comment your doubts and one of the team will respond when they can. 👍

Chris Locke
@chrisjlocke

We are using the query tool that comes with SQLite

I'm still not sure what application you're using on your phones to view/amend the database. SQLite Browser (or Database Browser for SQLite to use it's official title) isn't available for Android/iOS.

There is a handy 'repository' called dbhub.io which allows databases to be uploaded and supports revisions, but again, this works within DB4S which isn't available on a mobile device.

This would be a simple app to create - mainly a search form, then select the entry to view the record, allow any updates which would set a 'date updated' flag, so any records updated in the last X days could then be uploaded. Simple in theory...
While my .Net skills are good, I don't have the skills to create a Xaramin application, which would fit your bill nicely.
As an aside, whats the urgency of this - 'we want something now, now, now!!!' or 'we'll need something quick in a couple of weeks', etc. Could be an interesting project if you want to have a specific application written for you!

Would the volunteers be using Android phones, tablets, or Apple hardware? Or a mix?
Selvaganesh
@selvaganesh3m

My doubt is

# fetch all orders that have 'pepperoni' as one of the toppings (either in pizza-topping or in additional-topping)

I've written a query

SELECT
  o.*
FROM
  tom_orders AS o
  INNER JOIN tom_pizza_toppings AS pt ON pt.pizza_id = o.pizza_id
  INNER JOIN tom_toppings AS t ON t.id = pt.topping_id
WHERE
  t.name = 'Pepperoni'
UNION
SELECT
  o.*
FROM
  tom_orders AS o
  INNER JOIN tom_orders_addl_toppings AS addt ON addt.order_id = o.id
  INNER JOIN tom_toppings AS t ON t.id = addt.topping_id
WHERE
  t.name = 'Pepperoni'

This is my query

TheDemLabs
@TheDemLabs
I found SQLite Mobile Client on the Apple Store and downloaded that. There is a version ($3 onetime) that lets you import CSV files. I've hired a developer to help me with the simple form that would be needed for volunteers to conduct queries and add their notes while in offline mode. Volunteers will be using both Apple and Android devices. All good for now. Thanks.
Selvaganesh
@selvaganesh3m
image.png
Chris Locke
@chrisjlocke
So an order (tom_orders) can have one or more tom_toppings which can be either pizza_toppings or addl_toppings. I assume tom_toppings is the main list, while the other two relate to specific orders? I don't think you need a union, but assume that works.
So you've done the query - what is the issue?
Chris Locke
@chrisjlocke

All good for now. Thanks.

Glad you found something that works.