Shawn,
I agree with you that the tables can have different info with regard to
the requirements.
But for storing only addresses for specific students, this 4 table design
seems weirdish to me... I think it makes more sense to keep a
student_id in the Addresses table...
With regards,
Martijn Ton
"Martijn Tonies" <[EMAIL PROTECTED]> wrote on 05/24/2005 02:32:05 PM:
>
>
>
> > Something like this would make more sense to me and provide greater
> flexibility;
>
> It doesn't to me...
>
> > student
> >
> > student_id
> > name
> > age
> >
> > address
> > ---
> >
You probably want to add type to both the address and phone tables. Then you
can be selective in your reporting and still get 1 row per student in your
result set. Just remember if your data has the possibility of not having the
information for a student you want to use LEFT JOIN's vs INNER JOIN's
> Something like this would make more sense to me and provide greater
flexibility;
It doesn't to me...
> student
>
> student_id
> name
> age
>
> address
> ---
> address_id
> street_name
> city
> state
> zip
What addresses are these? Random addresses where a studen
From: Mike Johnson [mailto:[EMAIL PROTECTED]
> From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
>
> > the problems is, when I want to query both student, address
> > and phone num, the sql will be
> >
> > select * from student s, address a, phone_num n
> > where s.student_id = a.sudent_id
> > and
From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
> Hi, here is the case:
>
> one student may have more than one address, and one student
> may have more than one phone number
>
> so the db would be:
>
> student
>
> student_id
> name
> age
>
> address
> ---
> address_
Koon Yue Lam,
If you running your MySQL on Windows, you may try to use one of the
reporting tools, like Crystal Report, to create your reports.
Generally these tools allow to hide repetitive data in its reports
Mikhail Berman
-Original Message-
From: Koon Yue Lam [mailto:[EMAIL PROTECTE
Something like this would make more sense to me and provide greater flexibility;
student
student_id
name
age
address
---
address_id
street_name
city
state
zip
phone_num
--
phone_num_id
num
extension
type (cell, home, etc)
primaryNumber (yes/no)
stud
That worked like a charm, thanks so much! I don't know why I didn't try
that before!
Julian
At 02:46 PM 11/21/2003 -0600, Paul DuBois wrote:
At 10:56 -0500 11/21/03, Julian Zottl wrote:
Andy,
Thanks for responding. I think that I am going to go with the idea of
creating a tale for each day. M
ql List
Subject: RE: DB design question - shell scripting...
At 10:56 -0500 11/21/03, Julian Zottl wrote:
Andy,
Thanks for responding. I think that I am going to go with the idea
of creating a tale for each day. My thoughts were to write a shell
script to do this for me, but I am running into a pr
Wouldn't this also work?:
mysql -u root -p -e "CREATE TABLE t$date(...)" yourdatabase
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 12:46 PM
To: Julian Zottl; Andy Eastham; Mysql List
Subject: RE: DB design question -
At 10:56 -0500 11/21/03, Julian Zottl wrote:
Andy,
Thanks for responding. I think that I am going to go with the idea
of creating a tale for each day. My thoughts were to write a shell
script to do this for me, but I am running into a problem: I wrote
the following:
#!/bin/sh
date=`date "+%m%
[EMAIL PROTECTED]>
To: "Andy Eastham" <[EMAIL PROTECTED]>; "Mysql List"
<[EMAIL PROTECTED]>
Sent: Friday, November 21, 2003 7:56 AM
Subject: RE: DB design question - shell scripting...
> Andy,
> Thanks for responding. I think that I am going to go with the ide
Andy,
Thanks for responding. I think that I am going to go with the idea of
creating a tale for each day. My thoughts were to write a shell script to
do this for me, but I am running into a problem: I wrote the following:
#!/bin/sh
date=`date "+%m%d%Y"`
export date
mysql -u root -p < createdb.
Julian,
Your design is sound in my opinion. An area you probably need to consider
is when you need to search across a day boundary.
You will need to make the application aware that it needs to search across a
day boundary, so that it searches two tables with a union where necessary.
It will also
15 matches
Mail list logo