This topic is locked

Basic Newbie Question - Database constraints vs. Code

8/3/2011 3:20:08 PM
PHPRunner General questions
mcebula author

Hi all, I toyed around with PHPRunner last year but it was really just evaluating the product as a test drive. I will soon be starting to build a new system for our analysis team to store our system artifacts such as business rules, data elements, etc. I'm an analyst not a developer so forgive my newbie question. I just want to be sure to get off on the right foot here before I dive in <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=17489&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />
I have my database structures setup in Oracle but haven't started anything yet in PHPRunner. I have a bunch of lookup tables (code and description) that I want to tie to other tables so values can only come from the lookup table. Pretty common stuff.
Is this the sort of thing I need to put into the database as constraints so they act as a fail safe to protect the integrity of the data or should I leave the database pretty basic (just primary keys?) and let PHPRunner code to handle everything regarding tying drop down lists to lookup tables?

C
cgphp 8/3/2011

Mike,
set for others table a foreign key for code and description. That's all. Make the remaining work in PHPr.
I Hope I have understood your question.

mcebula author 8/4/2011

Yes thanks. So I will set those lookup table 1-to-many relationships at the database level.