in reply to Building an SQL query

I think I would start off by deciding what data are 1:1 -- that is what should you put into the main table. For example:
create table person_data ( id_no int NOT NULL, surname varchar(100) NOT NULL, given_name varchar(100) NOT NULL )

And then tables consisting of 1:many data such as email addresses, phone numbers, etcetera. For example:

create table person_email ( id_no int NOT NULL email_address varchar(100) NOT NULL )
I recommend the use of a surrogate key (i.e. the id_no) because the person's name (the natural key) is subject to change. By using a stable surrogate key, you avoid having to change the key because it stays with the record until deleted.

By using a 1:many table, you have the flexibility of dealing with multiple phone numbers or email addresses. By placing each in a separate row, you avoid the situation where you have multiple values in one field, which is a violation of First Normal Form, and of course by extension, Third Normal Form.

Why worry about normality? Because the power of a relation database lies in the elimination of redundancy, thereby increasing data integrity, and reducing time spent in maintenance. And as a previous reply pointed out, when you get to the point where you are using DBI::DBD to extract the information, you have fewer steps you need to take with Perl.

Good Luck

-----
"Computeri non cogitant, ergo non sunt"