help with DB design / query please !

2008-04-08 Thread Nacho Garcia
hello, im trying to make a DB for a message system. the best way i have made is this: *TABLE conversations* (informacion de cada conversacion) . i*d_conversation (bigint) count(smallint) updated every time a new message is

Re: Help with db design

2008-04-07 Thread Richard Jones
Baron Schwartz wrote: Hi, This is a fine place to ask such questions. (In general you can just ask first, and people will tell you if you're off-topic). OK, thanks - I've posted the details to a new subject earlier today but it doesn't seem to have showed up yet. -- Richard Jones --

Re: Help with db design

2008-04-06 Thread Baron Schwartz
Hi, On Wed, Apr 2, 2008 at 5:10 PM, Richard Jones [EMAIL PROTECTED] wrote: Hi, I have a complex legacy application with around 30 tables which is in need of re-factoring, as there are tables with lots of nulls. I've partially managed to achieve this so that my queries mostly return correct

Help with db design

2008-04-02 Thread Richard Jones
Hi, I have a complex legacy application with around 30 tables which is in need of re-factoring, as there are tables with lots of nulls. I've partially managed to achieve this so that my queries mostly return correct information. But there are some circumstances where duplicate data is

Re: db design

2008-03-17 Thread Sebastian Mendel
Brett Harvey schrieb: which method is better to do. I have 5 tables. They represent sections/parts of a companies standards. There are 13 main categories, each of those categories has subsections (some with 3, some with 10 or more), those subsections have subsections, etc. Which table

db design

2008-03-15 Thread Brett Harvey
which method is better to do. I have 5 tables. They represent sections/parts of a companies standards. There are 13 main categories, each of those categories has subsections (some with 3, some with 10 or more), those subsections have subsections, etc. Which table design is better to do.

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

What's the optimal db design choice for my 400 000 entries?

2005-06-08 Thread Tommy Svensson \(InfoGrafix\)
Hi all you mysql gurus, I have 400 000 unique strings where each and every one of these strings are associated with 1 - 50 (appr.) integer values. Now, pretty simple for you guys I guess, but how will I design my database to make a search interface against this data as rapid as possible? My

Re: What's the optimal db design choice for my 400 000 entries?

2005-06-08 Thread SGreen
Tommy Svensson \(InfoGrafix\) [EMAIL PROTECTED] wrote on 06/07/2005 04:49:09 PM: Hi all you mysql gurus, I have 400 000 unique strings where each and every one of these strings are associated with 1 - 50 (appr.) integer values. Now, pretty simple for you guys I guess, but how will I

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
and s.student_id = n.student_id it won't provide a nice result as data of student are repeated in every row, address and phone_num's data are repeated in certain rows The output is not suitable for reporting and may I ask what is the better way of design to handle the above case ? It's good DB

RE: DB design question

2005-05-24 Thread Mike Johnson
= n.student_id it won't provide a nice result as data of student are repeated in every row, address and phone_num's data are repeated in certain rows The output is not suitable for reporting and may I ask what is the better way of design to handle the above case ? It's good DB

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

Re: A DB Design issue

2004-10-28 Thread SGreen
Maybe I am just being dense this morning but I am confused why you think that your nodes are different things depending on how many children they have (nodes, groups, entities, ahhh!)... If you have two sets of hierarchies that share the same nodes, you may want to build two trees

Re: A DB Design issue

2004-10-28 Thread Chris
Heh, I don't think you're being dense. I can barely understand what I meant. I'll try to clarify I bit more. What I have is a sequence of entities (for this example the entities will be letters). I'm trying to use MySQL to hold the possible combinations of entities. The unique entities in a

Re: A DB Design issue

2004-10-28 Thread SGreen
Your system sounds more like BNF (Backus-Naur Form) expression evaluator than a regular expression evaluator. Both are similar in that you can specify sequences of things (letters or words or symbols) to appear in certain orders and in certain quantities. Once a BNF or regex expression is

Re: A DB Design issue

2004-10-28 Thread Chris
Ok thanks a bunch, I'll take this information and see what I can come up with. Chris [EMAIL PROTECTED] wrote: Your system sounds more like BNF (Backus-Naur Form) expression evaluator than a regular expression evaluator. Both are similar in that you can specify sequences of things (letters or

A DB Design issue

2004-10-27 Thread Chris
Hi all, I'm designing a small database, it's essentially a tree-structure. I'm probably going to use a Modified Preorder Tree Traversal (On a side note, how is it different than an Unmodified Preorder Tree Traversal?). Each node will have children etc, and those will have children, etc. But

Re: many fields or many tables? (Understanding DB design)

2004-10-19 Thread SGreen
You have already gone a long way to describing your table structure by describing your data elements and their relationships to each other. Let me try to summarize you descriptions and see if I can show you how to translate your text descriptions into table descriptions. 1. There are things

Re: many fields or many tables? (Understanding DB design)

2004-10-19 Thread Timothy Luoma
On Oct 19, 2004, at 10:17 AM, [EMAIL PROTECTED] wrote: You have already gone a long way to describing your table structure by describing your data elements and their relationships to each other.  Let me try to summarize you descriptions and see if I can show you how to translate your text

Re: many fields or many tables? (Understanding DB design)

2004-10-19 Thread SGreen
Timothy Luoma [EMAIL PROTECTED] wrote on 10/19/2004 11:11:12 AM: On Oct 19, 2004, at 10:17 AM, [EMAIL PROTECTED] wrote: You have already gone a long way to describing your table structure by describing your data elements and their relationships to each other. Let me try to

many fields or many tables? (Understanding DB design)

2004-10-18 Thread Timothy Luoma
I have been tinkering with MySQL long enough to suit what modest needs I have had, but now I need to setup a new DB that is going to have more information in it, and I want to make sure that I am doing it the most efficient way for the long term. Surprisingly, I have not been able to find a

Re: many fields or many tables? (Understanding DB design)

2004-10-18 Thread SGreen
There are numerous advantages to going with the multiple table database you described. That is what we call a normalized data structure. Try searching again for terms like normalized, normalizing, and normal form for additional background. Add the terms tutorial, or overview to find web sites

Re: many fields or many tables? (Understanding DB design)

2004-10-18 Thread Brian
Timothy, Definately follow the advice that Shawn gave you. Doing it this way will make it easy to have any number of emails per person without have to know how many beforehand . Here's an example below: Table USERS: userid=15 fname='Timothy' lname='Luoma' Table EMAILS: userid=15

Re: many fields or many tables? (Understanding DB design)

2004-10-18 Thread Timothy Luoma
Ok, this makes a lot of sense now. (As usual, what seems like more work initially pays off in the end.) Here's a specific question. The parent project is called TiM. We will, at times, want to pull out information for *everyone*. But more often we will want to pull out information just from

Re: many fields or many tables? (Understanding DB design)

2004-10-18 Thread Brian
On Mon, 18 Oct 2004 17:49:22 -0400, Timothy Luoma [EMAIL PROTECTED] wrote: Ok, this makes a lot of sense now. (As usual, what seems like more work initially pays off in the end.) Here's a specific question. The parent project is called TiM. We will, at times, want to pull out

db design - keyword fields

2004-09-05 Thread leegold
I'm sure this is a common and simple situation: say I have a title, url, description fields, assume they makeup a record in one table named book_info. Say for each of this table's records I also need a keywords field (of type text) and I'll use a fulltext index on this field. Great, now the user

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

db design for hosting site

2004-08-31 Thread David T-G
' table (or the like) gets to be a million rows, but what I don't know about DB design would fill a book :-) This is a talkative list and I wouldn't be surprised to find lots of chatter back and forth on the matter, but I'll summarize what I learn and/or decide when the conversation or direct emails

