On Fri, Feb 08, 2002 at 06:10:34PM -0000, DL Neil wrote: > There are some RDBMS-es that implement SQL to the point of apparently setting up a >construct that links tables - > foreign key based data integrity being the first example that springs to (my) mind. >However relational logic > suggests that the way to set up a linkage between tables is to show this in dynamic >logic - your SQL statement, > eg > > SELECT * > FROM tbl1, tbl2 > WHERE tbl1.PrimaryKey = tbl2.ForeignKey; > > will produce a result-row for every intersection 'match' between the two tables. > > One of the MAJOR advances of relational databases over their predecessors was this >move 'away' from structural > 'connections'. However these have been maintained as 'features' by some, usually to >promote speed/efficiency.
Speed/efficiency is a minor issue. Integrity constraints are used to prevent people from writing queries that violate relational integrity rules; e.g. create orphan records. And integrity constraints are unrelated to joins, except in the most incidental way. It is possible to use them to create joins, but that's not why they're built into databases. Bob Hall -- Database --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php