dbTalk Databases Forums  

Re: foreign key constraint versus referential integrity constraint

comp.databases.theory comp.databases.theory


Discuss Re: foreign key constraint versus referential integrity constraint in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #81  
Old   
paul c
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-28-2009 , 10:04 PM






Mr. Scott wrote:
....
Quote:
Constraints specify what can be true, not what is supposed to be true.
...
I thought constraints constrain, ie., limit. (I've often thought that
isn't enough in practice, eg., I've never seen a default defined
algebraically and beyond that I wouldn't mind a variation on constraints
that lets me force an assertion, eg., some tuple that is always present,
whether the user has thought to include it or not, probably CJ Date
would disagree with that.)

Reply With Quote
  #82  
Old   
Bob Badour
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-28-2009 , 10:09 PM






paul c wrote:

Quote:
Mr. Scott wrote:
...

Constraints specify what can be true, not what is supposed to be true.
...

I thought constraints constrain, ie., limit. (I've often thought that
isn't enough in practice, eg., I've never seen a default defined
algebraically and beyond that I wouldn't mind a variation on constraints
that lets me force an assertion, eg., some tuple that is always present,
whether the user has thought to include it or not, probably CJ Date
would disagree with that.)
I cannot make sense of what you wrote. I suspect you have omitted much
context, internal dialogue and assumptions.

Reply With Quote
  #83  
Old   
paul c
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-28-2009 , 10:14 PM



Bob Badour wrote:
Quote:
paul c wrote:

Mr. Scott wrote:
...

Constraints specify what can be true, not what is supposed to be
true. ...

I thought constraints constrain, ie., limit. (I've often thought that
isn't enough in practice, eg., I've never seen a default defined
algebraically and beyond that I wouldn't mind a variation on
constraints that lets me force an assertion, eg., some tuple that is
always present, whether the user has thought to include it or not,
probably CJ Date would disagree with that.)

I cannot make sense of what you wrote. I suspect you have omitted much
context, internal dialogue and assumptions.
I usually try to omit at least two out of three of those, otherwise even
I can't guess what I'm talking about! Being of a minimalist persuasion,
not wanting more concepts than I can handle, I think I'd rather have
constraints, unlike CJ Date's, that are applied against values without
requiring them to be 'truth-valued' and 'and-ed' if you will. I don't
have a good name for this.

Reply With Quote
  #84  
Old   
Mr. Scott
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-28-2009 , 11:18 PM



"paul c" <toledobythesea (AT) oohay (DOT) ac> wrote

Quote:
Mr. Scott wrote:
...
Constraints specify what can be true, not what is supposed to be true.
...

I thought constraints constrain, ie., limit. (I've often thought that
isn't enough in practice, eg., I've never seen a default defined
algebraically and beyond that I wouldn't mind a variation on constraints
that lets me force an assertion, eg., some tuple that is always present,
whether the user has thought to include it or not, probably CJ Date would
disagree with that.)
A proposition either can be true or can't be true. Specifying what can be
true also specifies what can't; likewise, specifying what can't be true also
specifies what can.

Reply With Quote
  #85  
Old   
Mr. Scott
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-28-2009 , 11:32 PM



"paul c" <toledobythesea (AT) oohay (DOT) ac> wrote

Quote:
Mr. Scott wrote:

... Table definitions are constraints. View definitions are queries.
...

I detect some mysticism here. There has to be a reason to distinguish b
between 'table' and 'view' this way, otherwise we don't need both terms.
What is the reason (or reasons)?
There is nothing mystical here. Constraints specify what can and cannot be
assigned a positive truth value, they do not specify what has been assigned
a positive truth value. Queries manipulate what has been assigned a
positive truth value or what can be derived from what has been assigned a
positive truth value.

Reply With Quote
  #86  
Old   
Bob Badour
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-29-2009 , 09:30 AM



paul c wrote:

Quote:
Bob Badour wrote:

paul c wrote:

Mr. Scott wrote:
...

Constraints specify what can be true, not what is supposed to be
true. ...

I thought constraints constrain, ie., limit. (I've often thought that
isn't enough in practice, eg., I've never seen a default defined
algebraically and beyond that I wouldn't mind a variation on
constraints that lets me force an assertion, eg., some tuple that is
always present, whether the user has thought to include it or not,
probably CJ Date would disagree with that.)

I cannot make sense of what you wrote. I suspect you have omitted much
context, internal dialogue and assumptions.

I usually try to omit at least two out of three of those, otherwise even
I can't guess what I'm talking about! Being of a minimalist persuasion,
not wanting more concepts than I can handle, I think I'd rather have
constraints, unlike CJ Date's, that are applied against values without
requiring them to be 'truth-valued' and 'and-ed' if you will. I don't
have a good name for this.
If not truth-valued, what would they be? Either something passes the
constraint or it doesn't.

