need help conceptualizing my first mySQL database

2002-06-26 Thread Timothy J. Luoma


I'm trying to figure out how to setup my first mySQL DB... I hope this
isn't too OT for this list.

The DB will serve several purposes, which I think will each go into a
different table w/in one DB.

Here's what I want to be able to accomplish:

pull up a listing of:
1) names and email addresses
2) names and real address
3) name and two-static (static per UID) URLs
4) Names of special people in their lives and events (for example, show me
the listing for Tim Luoma and all the special events he has entered and
who they apply to)
5) Pull out all special events of a given type (one of 4 pre-defined
types, i.e. show me all birthdays, show me all anniversaries, etc)
6) Pull out ALL special events for a given day (where day is a number
1-366 where 1 = Jan 01 and June 26 = 178, etc)
7) Pull up a listing of the entire year showing month, day, real name,
special event, and who the event is for, ie
may 28  Tim Luoma   Ethan   birthday
((that would show that Ethan's birthday was 5/28 and Ethan relates to Tim
Luoma))



The DB will include:
1) Real name
2) Email
3) Address (some non-US)
4) several URLs (0-10)
[here's where it gets tricky for my brain]
5) a field for spouse/SO [may be empty]
6) A list of several special events in their life and the people they
apply to (*)

Re: #6 for example, for me this would be

Tim Luoma
[EMAIL PROTECTED]
10 main st springfield ma 12345
http://url.to.somewhere
http://www.other.url
http://www.tntluoma.com
http://www.peak.org/~luomat/
Tracey (wife)
Ethan (son)
Tracey's birthday 1/5
Ethan's birthday 5/28
Our anniversary 6/17
My birthday 3/28
Some other special event 6/17
other event 2/13
other event 12/17

Now the trick, to me, is that there may be any number of special events
and any number of people they may apply to.  One person may have 10,
others may have 1, a very few might have none (g )  They also may
not have a spouse or a child, or they might have 10 (it could happen).
And some of the events may be on the same date (rare but possible).  They
also may not all have homepages or other URLs that I need to store.

Now from my feeble understanding of how this all works, I need one main DB
with several tables.  Each person should have a unique ID (3 digits
enough?  There are only 50 people I'm dealing with right now and in my
wildest dreams I can't imagine it ever breaking 1000 people... we're a
small, closed mailing list and we argue whether or not to go to 55 over 53
members.)

Anyway, tables, as I see them, might break down this way:

mainTable
UID
Real Name
Email Address

locationTable
address
location url1
location url2

familyTable
(for each person in familyTablethere would be up to 0-4 events for each
person: bday, anniv, adopt, rb)
Spouse
other01
other02
other03
other04
other05
other06
other07
other08
other09
other10
other11
other12
other13
other14
other15
other16
other17
other18
other19
other20
[now very few people would have that many, but it's enough that no one
should have more]

For example, for me it would be:
bdayanniv   adopt   rb
3/286/17

another entry might be:
bdayanniv   adopt   rb
2/1312/15

Does this sound logical?  Am I missing anything?

TjL, still waiting for Amazon to deliver his copy of the Welling  Thomson
book :-)


-- 
Timothy J. Luoma
mailto:[EMAIL PROTECTED]http://www.tntluoma.com
mysql Ver 11.17 Distrib 3.23.49a, for pc-linux-gnu (i686)
Apache/1.3.26 (Unix) PHP/4.2.1 mod_gzip/1.3.19.1a




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Understanding relational database setup/construction

2002-06-22 Thread Timothy J. Luoma


I've looked through Google and the MySQL website without luck.

I'm looking to find a place which discusses the theory of how one should
create a database, how to organize the information, etc.

There's got to be a good site out there, but I'm obviously plugging in the
wrong search terms or something.

Thanks
TjL




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




file not found error when trying to import CSV to database table

2002-03-21 Thread Timothy J. Luoma


Hello,

I am painfully new to mySQL (I'm working on my first database), so my
apologies if I ask something stupid.

I am using phpMyAdmin 2.2.0 to connect to MySQL 3.23.36

I have a database named aro with a table specialdays

I have a CSV that I want to import to the 'specialdays'

I went to the link for 'add textfile into tables' and gave it the location
of the textfile (which is on my local Win32 system.  The mySQL is on my
webhost (redhat Linux)).

I entered a ',' in the fields terminated by and hit 'submit' and the
result was:

LOAD DATA LOCAL INFILE '/tmp/phpBrUPIG' INTO TABLE `specialdays` FIELDS
TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY
'\r\n'

MySQL said:

File '/tmp/phpBrUPIG' not found (Errcode: 0)


I'm not sure what I'm doing wrong, or if perhaps phpMyAdmin is configured
incorrectly (I'm not the sysadmin).

Any pointers appreciated
Thanks for your patience

TjL

ps -- I have some general understanding databases type questions.  Where
would be a good place to ask those?



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php