Re: [sqlite] What's the best way to organize this database?

2012-03-11 Thread John Salerno
Thanks so much for all the advice and information! I think I can get started now! :) On Sat, Mar 10, 2012 at 6:36 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 9 Mar 2012, at 4:00pm, John Salerno <johnj...@gmail.com> wrote: > >> On Fri, Mar 9, 2012 at

Re: [sqlite] What's the best way to organize this database?

2012-03-10 Thread John Salerno
On Fri, Mar 9, 2012 at 7:29 AM, Simon Slavin wrote: > Sooner or later you're going to want to make a list which is sorted in artist > order.  And you're going to want to list 'The Beatles' (if you have any taste > at all).  But if you list artists in name order they'd

Re: [sqlite] What's the best way to organize this database?

2012-03-09 Thread John Salerno
On Mar 8, 7:46 am, Simon Slavin wrote: > Yes, this would be the 'normalised' form.  Something like > > artists: id, name, sortOrder > songs: id, artistID, title > plays: id, songID, playDate, playTime Ok, between you and Larry's last post, it's starting to make a lot more

Re: [sqlite] What's the best way to organize this database?

2012-03-08 Thread John Salerno
On Mar 7, 7:33 am, Simon Slavin wrote: > I don't understand the purpose of the table you originally described.  If you > are listing the same tracks again and again, listing different times it was > played, then it would be useful to have three tables (artists, tracks,

Re: [sqlite] What's the best way to organize this database?

2012-03-07 Thread John Salerno
Thanks to both of you. The question of normalization was one thing I was considering, I just wasn't sure how it should be done. A separate table with Artist ID and Artist Name fields could be useful. Would it be good to make an equivalent table for the songs, or should the songs simply be

[sqlite] What's the best way to organize this database?

2012-03-06 Thread John Salerno
Hi all. I'm very new to all of this, so I'm not necessarily looking for over-the-top advice, although anything you tell me will be appreciated. I just want to create a simple script (in Python, using sqlite3) that reads a "|" delineated text file and extracts the following bits of information

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
ot;'s in all positions out to your maximum column widths. Export the data and delete the first line. Fred > -Original Message- > From: John Salerno [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 29, 2006 11:39 AM > To: sqlite-users@sqlite.org > Subject: [sqlite] Re: two quest

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
On 8/29/06, Martin Jenkins <[EMAIL PROTECTED]> wrote: John Salerno wrote: > So why didn't it expand for Programmer II, but it does expand for AA? AIUI, the default column width is the greater of 10 and the width of the first line of output. Ah, thanks! I had even read about th

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
ctions sqlite> create table t (a text); sqlite> .s CREATE TABLE t (a text); sqlite> insert into t values ('Secretary'); sqlite> insert into t values ('Programmer'); sqlite> insert into t values ('Programmer II'); sqlite> select * from t; Secretary Programmer Programmer II sqlit

Re: [sqlite] two questions about formatting output

2006-08-29 Thread John Salerno
a separate language. On 8/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "John Salerno" <[EMAIL PROTECTED]> wrote: > Just as a follow-up, I noticed that one of my columns *did* expand to > fit a longer name, yet another column didn't. Could it be because the > one t

[sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
-- Administrative Assistant Programmer Programmer II So why didn't it expand for Programmer II, but it does expand for AA? Thanks, John On 8/29/06, John Salerno <[EMAIL PROTECTED]> wrote: Just as a follow-up, I noticed that one of my columns *did* expand to fit a longer name, yet a

Re: [sqlite] formatting the output on the command line?

2006-08-26 Thread John Salerno
Thanks, I'll give this a try! John On 8/25/06, Martin Jenkins <[EMAIL PROTECTED]> wrote: John Salerno wrote: > Well, I figured out the sqlite commands, but how would I make these > settings the default each time I use the sqlite command line program? > (i.e. .he on and .mo

Re: [sqlite] formatting the output on the command line?

2006-08-25 Thread John Salerno
Well, I figured out the sqlite commands, but how would I make these settings the default each time I use the sqlite command line program? (i.e. .he on and .mo col) John On 8/25/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: There are a load of nice text processing programs for this sort of

Re: [sqlite] formatting the output on the command line?

2006-08-24 Thread John Salerno
Thanks guys! On 8/24/06, Gary Kruck <[EMAIL PROTECTED]> wrote: There is a tutorial Here <http://www.sqlite.org/sqlite.html> . Gary Martin Jenkins wrote: > John Salerno wrote: >> Is there any special command I need to use to get these options >> listed?

Re: [sqlite] formatting the output on the command line?

2006-08-24 Thread John Salerno
Is there any special command I need to use to get these options listed? I didn't see the particular abbreviations that you told me about. John On 8/24/06, Martin Jenkins <[EMAIL PROTECTED]> wrote: John Salerno wrote: > Thanks! Boxes aren't necessary, but it's nice to have the col

Re: [sqlite] formatting the output on the command line?

2006-08-24 Thread John Salerno
Thanks! Boxes aren't necessary, but it's nice to have the columns like that. I'll have to look into these options more. John On 8/24/06, Martin Jenkins <[EMAIL PROTECTED]> wrote: John Salerno wrote: > Hi everyone. Is it possible to format the output of a query > differentl

[sqlite] formatting the output on the command line?

2006-08-24 Thread John Salerno
Hi everyone. Is it possible to format the output of a query differently when using the command line program? I'm thinking along the lines of MySQL, which puts rows and columns in boxes, and has the column names at the top. It's very nice and easy to read. I find the default format hard to read

Re: [sqlite] running a script?

2006-08-23 Thread John Salerno
, but it won't work properly. And about using .read and .import, does this mean you can't use them on files that have semicolons in them? On 8/23/06, Ulrich Schöbel <[EMAIL PROTECTED]> wrote: On Wednesday 23 August 2006 21:45, John Salerno wrote: > Hi everyone. Can someone tell me the prop

Re: [sqlite] running a script?

2006-08-23 Thread John Salerno
I'm asking about an actual file, though, not just a single query. I've tried something like what you suggest with the file path, but it doesn't work. On 8/23/06, Scott Baker <[EMAIL PROTECTED]> wrote: echo "SELECT * FROM Table" | sqlite database.bin John Salerno wrote: &g

[sqlite] running a script?

2006-08-23 Thread John Salerno
Hi everyone. Can someone tell me the proper syntax for running a sql script when starting up sqlite from the command line interface? Thanks, John - To unsubscribe, send email to [EMAIL PROTECTED]

[sqlite] importing csv files into a sqlite db?

2006-08-22 Thread John Salerno
Let's say I have many csv files (25, to be exact) and want to create a sqlite database out of them? How do I do that? Furthermore, in addition to the 25 text files of data, there are 25 corresponding sql files that define the tables, so does this mean those would have to be rewritten in sqlite?

[sqlite] Loading a mysql file into a sqlite database?

2006-08-21 Thread John Salerno
Hi guys. Is it possible to load a sql file that is for a MySQL database into a SQLite database? Does it just work normally, or would some tweaking be needed? Or does this just not work? Thanks, John - To unsubscribe,

Re: [sqlite] opening a database in command prompt in Windows

2006-08-21 Thread John Salerno
Yeah, I just moved the exe file elsewhere on my hard drive and put it's destination in my PATH. So now I can type 'sqlite3 ' and open a database. On 8/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "John Salerno" <[EMAIL PROTECTED]> wrote: > I downloaded

[sqlite] opening a database in command prompt in Windows

2006-08-21 Thread John Salerno
I downloaded the command line utility, and it is an exe file that automatically opens the sqlite prompt. Given this, how am I supposed to open or create databases? The only way I'm aware so far is that you have to specify the db after the sqlite3 command which opens the prompt, but in this case

[sqlite] switching databases?

2006-08-20 Thread John Salerno
Hi everyone. I'm just getting started with sqlite and I was testing it on the command line. Is there a way to switch between databases while at the sqlite command prompt, or must you start the command prompt with a database? For example, must you always type: $ sqlite3 or is there some kind of