On 11 Feb 2011, at 12:26am, BareFeetWare wrote:

> On 11/02/2011, at 11:11 AM, Simon Slavin wrote:
> 
>> Erm ... there are also movies which have more than one person directing.  
>> You need to copy across the rowid from the MoviePeople table, and delete 
>> just based on that particular record.
> 
> Adding to what Simon said:
> 
> The schema I posted allows for multiple directors for each movie, the same 
> person having multiple capacities in the same movie (eg writer, director and 
> actor) etc. Any changes to the model and what's allowed (ie constraints) 
> should be done there and not in your application layer, IMNSHO.
> 
> If you want to delete or insert, based on text (eg person's name), I suggest 
> NOT getting your application to get the matching rowid, then reinjected it 
> into a second SQL call. Do it all in one SQL transaction

Come to think of it, what's really happening here is a FOREIGN KEY situation.

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

Reply via email to