Reply With Quote
  #87  
Old   
paul c
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-29-2009 , 06:58 PM



Bob Badour wrote:
Quote:
paul c wrote:
....
I usually try to omit at least two out of three of those, otherwise
even I can't guess what I'm talking about! Being of a minimalist
persuasion, not wanting more concepts than I can handle, I think I'd
rather have constraints, unlike CJ Date's, that are applied against
values without requiring them to be 'truth-valued' and 'and-ed' if you
will. I don't have a good name for this.

If not truth-valued, what would they be? Either something passes the
constraint or it doesn't.
Sorry, I've forgotten what I was driving at, I was remembering some
notes I made months ago but can't find them right now. I'm sure the
notions will come back to me in a day or two. (Natch', I'm also sure you
aren't holding your breath!)

Reply With Quote
  #88  
Old   
compdb@hotmail.com
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-30-2009 , 08:11 PM



On Oct 28, 8:04*pm, paul c <toledobythe... (AT) oohay (DOT) ac> wrote:

Quote:
Mr. Scott wrote:
Constraints specify what can be true, not what is supposed to be true.
Relational dbms constraints restrict updates to valid database states.
They are logically redundant. Variable predicates and (the history of)
the
world fully determine valid database states.

Quote:
I thought constraints constrain, ie., limit. (I've often thought that
isn't enough in practice, eg., I've never seen a default defined
algebraically and beyond that I wouldn't mind a variation on constraints
that lets me force an assertion, eg., some tuple that is always present,
whether the user has thought to include it or not, probably CJ Date
would disagree with that.)
1.Constraint (v union relation{t}) = v // variable v must always
contain tuple t
2.You have to start the dbms with its database in a valid state.
So before the user may query, the designer and/or user have to
assign initial values for variables so that all constraints are met.
So any values given by the designer (which might be all of them) would
be
your defaults.

In oo, establishing such a valid initial state is called construction
or initialization. All module-based programming languages (have to)
have such a phase in a module's life.

An application is a finite state machine, ie a variable with permitted
update
operators with permitted sequences of calls. You have to understand
this in order to actually describe or understand how any application
behaves.
More simple fundamental computing theory orthogonal to the relational
model.

philip

Reply With Quote
  #89  
Old   
Reinier Post
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-31-2009 , 06:02 PM



Mr. Scott wrote:

Quote:
[...] Constraints specify what can and cannot be
assigned a positive truth value, they do not specify what has been assigned
a positive truth value. Queries manipulate what has been assigned a
positive truth value or what can be derived from what has been assigned a
positive truth value.
Formally: a database instance is a set of named relations,
i.e. a mapping from names to relations.
A database is a set of possible database instances, such that
each instance maps the same names to relations with, per name, the same signature.
It is defined by a database schema (which maps each relation name to its signature)
and database constraints (which limit the possible combinations of relations
to which the names are mapped). (I can go on and define 'signature', etc.)
A database constraint is a predicate on database instances.

A 'table' (in this context) is a named relation in a database instance,
or perhaps a database restricted to that name (i.e. a relation name mapped to
the set of all possible values for that relation).

A 'view' (in this context) is a named mapping from database instances to relations.

--
Reinier

Reply With Quote
  #90  
Old   
Mr. Scott
 
Posts: n/a

Default Re: foreign key constraint versus referential integrity constraint - 10-31-2009 , 08:39 PM



"Reinier Post" <rp (AT) raampje (DOT) lan> wrote

Quote:
Mr. Scott wrote:

[...] Constraints specify what can and cannot be
assigned a positive truth value, they do not specify what has been
assigned
a positive truth value. Queries manipulate what has been assigned a
positive truth value or what can be derived from what has been assigned a
positive truth value.

Formally: a database instance is a set of named relations,
i.e. a mapping from names to relations.
A database is a set of possible database instances, such that
each instance maps the same names to relations with, per name, the same
signature.
It is defined by a database schema (which maps each relation name to its
signature)
and database constraints (which limit the possible combinations of
relations
to which the names are mapped). (I can go on and define 'signature',
etc.)
A database constraint is a predicate on database instances.

A 'table' (in this context) is a named relation in a database instance,
or perhaps a database restricted to that name (i.e. a relation name mapped
to
the set of all possible values for that relation).

A 'view' (in this context) is a named mapping from database instances to
relations.

--
Reinier
I really don't get what you're driving at. I also don't fully agree with
your characterization. What's the point you're trying to make?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.