On 20 Jul 2009, at 2:26am, Rich Shepard wrote:

> On Mon, 20 Jul 2009, Simon Slavin wrote:
>
>> Rather than move genfkey, it would make more sense to implement  
>> foreign
>> key constraints, since that's what it pretends to implement.  
>> However, I
>> don't know enough about how SQLite works internally to know how  
>> difficult
>> this would be.
>
> Simon,
>
>   I use triggers to enforce referential integrity with foreign keys.  
> Is this
> not a suitable approach for what you want to do?

It works, and triggers can be used for things other than foreign keys,  
but if foreign keys are implemented the reason for genfkey goes away.   
I think it wouldn't be much more work to implement foreign keys rather  
than a hack for it.  Many other versions of SQL implement them:

<http://www.w3schools.com/Sql/sql_foreignkey.asp>

and it would be nice if SQLite did too.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to