CREATE TABLE "deleteion" control
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Aug 19 22:39:34 CDT 2003
on 8/19/03 22:24, Andrew Sinning at andrew at learningware.com wrote:
> This next example is quite a bit more complex. Each question can have
> an 'Info,' an 'Intro', and a 'Hint', but as data is concerned, all three
> of these things are of the type 'Info'.
>
> In other words, in the table 'questions', the 3 fields 'infoId',
> 'introId' and 'hintId' all reference entries in the table 'info'.
>
> //questions
> CREATE TABLE questions
> ( qId UNIQUE NOT NULL,
> infoId REFERENCES infos.infoId ON DELETE SET_NULL,
> introId REFERENCES infos.infoId ON DELETE SET_NULL,
> hintId REFERENCES infos.infoId ON DELETE SET_NULL,
> )
For ObjectPtr simply
REFERENCES infos
> //infos
> CREATE TABLE infos
> ( infoId UNIQUE NOT NULL,\
> stemText varchar(1024) NOT NULL,\
> graphicId REFERENCES graphics ON DELETE SET_NULL,\
> soundId REFERENCES sounds ON DELETE SET_NULL
> )
>
>
> I don't think this is going to work without explicitly referencing the
> relationship, otherwise there will be ambiguity.
Absolutely correct!
And if you will try to do this, Valentina will return you error "ambiguity"
> Furthermore, I'm not sure the syntax "introId REFERENCES infos.infoId"
> is correct.
This is correct syntax for standard SQL and RDBMs.
ObjectPtr differ. It point NOT on some field, but on the whole Table.
REFERENCES infos
> Any thoughts on what I'm getting at? I hope I'm not turning this into a
> free tutorial on relational dbs. I've just never been exposed to this
> concept.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list