Reply to Maintain and Manage DB relationships

Your name:

Reply:


Posted by Aggelos on 12/20/06 23:49

Hello, I am trying to develop a class that I will be able to maintain
my relationships dynamically.
For example I have the class employee and class company
an employ has a Foreign Key companyId which I name it $FK_companyId
What I am doing is in my constructor I define how I would like to treat
the relationships.
so:
class employee {
var $employeeId;
var $companyId;
var $FK_companyId;
function employee() {
$this->FK_companyId['onDelete'] = 'restrict';
$this->FK_companyId['onUpdate'] = 'recurse';
}

}

Thats just a thought and it is sort of working but not in every
occasion. I am not going to add the whole class as I just want to give
you an Idea of what I am thinking.

My question is if you know something that has allready been done and I
am not aware of and can be used to define the relationships and
maintain them.

Any Ideas of a class or development pattern to do something like that ?

How do you keep your referential integrity in a MySQL MyISAM table ?

Thank you guys, I know I am probably overcomplicating things but I want
to know if there is a common development pattern that's been used to do
that.

Angelos.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация