Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate Data in MySQL 1

Status
Not open for further replies.

OneArk

Technical User
Jul 25, 2008
12
CA
Hello,
I am new to (MySQL 5.5/Apache/PHPMyadmin) I am also using Toad when I work on the localhost (just because I have it).

I would like to get direction of what to search for, or research. In other words I am unable to find the right terminology for my search, which so far is not giving me any success.

Goal: Create workstations inventory table that would include many pieces of information about client workstations/servers. Table name is inventory.systemlist

So far: I created a bunch of other tables such as operating systems, applications,..etc for validation "If there is a better way to validate the data, I am open to suggestions".

Problem: How to force the selection of the OS record to be from one of OSs existing in the operating systems table. something like the equivalent of lookup display control/row source in MS access.
 
that devx article just discusses joins, with no information about how to set up foreign keys, which is what oneark is looking for

relational integrity is what foreign keys enforce

for instance, you will not be allowed to enter a row in the inventory.systemlist table unless this row has a value for the operating system that is one of the values in the operating systems table

try this article (old, but still okay) --
Relational Integrity

or do a web search with "using foreign keys for relational integrity"

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
Thanks Tarn and R937 for the direction, I will research and if there is a problem I will post again. I appreciate your advice.
 
Another term that this goes by is:

Referential Integrity
 
God bless you all, works like a charm.
Happy New Year.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top