Re: General DB Design Question - How to avoid redundancy in table relationships

2006-02-14 Thread Bob Gailer
Scott Klarenbach wrote: These are the tables in question: RFQ (Request for Quote) Part Inventory Inventory items ALWAYS have a partID. RFQ items ALWAYS have a partID. However, sometimes, RFQ items have an inventoryID as well. Now, we have a redundancy problem. Because, in those instances

General DB Design Question - How to avoid redundancy in table relationships

2006-02-13 Thread Scott Klarenbach
These are the tables in question: RFQ (Request for Quote) Part Inventory Inventory items ALWAYS have a partID. RFQ items ALWAYS have a partID. However, sometimes, RFQ items have an inventoryID as well. Now, we have a redundancy problem. Because, in those instances when the RFQ has an

Re: General DB Design Question - How to avoid redundancy in table relationships

2006-02-13 Thread Peter Brawley
Scott, I'm sure this type of problem is run up against all the time, and I'm wondering what the best practice methodology is from experienced DBA's. It looks like the kind of problem database schemas are meant to _avoid_. >From your description it seems you have ... part ( partID PRIMARY

DB design question

2005-05-24 Thread Koon Yue Lam
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_id student_id street_name phone_num -- student_id num

RE: DB design question

2005-05-24 Thread Bartis, Robert M (Bob)
, May 24, 2005 1:34 PM To: mysql@lists.mysql.com Subject: DB design question 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_id

RE: DB design question

2005-05-24 Thread Berman, Mikhail
PROTECTED] Sent: Tuesday, May 24, 2005 1:34 PM To: mysql@lists.mysql.com Subject: DB design question 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

RE: DB design question

2005-05-24 Thread Mike Johnson
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_id student_id

RE: DB design question

2005-05-24 Thread Mike Johnson
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 s.student_id

Re: DB design question

2005-05-24 Thread Martijn Tonies
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 student _might_

RE: DB design question

2005-05-24 Thread Gordon
PROTECTED] Sent: Tuesday, May 24, 2005 12:34 PM To: mysql@lists.mysql.com Subject: DB design question 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

Re: DB design question

2005-05-24 Thread SGreen
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 --- address_id street_name

Re: DB design question

2005-05-24 Thread Martijn Tonies
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

Simple DB design question

2004-09-03 Thread sean c peters
I have some data that is stored by the year it is related to. So I have one table that stores the Year the data is related to, among other things. At any given time, 1 year is considered the 'active year', and the rest are considered inactive. The table is something like: CREATE TABLE

Re: Simple DB design question

2004-09-03 Thread Jeff Mathis
I've got a history table that performs a similar function. except in my case I can have more than 1 active row. I put in an is_active column and defined the type as a bool. an enum is actually a String in mysql, which i didn't want to deal with. This table has only a few thousand rows, so

RE: DB design question - shell scripting...

2003-11-24 Thread Julian Zottl
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.

RE: DB design question - shell scripting...

2003-11-22 Thread Chris
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 - shell scripting

RE: DB design question - shell scripting...

2003-11-22 Thread Paul DuBois
: 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 problem: I wrote

DB design question

2003-11-21 Thread Julian Zottl
Hello all, I am designing a database right now that will have between 300-400k inserts per day. I need to keep this information for approximately 3 months and will probably do 5-10 reads on the data set per day. I've been storing it in one table up to now (only col.), but the searches are

RE: DB design question

2003-11-21 Thread Andy Eastham
] Subject: DB design question Hello all, I am designing a database right now that will have between 300-400k inserts per day. I need to keep this information for approximately 3 months and will probably do 5-10 reads on the data set per day. I've been storing it in one table up to now (only col

RE: DB design question - shell scripting...

2003-11-21 Thread Julian Zottl
the earliest or latest available table, and if so, modify the union so that you don't try to search a non-existent table. Hope this helps, Andy -Original Message- From: Julian Zottl [mailto:[EMAIL PROTECTED] Sent: 21 November 2003 12:03 To: [EMAIL PROTECTED] Subject: DB design question

Re: DB design question

2003-11-21 Thread William Fong
] 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 idea of creating a tale for each day. My thoughts were to write a shell

RE: DB design question - shell scripting...

2003-11-21 Thread Paul DuBois
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

A DB Design Question

2002-06-06 Thread Michael Ivanyo
I would like to set up a MySql database that will store distance information for a milage lookup program. The user will enter the origin city and the destination city for some predefined trips. Then the query will need to return the milage broken down by state. For example, for an origin city

Sort-of theoretical db design question

2001-07-28 Thread Ben Bleything
Hello all! I have a question for all of you... I would very much appreciate your input. I'm building a database for a radio station. The database must allow the DJ to enter what they play and when, and allow the program director to create weekly reports for the record labels. I'm wrestling

Re: Sort-of theoretical db design question

2001-07-28 Thread Tim Wilde
I'm building a database for a radio station. The database must allow the DJ to enter what they play and when, and allow the program director to create weekly reports for the record labels. [snip] First, to maintain a single table with every bit of track data there is (ie, title, artist,

RE: Sort-of theoretical db design question

2001-07-28 Thread Ben Bleything
-of theoretical db design question I'm building a database for a radio station. The database must allow the DJ to enter what they play and when, and allow the program director to create weekly reports for the record labels. [snip] First, to maintain a single table with every bit of track data

Re: Sort-of theoretical db design question

2001-07-28 Thread Joshua J. Kugler
The rule of normaliztation is (usually) if you have data repeated in a table, you need another table. So here's how *I* would do it. A table for each: DJ's, Albums, Artists, Genres (a category table of sorts), and Tracks. You might even want a table for record companies, so that's not

Re: Sort-of theoretical db design question

2001-07-28 Thread joseph . bueno
Ben Bleything wrote: Hello all! I have a question for all of you... I would very much appreciate your input. I'm building a database for a radio station. The database must allow the DJ to enter what they play and when, and allow the program director to create weekly reports for the

RE: Sort-of theoretical db design question

2001-07-28 Thread Don Read
On 28-Jul-2001 Ben Bleything wrote: Hello all! I have a question for all of you... I would very much appreciate your input. I'm building a database for a radio station. The database must allow the DJ to enter what they play and when, and allow the program director to create weekly

Re: Sort-of theoretical db design question

2001-07-28 Thread ryc
When you are designing a database and you are thinking about creating a comma delimted list, this is a good sign that you need to rethink your design. Bitfields are a good option, however if you ever need to add elements to the bitfield (ie bitfield A can signify the presence of 4 elements, but

RE: Sort-of theoretical db design question

2001-07-28 Thread Sander Pilon
So you're saying like this...? Albums -- ID,Artist,Title,Label Tracks -- Title,Length,TrackNumber,AlbumID Where there is one album table and one track table, and each track references back to the album that it is a member of? I'm liking that... It doesn't make it easy