On 23 Mar 2011, at 11:39am, Sam Carleton wrote:

> My goal in adding foreign keys (FK) is simple:  Implement referential
> integrity (RI) at the database level, that way I don't shoot myself in the
> foot later (I am the only developer at this time). [snip]

That's fine.

> So what I am wondering is: Does the act of creating FK also result in the
> correct indexes being created to make the RI checks speedy?

No, you have to do it yourself.  See the beginning of section 3 of

<http://www.sqlite.org/foreignkeys.html>

for how SQLite will produce an error if an appropriate index cannot be found.

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

Reply via email to