Re: db design for hosting site

2004-08-31 Thread Martijn Tonies
structure. Unless you want to give each customers its own _database_ (not just tables in the same database). The latter seems more straightforward to me, and since it's a DB it shouldn't matter if the 'pictures' table (or the like) gets to be a million rows, but what I don't know about DB design

Re: db design for hosting site

2004-08-31 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martijn, et al -- ...and then Martijn Tonies said... % % Since I want the ability to mirror, it seems that I'll probably want one ... % really don't want to keep the files in the DB itself). I'm open to ideas % of why I wouldn't, though. % %

DB Design: performance question

2004-06-15 Thread Westrmi
Hi everybody, I'm newly subscribed so please be gentle :) I have a design problem whose solution seems to be directly linked to the MySQL way of handling joints. I created a table USER which manages all entities allowed to connect to the system. |---| |---| |PERSON |

Re: DB Design: performance question

2004-06-15 Thread SGreen
Subject: DB Design: performance question AM

Db design

2003-12-07 Thread Ron McKeever
Hello, I have a db(logs) that I have been working on. This db has tables that are created every month, they are Nov03,Dec03,Jan04, etc.. Each month/table has about 480,000,000 records. Data file is about 80GB the index file is about 40GB. Mysql/apache run on a Dell 2550 4gb ram 2cpu's OS - RH 9.

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

DB Design

2003-10-15 Thread Mahesh Tailor
New to the list . . . Running MySQL Server 3.23.58-1.72 on RedHat Enterprise AS. System has four 3GHz processors and 6GB RAM. I need some advise on what would be best way to approach this problem. This system is using snmpcollect to collect network statistics from about 1500 devices. The

