[dba-SQLServer] Relation integrity constraints

Mark Breen marklbreen at gmail.com
Wed Feb 29 14:32:31 CST 2012


Hello John,

My understanding is

1) Yes, it is true, you can do it when you are designing the tables but I
always find it easier to drag and drop on the diagram.

2) You will see the FK relationships when you look at the Keys in the
table.  If you play with that, you will see that you can actually build the
PK / FK at table design stage if you really desired to do so.

Is that ok?

Mark

On 29 February 2012 16:07, jwcolby <jwcolby at colbyconsulting.com> wrote:

> I have used database diagrams to create relationships between FK / PK
> pairs in tables such as client / product etc.  My understanding is that
> such relationships create constraints, IOW enforce relational integrity by
> ensuring that parents cannot be deleted while child records exist and so
> forth.
>
> First of all, is this true?
>
> Second, where are these constraints stored?  I can see constraints in the
> table itself, but these seem to be "value" kind of constraints, i.e.
> Disallow zero length and the like.  Where is the "parent / child
> relationship info stored?
>
> Thanks,
>
> --
> John W. Colby
> Colby Consulting
>
> Reality is what refuses to go away
> when you do not believe in it
>
> ______________________________**_________________
> dba-SQLServer mailing list
> dba-SQLServer@**databaseadvisors.com <dba-SQLServer at databaseadvisors.com>
> http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver<http://databaseadvisors.com/mailman/listinfo/dba-sqlserver>
> http://www.databaseadvisors.**com <http://www.databaseadvisors.com>
>
>


More information about the dba-SQLServer mailing list