On 11 Nov 2013, at 2:35pm, dd <durga.d...@gmail.com> wrote:

> Got it.
> 
> Can I conclude this way: Foreign keys works pretty well when
> application deals with parent keys only. But, application may need to
> execute more queries when dealing with child key/tables.

My feeling is that a lot of this logic needs to be done at the application 
level because at that level you have more flexibility and can interact better 
with the user.  Foreign keys can be useful to enforce business-logic.  But not 
a substitute for programming which should check these things first.

However, that's just my own view.  I've seen rational articles written that 
argue that every part of business logic possible should be included in your 
database schema: constraints, foreign keys, triggers, and all.  And that your 
app should rely on those doing their jobs rather than having each app perform 
its own checks.  It's a matter of opinion.

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

Reply via email to