dbTalk Databases Forums  

pro- foreign key propaganda?

comp.databases.theory comp.databases.theory


Discuss pro- foreign key propaganda? in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sinister
 
Posts: n/a

Default pro- foreign key propaganda? - 05-15-2008 , 05:27 AM






I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(



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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM






sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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

Default Re: pro- foreign key propaganda? - 05-15-2008 , 08:45 AM



sinister wrote:
Quote:
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql. The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys. So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql." Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.


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.