RE: DB Design

2003-10-15 Thread Dan Greene
-Original Message- From: Mahesh Tailor [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 15, 2003 5:05 PM To: [EMAIL PROTECTED] Subject: DB Design New to the list . . . Running MySQL Server 3.23.58-1.72 on RedHat Enterprise AS. System has four 3GHz processors and 6GB RAM. I need some

Fwd: Re: DB Design

2003-10-15 Thread Taylor Lewick
Whats the goal with the Data? If it is graphing it then go with MRTG with RRDtool, which will keep about 550 days of SNMP data and produce graphs displaying a daily, weekly, monthly and yearly timeframe... Could do 1500 devices with probably less than 10 Gigs of space... You could then load the

RE: DB Design

2003-10-15 Thread Fortuno, Adam
Tailor [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 15, 2003 5:05 PM To: [EMAIL PROTECTED] Subject: DB Design New to the list . . . Running MySQL Server 3.23.58-1.72 on RedHat Enterprise AS. System has four 3GHz processors and 6GB RAM. I need some advise on what would be best way to approach

db design - the mythical 1:1 relation ?

2003-07-20 Thread Andreas
between the dusty covers of db-design textbooks or - more likely - am I just ignorant ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: db design - the mythical 1:1 relation ?

2003-07-20 Thread Michael Satterwhite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sunday 20 July 2003 09:03, Andreas wrote: Hi folks, how would you design a 1:1 relation ? I'd like to split an entities's attributes because they won't get equally frequently requested. So I can save memory and disk access time. The

DB Design

2003-07-19 Thread Andrew
is there a tool to view a schematic of a MySQL DB I don't mean the .sql file I mean a pretty chart type schematic :) Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: DB Design

2003-07-19 Thread Peter Brawley
, 2003 11:47 AM Subject: DB Design is there a tool to view a schematic of a MySQL DB I don't mean the .sql file I mean a pretty chart type schematic :) Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com

RE: DB Design

2003-07-19 Thread Andrew
this is exactly what I am looking for :) Is there a free one of these guys hanging around somewhere? Andrew -Original Message- From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: 19 July 2003 17:50 To: MySQL-Lista Subject: Re: DB Design You probably don't mean the $Nk tools

RE: DB Design

2003-07-19 Thread olinux
July 2003 17:50 To: MySQL-Lista Subject: Re: DB Design You probably don't mean the $Nk tools (PowerDesigner, ERWin, Rational Rose c). MS Visio does it, but Dezign (http://www.datanamic.com/dezign/) does it better cheaper IMO (no I'm not a principal). PB - - Original Message

DB design tool for mySQL

2002-07-16 Thread Hassan Akbar
Can anyone suggest free database desiging tool that supports mySQL. Case studio 2.9 demo version supports mySQL but it does not allow more than 6 Tables to be designed. Moreover demo version does not give option for referential integrity constraints. i.e. scripts are generated without Foreign

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

Re: db design questions

2001-07-07 Thread Siomara Pantarotto
. Siomara Hope that wasn't too long winded. :) Roger - Original Message - From: Siomara Pantarotto [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 06, 2001 5:07 PM Subject: Re: db design questions Hi, Try to keep the simple attributes in one table

db design questions

2001-07-06 Thread Ed Peddycoart
, Address, Phone, Email, Marital Status, Spouse, kids, things like that and a field for comments submitted from the various people. Right now I have a single table with a record for each item I want to store. Is that an acceptable way? What are some websites which contain some basic information on DB

Re: db design questions

2001-07-06 Thread Siomara Pantarotto
sample. good luck Siomara From: Ed Peddycoart [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Subject: db design questions Date: Fri, 6 Jul 2001 10:25:42 -0700 I am working on a website which will make use of a MySQL database. I know little if anything about the best way to design my db

Re: db design questions

2001-07-06 Thread Siomara Pantarotto
sorry I typed my website wrong. The right url is: www.geocities.com/hisiomara From: Siomara Pantarotto [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: db design questions Date: Fri, 06 Jul 2001 18:07:36 -0300 Hi, Try to keep the simple attributes in one table

Re: db design questions

2001-07-06 Thread Roger Ramirez
too long winded. :) Roger - Original Message - From: Siomara Pantarotto [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 06, 2001 5:07 PM Subject: Re: db design questions Hi, Try to keep the simple attributes in one table and the repetitions in separated

Online mysql db design tool (alpha)

2001-01-23 Thread Anders Hedström
Hi I'm making a db design tool for the web, and would like some feedback. Please try it out at http://dbd.aktieprat.nu/ (this domain will probably change later on). TIA /ah - Before posting, please check: http