On 14 Oct 2017, at 10:30am, Csányi Pál <[email protected]> wrote:

> With which constraints can one create a foreign key to
> first: get one to one relationship, and
> second: one to many relationship?

Foreign keys always implement a one-to-many relationship.

You could enforce a one-to-one relationship by using one foreign key in each 
direction.  But there could be problems when getting the data in in the first 
place — which one do you put in first ?

<https://sqlite.org/foreignkeys.html>

If you have problems with the above page, please post again.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to