Re: [sqlite] Duplicate records (null handling)

2006-06-17 Thread David M. Cook
On Sat, Jun 17, 2006 at 10:16:47AM -0700, Will Leshner wrote: > But if NULL is distinct for UNIQUE columns, isn't that the result you > would expect? I took it to mean NULL is distinct from any other value, not that each NULL is distinct from any other NULL. Why would one want NULL to behave

Re: [sqlite] How to determine if a column is autoincremented?

2005-10-24 Thread David M. Cook
On Sun, Oct 23, 2005 at 09:24:58PM -0700, David M. Cook wrote: > On Sat, Oct 22, 2005 at 12:19:04PM -0700, Mario Gutierrez wrote: > > > CRETE TABLE my_table ( > > id INTEGER PRIMARY KEY, > > ... > > ) > > > > This would meet your criteria, but 'id' is

Re: [sqlite] How to determine if a column is autoincremented?

2005-10-23 Thread David M. Cook
On Sat, Oct 22, 2005 at 12:19:04PM -0700, Mario Gutierrez wrote: > CRETE TABLE my_table ( > id INTEGER PRIMARY KEY, > ... > ) > > This would meet your criteria, but 'id' is not an autoincremented column. Sorry, I don't get it. Why is it not? Also, why would one do that? If I wanted an

Re: [sqlite] How to determine if a column is autoincremented?

2005-10-22 Thread David M. Cook
On Fri, Oct 21, 2005 at 05:38:28PM -0700, Mario Gutierrez wrote: > I'm writing a SQLite adapter for a code generation tool. I'm a little > stumped on how you query SQLite to determine if a column is > autoincremented. I've tried An auto-increment column is defined as INTEGER PRIMARY KEY, so

Re: [sqlite] primary, secondary keys

2005-09-30 Thread David M. Cook
On Fri, Sep 30, 2005 at 10:55:07AM -0400, Mark Wyszomierski wrote: > Does sqlite allow multiple keys? When I created a table I did: > CREATE TABLE test (name, address, fav_color, primary key(name, address)) I usually use UNIQUE, though, for "business keys", and reserve PRIMARY KEY for the

Re: [sqlite] view and column naming problem in sqlite3

2005-05-09 Thread David M. Cook
On Mon, May 09, 2005 at 08:20:14AM -0700, David M. Cook wrote: > CREATE VIEW flat_recording_view as select r.recording_id, c.composer_name, > SQL error: no such column: composer_name > > Aliasing the column names in the view using the 'as' syntax didn't help. I guess I misty

[sqlite] view and column naming problem in sqlite3

2005-05-09 Thread David M. Cook
I have a view CREATE VIEW flat_recording_view as select r.recording_id, c.composer_name, w.title, r.description, l.label_name, d.catalog_no from composer c join work w on (c.composer_id=w.composer_id) join recording r on (w.work_id=r.work_id) join disc d on (r.disc_id=d.disc_id) join label l on

Re: [sqlite] Object Relational Mapping Tools with Sqlite

2005-01-01 Thread David M. Cook
On Thu, Dec 30, 2004 at 10:41:50AM -0800, [EMAIL PROTECTED] wrote: > Has anyone been successful using an object relational mapping tool with > Sqlite? I'm looking for such a tool that has a non-commercial free > license. For Python: http://www.sqlobject.org If you're using Java, I'd consider

Re: [sqlite] Mozilla XPCOM

2004-09-13 Thread David M. Cook
On Mon, Sep 13, 2004 at 11:53:05AM +0200, Stefan Neumann wrote: > me smiling brightly, when thinking on the things I could do porting this > to the mozilla-platform. The mozilla SQL stuff is here: http://eu.mozdev.org/Brussels2003/talks/jan/index.html I thought of just using the sqlite command

Re: [sqlite] Python bindings for sqlite 3

2004-08-25 Thread David M. Cook
On Wed, Aug 25, 2004 at 12:10:39AM -0400, Matt Wilson wrote: > On Tue, Aug 24, 2004 at 08:43:47PM -0700, David M. Cook wrote: > > > > * DBAPI compliance is important to me. sqlite is only one of the DBs I'd > > like to support in my apps. > > Do you kn

Re: [sqlite] Update in SQLite

2004-08-14 Thread David M. Cook
On Sun, Aug 15, 2004 at 01:28:05AM +0800, cai yuan wrote: >"To change a table you have to delete it (saving its contents to a temporary >table) and recreate it from scratch." (Stated in >http://www.hwaci.com/sw/sqlite/omitted.html) Does it mean when I use the >"UPDATE ..." SQL statement, the

Re: [sqlite] Status of FOREIGN KEY implementation

2004-08-13 Thread David M. Cook
On Wed, Aug 11, 2004 at 05:09:49PM -0700, Cliff Hudson wrote: > engine in a mobile device. Foreign key constraints are one of the features > I would like to see in any database engine we eventually use. According to > the web site, this feature is not yet implemented, and the mailing list This

Re: [sqlite] show columns headers

2004-06-16 Thread David M. Cook
On Wed, Jun 16, 2004 at 12:07:43PM +0200, bo wrote: > Hi all! > > Does anybody know if there is a switch to have sqlite writing out the > column header names with every select statement? .headers .help to see all the . commands. Dave Cook

Re: [sqlite] basic table level stuff

2004-01-21 Thread David M. Cook
On Wed, Jan 21, 2004 at 03:22:29AM -0500, jim wrote: > for some reason they are trying to name the constraint. no idea why. That determines the name of the index that will be used to implement the constraint. > It appears sqlitemanager doesn't use it. Yup, it looks like sqlite ignores the

Re: [sqlite] basic table level stuff

2004-01-20 Thread David M. Cook
On Tue, Jan 20, 2004 at 05:15:15PM -0500, jim wrote: > if they already have these constraints at the column level, > why do they need them a second time as in ... > name [type] [[CONSTRAINT name] column-constraint]* Because you may want a composite primary key or set of unique columns. A simple

[sqlite] Python schema generating module

2004-01-19 Thread David M. Cook
I've written a little Python module to generate sqlite schemas. Why? My initial reason was that I wanted to have some metadata for my application, and the easiest way to do that was to encapsulate the data into some objects and then use those to generate the needed SQL (this was after I gave up