[sqlite] Create multipe tables, many-to-many design

2019-08-14 Thread dboland9
I'm doing an app. that uses sqlite, and has a many-to-many relationship. The areas I need some guidance are: * Best way to create multiple tables the first time the app. is started. * How to create a MTM relationship and add/modify data. I can create tables (Python) by putting the code in

[sqlite] Best way to create multiple tables?

2019-08-14 Thread dboland9
I'm doing an app. that has multiple tables in sqlite. When the app. is run for the first time, or the tables are lost/damaged, it will create the database and all tables. My question is if there is a best way to create 5 tables? I can put al the Python code into one function, pass the path to

[sqlite] Fw: multi-multi join/bridge table, table creation questions

2019-08-14 Thread dboland9
Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message ‐‐‐ On Wednesday, August 14, 2019 8:54 AM, dboland9 wrote: > I'm doing a Python app (not that the language really matters - just for > context) that uses SQLite to store data. I have a many-to-man

[sqlite] multi-multi join/bridge table, table creation questions

2019-08-14 Thread dboland9
I'm doing a Python app (not that the language really matters - just for context) that uses SQLite to store data. I have a many-to-many (MTM) relationship. After a lot of Googling and reading I have concluded that: >> I need to create the join/bridge table just like all the other tables. In

[sqlite] primary key quinky dink

2019-08-19 Thread dboland9
I have created a number of tables, and two of then are part of a many to many relationship. Thus, I need to get the last row id. Using the browser, I find that: mytable_id INTEGER AUTO_INCREMENT PRIMARY KEY produces a null value mytable_id INTEGER PRIMARY KEY produces an integer value.

Re: [sqlite] primary key quinky dink

2019-08-19 Thread dboland9
That is what I am using. Thanks for the pointer to the FAQ. Dave, Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Monday, August 19, 2019 2:15 PM, Simon Slavin wrote: > On 19 Aug 2019, at 6:56pm, dboland9 dbola...@protonmail.com wrote: > > > I have crea

[sqlite] Query for Many to Many

2019-08-27 Thread dboland9
All, I need some help writing some queries for a MTM relationship.  The example tables are: author table books table author_books table author_id PKbook_isbn PKa_b_id PK author_fnamebook_title author_id FK author_lname

Re: [sqlite] Query for Many to Many

2019-09-03 Thread dboland9
Thanks for the info. As I understand things, this is an implicit join. I did try it, and it works just fine. However, in my reading it appears that implicit joins are discouraged, and will only do left joins. Also, it looks like you are using aliasing to shorten the query strings - true or