Jean-Christophe Deschamps wrote:
> Let me ask this by mere curiosity.
> 
> SQLite will accept and process the following:
> 
> CREATE TABLE x (a CHAR PRIMARY KEY);
> CREATE TABLE y (a CHAR PRIMARY KEY);
> CREATE TABLE z (a CHAR REFERENCES x(a) REFERENCES y(a));
> 
> I didn't check if the last FK is even valid normative SQL and that 
> isn't the heart of my question.
> 
> Does anyone see a use for such construct, or even uses such contruct in 
> real world?  That seems weird to me.

There's nothing wrong with what you did from a design standpoint.  You're just 
saying that you can only have a z record when you have both corresponding x and 
y records.  I'm sure there are various business rules that this would 
effectively model. -- Darren Duncan
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to