Re: Many to Many: Does this make sense ?

2004-08-28 Thread Shawn

As for the RAD tool I'm open to suggestions, but I

think I've read about them all.  PHP - MySQL platform.
Does it have to be PHP?  If a java RAD is ok I would suggest 
http://jdbforms.sourceforge.net/
It does not allow multiple inserts from one page, BUT you can:
1) tack in some html (text area or whatever) to the generated pages allowing the user 
to enter as many titles as they are allowed to
2) get what the user has entered out of the response and write a wee bit of code to do 
the insertion (in what dbforms calls an interceptor).
For example, in your case, I would create these tables:
Members (1 row per member)

member_idmember_nameetc.
AJones...
BSmith...
Primary key(member_id)
Titles (1 row per title)
--
title_idtitle_nameetc.
1Bullitt...
2Serpico ...
Primary key(title_id)
Member_title (1 row for each title associated with a member)
---
member_idtitle_id
A1
A2
B2
Primary key(member_id, title_id)
Foreign key #1 (member_id)
Foreign key #2 (title_id)
Using this design I would:
1) use dbforms to generate the initial pages
2) combine / alter them so that:
A) Members is the parent form
B) Member_title is a child form on the parent page (connected by member_id of 
course)
In this way, B (the child form) can:
1) show a list of all movies held by that member
2) put as many entry spots as the member has left
3) use a dbforms select box(part of the tag library) that will query Titles to give 
the user a choice of titles
Now to enter additional titles you could:
1) have a seperate page - but that is a drag for the user to not see a title and then 
have to go to another page to enter it and then return to the entry form where it 
could now be selected.  Works but...
2) better is to make a custom entry in the select box like enter new title and again add a 
little html (textarea or whatever) so that when the user selects enter new title and adds 
something to the box, you can in an interceptor take the parameter out of the request to both:
A) add the new title to title_id
B) take the title_id (see*** below) and insert it with the member_id into 
member_title
So in one page the user can:
1) see the movies they have
2) select as many new ones as they are allowed to
3) enter new movie titles as necessary
4) update thier choices
Multiple updates are allowed so that part is easy.
Anyway, you can post to the dbforms list if you need an example of java code to insert 
from your interceptor
Cheers,

*** to get the title_id you would have to do something like:
mysql CREATE TABLE title_id_sequence (id INT NOT NULL);
mysql INSERT INTO title_id_sequence VALUES (0);
then you would need to [but put this in your interceptor]:
mysql UPDATE sequence SET id=LAST_INSERT_ID(id+1);
mysql SELECT LAST_INSERT_ID();
which in your interceptor when inserting the title comes out to be:
try {
  PreparedStatement seq1 = con.prepareStatement(UPDATE title_id_sequence SET 
id=LAST_INSERT_ID(id+1));
  PreparedStatement seq2 = con.prepareStatement(SELECT LAST_INSERT_ID());
  ResultSet rs = null;
  int number;
  //Connection con is provided from the interceptor
try {
seq1.executeUpdate();
rs = seq2.executeQuery();
rs.first();
number = rs.getInt(1);
rs.close();
rs = null;
seq1.close();
seq2.close();
seq1 = null;
seq2 = null;
} catch (SQLException e) {
e.printStackTrace();
} finally {
//CODE TO ENSURE EVERYTHING IS CLOSED
}
 } catch (SQLException sqle) {
//
 }
--
Shawn
Karma is immutable, so act accordingly!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


slow select... where... order by

2004-08-28 Thread Critters
Hi
I have a database with just over 10,000 records. with the following structure:
id, compid, name, score, and about 10 other fields

I have indexed id, compid, score
about 10 records out of the 10,000 have a compid of 2

when i do 

select * from table where compid = 2

it was slow until i indexed the compid and now is 1 second, but

select * from table where compid = 2 order by score

takes around 15 seconds and has alot of HDD activiry.

Any way to speed this up? its driving me nuts.
--
Dave

Cross server selects?

2004-08-28 Thread Matt Eaton
Hi all.  Just a quick syntax question.  Is there a way to select rows 
from a different server  database into the one currently in use?  In 
other words, if I had two servers, is there something equivalent to 
saying (while using the client on server1):

SELECT * FROM server2.databasename.tablename WHERE id  5
I couldn't find anything the manual on this.  Thanks!
-Matt
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: c api and creating looped queries

2004-08-28 Thread Aftab Jahan Subedar
I have arranged some MySQL C API examples at
http://www.geocities.com/jahan.geo/mysql_c_by_example.html
Larry Brown wrote:
On Sat, 2004-08-28 at 00:48, I wrote:
I know this is more along the lines of a c question; however, I am
trying to write a loop to iterate insertions into a mysql database and
was hoping someone would have a quick fix for this.
I am used to using php with the luxury of the following syntax
 some loop giving values $column1 and $column2 usually from some array 
or parsing of a file

$query = mysql_query( insert into my_table values ( null, '$column1',
'some description $column2' );
 next iteration 
Can anyone just show a one liner of how to do this in c where the values
are column1 and column2?  I know there is a string concatenation
function, it just seems so clumsey to write it out, get the string
length of each of the two variables and create a new longer line.  I
won't be suprised if that is what I have to do though.  ( being new to c
and finding out how much more work it entails:-) ).
Hope this make since at nearly 1 am.  Been a long day...


OK, hate to answer my own question but sprintf is what I was looking
for.  It is hard to switch languages!  Especially in this direction. ;-)

--
Aftab Jahan Subedar
CEO/Software Engineer
Subedar Technologies
Subedar Baag
Bibir Bagicha #1
North Jatrabari
Dhaka 1204
Bangladesh
http://www.SubedarTechnologies.com
http://www.DhakaStockExchangeGame.com/
http://www.CEOBangladesh.com/
http://www.NYSEGame.com
tel://+88027519050
EMail://[EMAIL PROTECTED] - Directly to my notebook
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: mysql c-api 1064 mysql_real_query: issue with upgrade to 4.1.3

2004-08-28 Thread Aftab Jahan Subedar
Can you check the client version and server version from c api?
you can copy  paste it from (ehem)
http://www.geocities.com/jahan.geo/mysql_c_by_example.html
VY wrote:
Hi,
 For some reason, all my sql queries fail with a 1064;
These were all working under mysql-4.0 but had to
upgrade to 4.1 so i could use nested subqueries
i have attached a simple 10 line c-code as proof of
concept.  Obviously there is nothing wrong with the
query...
#include stdio.h
#include stdlib.h
#include unistd.h
#include string.h
#include mysql.h
 
static MYSQL handle;
 
int main() {
  char query[1500];
  int c;
 
 
  mysql_init(handle);
  if (!mysql_real_connect(handle, localhost,
mysql, mysql, honey_db, 0, NULL, 0)) {
 fprintf(stderr, connect failed %s\n,
mysql_error(handle));
 exit(1);
  }
 
  sprintf(query, select * from test);
  printf(%s\n, query);
 
  c = mysql_real_query(handle, query,
strlen(query)+500);
  if (c)
  {
 printf(query failed...%d %d\n, c,
mysql_errno(handle));
 printf(mysql_error(handle));
  }
}
 

The output is as follows (the first two lines are my
debug output)

select * from test  
query failed...1 1064
You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version
for the right syntax to use near '' at line 1:
I have tried both FreeBSD 
mysql-standard-4.1.3-beta-unknown-freebsd4.7-i386
and the linux-4.1.3 rpm with identical results.

Please let me know what im doing wrong  The table
test exists in honey_db and is accessible by the
mysql user.
Thanks!

		
__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

--
Aftab Jahan Subedar
CEO/Software Engineer
Subedar Technologies
Subedar Baag
Bibir Bagicha #1
North Jatrabari
Dhaka 1204
Bangladesh
http://www.SubedarTechnologies.com
http://www.DhakaStockExchangeGame.com/
http://www.CEOBangladesh.com/
http://www.NYSEGame.com
tel://+88027519050
EMail://[EMAIL PROTECTED] - Directly to my notebook
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Access denied for root user

2004-08-28 Thread MueR
Hello,
 
I've recently had my HD crash, and have reinstalled everything.
Everything
seems to work fine, apart from one thing. My MySQL server has decided to
randomly set a root password. 
 
I have tried logging in with no password, tried it with my old password.
Tried 
restarting the server with the --skip-grant-tables command, I've tried
to update 
the user table manually.
 
Everything seems to work out just fine, until the moment I attempt to
login
using the root account. It will give me the error # 1045 (access denied
for
user [EMAIL PROTECTED]).
 
Nothing seems to work. Has anyone ever had this problem? Do you know a
solution to it? I am using MySQL v 3.23.49, on a Debian system.
 
MueR


Re: Many to Many: Does this make sense ?

2004-08-28 Thread Stuart Felenstein
Okay, hopefully I'm somewhat clearer today.  I doubt
it but the effort is going to be made regardless.

First off, Rhino I read through your last post,
regarding the phone number table.  Yes I defintely
understand it and see how each situation may warrant a
different design.  You gave scenarios for both.  Very
clear.  Slowly it's sinking in.  For example, I had a
states table, but I was going to accept Cities to be
text input.  Very wrong.  I came up with a very solid
list of major cities in ever state.  For redundancy
I'll probably add metro areas, and quadrants of some
sort.  Each of course with their own tables.  I see
this is as a very good place to implement the M2M.
Agreed ?

Now, back to my title list.   There are a number of
business reasons why I'm forgoing the title table and
even tracking titles in a seperate place.  After
looking through Monster and CareerBuilders and the
similar others, there just isn't enough proof that it
would make sense.  Some of the titles I've seen are
combinations of things totally unrelated, others are
comppletely vauge.  While there are standards and
atypical job titles, there are also a huge number that
are not.  For instance, I applied for a position a few
months back titled, Senior Sales Representative 12.  I
thought I was an eleven, so I went for it anyone.  All
reasoning aside. Seriously though, I just believe
after review that it makes no business sense for that
design.  If I was running an internal job site for 1
company, then yes perhaps. There is a table though of
industries and fields.  

Hope this explains my mutterings the other day.

Also, yes I would like to share my design at some
point for some critique. It maybe slightly premature,
but I will defintely ping you when I'm ready.

Thank you,
Stuart

--- Rhino [EMAIL PROTECTED] wrote:

 I guess I'll have to wait until you've had a chance
 to mull the whole note
 over ;-)
 
 I really don't know what you're saying. I can't
 think of anything I said
 that would have discouraged you from creating the
 association table.
 Certainly the number of columns in the table
 shouldn't discourage you since
 there are typically only two columns and they are
 usually both short codes.
 
 The number of rows *may* be a concern though; if you
 have a lot of job
 titles and a keep track of every job every member
 has had, you could end up
 with a lot of rows. Maybe that's your concern.
 
 In any case, I hope you can explain what you are
 going to do instead of the
 association table if you have definitely abandoned
 it. Maybe we can critique
 that design for you and help you improve it or at
 least avoid the most
 common pitfalls.
 
 Rhino
 
 
 
 
 - Original Message - 
 From: Stuart Felenstein [EMAIL PROTECTED]
 To: Rhino [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; Stuart Felenstein
 [EMAIL PROTECTED]
 Sent: Friday, August 27, 2004 4:47 PM
 Subject: Re: Many to Many: Does this make sense ?
 
 
  Let me answer the first part now and then continue
  reading.
 
  You absolutely gave me some great ideas /
 examples.
  I understand it very well now.  I'm abandoning it
  solely because creating that association list -1)
 may
  take forever and still come up way short 2)I see
 how
  others have implemented the same type of
 application
  and have not provided specific job title
 allocation.
 
  I hope that gets you settled back again!
  Stuart
  --- Rhino [EMAIL PROTECTED] wrote:
 
   My replies are interspersed below.
  
   Rhino
  
   - Original Message - 
   From: Stuart Felenstein [EMAIL PROTECTED]
   To: Rhino [EMAIL PROTECTED];
   [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]; Stuart Felenstein
   [EMAIL PROTECTED]
   Sent: Friday, August 27, 2004 3:05 PM
   Subject: Re: Many to Many: Does this make sense
 ?
  
  
Now I am totally clear on it! Took a few
   reiterations
but I'm there.  Even more I'm going to abandon
 the
idea of titles.
  
   I was breathing a sigh of relief that we'd
 finally
   articulated the idea
   clearly enough. But now I'm not so sure
  
   What do you mean you are going to abandon the
 idea
   of titles?
  
 
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



OT: Gmail

2004-08-28 Thread Richard Whitney
I have 3 invites - anyone interested?
-- 
R. Whitney
Transcend Development
Producing the next phase of your internet presence
http://xend.net
Premium Quality Web Hosting
http://hosting.xend.net
[EMAIL PROTECTED]
[EMAIL PROTECTED]
310-943-6498
602-288-5340
The day this country abandons God is the day God will abandon this country

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



InnoDB table creation

2004-08-28 Thread Mulugeta Maru
I was able to create all the tables below except
ENROLLS. Can anyone please help me what is wrong in my
syntax in the section that faild to create the ENROLLS
table.

CREATE TABLE STUDENTS
(studentID SMALLINT NOT NULL,
student_name char(18),
address char(20),
city char(10),
state char(2),
zip char(5),
gender char(1),
PRIMARY KEY (studentID))TYPE=INNODB;
CREATE TABLE TEACHERS
(teacherID SMALLINT NOT NULL,
teacher_name char(18),
phone char(10),
salary FLOAT, PRIMARY KEY(teacherID))TYPE=INNODB;
CREATE TABLE COURSES
(courseID SMALLINT NOT NULL,
course_name char(20),
department char(16),
num_credits SMALLINT,
PRIMARY KEY(courseID))TYPE=INNODB;
CREATE TABLE SECTIONS
(courseID SMALLINT NOT NULL,
sectionID SMALLINT NOT NULL,
teacherID SMALLINT,
num_students SMALLINT,
PRIMARY KEY(courseID,sectionID),
INDEX(courseID),
FOREIGN KEY(courseID)
REFERENCES COURSES(courseID)
ON UPDATE CASCADE ON DELETE CASCADE)TYPE=INNODB;
CREATE TABLE ENROLLS
(enrollmentID INT NOT NULL AUTO_INCREMENT,
courseID SMALLINT NOT NULL,
sectionID SMALLINT NOT NULL,
studentID SMALLINT NOT NULL,
grade SMALLINT,
PRIMARY KEY(enrollmentID),
INDEX(courseID),
REFERENCES COURSES(courseID)ON UPDATE CASCADE ON
DELETE CASCADE,
INDEX(sectionID),
REFERENCES SECTIONS(sectionID)ON UPDATE CASCADE ON
DELETE CASCADE,
INDEX(studentID),
REFERENCES STUDENTS(studentID)ON UPDATE CASCADE ON
DELETE CASCADE)TYPE=INNODB;

Maru



___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Tables wrong or sql

2004-08-28 Thread Stuart Felenstein
I have two tables

StatesTable   CitiesTable
StateID(char) RunningCountID (int)  
State (varchar)   StateID (char)
  City (varchar)

Both are innodb tables, with CitiesTable having a
foreign key referencing StatesTable.StateID

Basically my first step here is to have some type of
print out:
New York New York
 Hastings on the Hudson
 Elmira

California   Los Angeles
 Santa Barbara
 Riverside

Now I select both tables all fields, no reason to do a
join since the foreign key is in place.  Maybe that's
wrong.  Anyway the do line up correctly
but it's more like
New YorkNew York
New YorkHastings on the Hudson
New YorkElmira

So maybe that's the way it will print on a query
unless formatted.
That leads me to my second question, somewhat client
side, so I can take it somewhere else if it's wrongly
posted here.

I have 1 menu pull down and one list field next to it.
After I select some state from the pull down I want
the associated cities in the list.  Now I realize that
this has something to do with a variable being passed.
 
At the same time I'm wondering if that can be done via
a SQL statement.

Sorry and thanks !
Stuart

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: InnoDB table creation

2004-08-28 Thread Michael Stassen
Mulugeta Maru wrote:
I was able to create all the tables below except
ENROLLS. Can anyone please help me what is wrong in my
syntax in the section that faild to create the ENROLLS
table.
snip
CREATE TABLE ENROLLS
(
  enrollmentID INT NOT NULL AUTO_INCREMENT,
  courseID SMALLINT NOT NULL,
  sectionID SMALLINT NOT NULL,
  studentID SMALLINT NOT NULL,
  grade SMALLINT,
  PRIMARY KEY(enrollmentID),
  INDEX(courseID),
  REFERENCES COURSES(courseID)ON UPDATE CASCADE ON DELETE CASCADE,
  INDEX(sectionID),
  REFERENCES SECTIONS(sectionID)ON UPDATE CASCADE ON DELETE CASCADE,
  INDEX(studentID),
  REFERENCES STUDENTS(studentID)ON UPDATE CASCADE ON DELETE CASCADE
)TYPE=INNODB;
Maru
When asking why something didn't work, you should always include the error 
you received.  In this case, I expect it was a syntax error.  Perhaps you 
meant for table ENROLLS to have some FOREIGN KEYS?

Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Tables wrong or sql

2004-08-28 Thread Michael Stassen
Stuart Felenstein wrote:
I have two tables
StatesTable   CitiesTable
StateID(char) RunningCountID (int)  
State (varchar)   StateID (char)
  City (varchar)

Both are innodb tables, with CitiesTable having a
foreign key referencing StatesTable.StateID
Basically my first step here is to have some type of
print out:
New York New York
 Hastings on the Hudson
 Elmira
California   Los Angeles
 Santa Barbara
 Riverside
Now I select both tables all fields, no reason to do a
join since the foreign key is in place.  Maybe that's
wrong.  Anyway the do line up correctly
but it's more like
New YorkNew York
New YorkHastings on the Hudson
New YorkElmira
This *is* a join.  I expect you did something like
  SELECT State, City
  FROM StatesTable, CitiesTable
  WHERE StatesTable.StateID = CitiesTable.StateID;
The comma between the tables is the implicit join operator, with the join 
condition in the WHERE clause.  See the manual for more 
http://dev.mysql.com/doc/mysql/en/JOIN.html.

So maybe that's the way it will print on a query
unless formatted.
You have 2 options.  1) You can code to only print the state when it 
changes.  2) If you are using mysql 4.1, you can do this in the query with 
the GROUP_CONCAT() function.  See the manual for the details 
http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html.

That leads me to my second question, somewhat client
side, so I can take it somewhere else if it's wrongly
posted here.
I have 1 menu pull down and one list field next to it.
After I select some state from the pull down I want
the associated cities in the list.  Now I realize that
this has something to do with a variable being passed.
Right.  Once the state is selected, you will have to code a way to send a 
query to retrieve the cities for that state, then build the city menu based 
on the results.

At the same time I'm wondering if that can be done via
a SQL statement.
Not sure what you mean here.
Sorry and thanks !
Stuart
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Access denied for root user

2004-08-28 Thread Michael Stassen
MueR wrote:
Hello,
 
I've recently had my HD crash, and have reinstalled everything.
Everything seems to work fine, apart from one thing. My MySQL server
has decided to randomly set a root password.
No, it didn't.  I know it seems that way, but I'm sure that's not what happened.
I have tried logging in with no password, tried it with my old
password. Tried restarting the server with the --skip-grant-tables
command, I've tried to update the user table manually.
Everything seems to work out just fine, until the moment I attempt to
login using the root account. It will give me the error # 1045
(access denied for user [EMAIL PROTECTED]).
That's not the full error message, and you've tried a lot of things, so it's 
hard to diagnose the problem.

Nothing seems to work. Has anyone ever had this problem? Do you know
a solution to it? I am using MySQL v 3.23.49, on a Debian system.
I'd suggest carefully following the directions in the manual 
http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html.  If that 
doesn't work, paste what happens into your next post.

MueRMichael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: slow select... where... order by

2004-08-28 Thread Michael Stassen
Critters wrote:
Hi
I have a database with just over 10,000 records. with the following structure:
id, compid, name, score, and about 10 other fields
I have indexed id, compid, score
about 10 records out of the 10,000 have a compid of 2
when i do 

select * from table where compid = 2
it was slow until i indexed the compid and now is 1 second, but
select * from table where compid = 2 order by score
This should use the index on compid to select the 10 rows, then do a 
filesort to order them...

takes around 15 seconds and has alot of HDD activiry.
but that shouldn't take this long.
Any way to speed this up? its driving me nuts.
Try
  ANALYZE TABLE your_table_name;
to make sure the index stats are up to date, then try again.  If it's still 
slow, run EXPLAIN http://dev.mysql.com/doc/mysql/en/EXPLAIN.html on your 
query and post the results.

--
Dave
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Many to Many: Does this make sense ?

2004-08-28 Thread Rhino
My replies are interspersed with Stuart's note.

Rhino

- Original Message - 
From: Stuart Felenstein [EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Stuart Felenstein [EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 6:08 PM
Subject: Re: Many to Many: Does this make sense ?


 Okay, hopefully I'm somewhat clearer today.  I doubt
 it but the effort is going to be made regardless.

 First off, Rhino I read through your last post,
 regarding the phone number table.  Yes I defintely
 understand it and see how each situation may warrant a
 different design.  You gave scenarios for both.  Very
 clear.  Slowly it's sinking in.  For example, I had a
 states table, but I was going to accept Cities to be
 text input.  Very wrong.  I came up with a very solid
 list of major cities in ever state.

So far so good

 For redundancy
 I'll probably add metro areas, and quadrants of some
 sort.  Each of course with their own tables.  I see
 this is as a very good place to implement the M2M.
 Agreed ?

Sorry, I don't see what you mean here at all, particularly what you mean by
a quadrant in this context. Are you talking about deciding whether Cleveland
is in the Northeast or Northwest? If so, what do you care? Or does it
support some aspect of your business where you have to know which region the
customer is in?

It is very hard to assess a database design that is paraphrased in a few
sentences. There is a great deal of potential for misunderstanding what you
mean that way. You have a far better chance of communicating your design
clearly if you supply table layouts of the kind Shawn and I put in our notes
on this topic.

 Now, back to my title list.   There are a number of
 business reasons why I'm forgoing the title table and
 even tracking titles in a seperate place.  After
 looking through Monster and CareerBuilders and the
 similar others, there just isn't enough proof that it
 would make sense.  Some of the titles I've seen are
 combinations of things totally unrelated, others are
 comppletely vauge.  While there are standards and
 atypical job titles, there are also a huge number that
 are not.  For instance, I applied for a position a few
 months back titled, Senior Sales Representative 12.  I
 thought I was an eleven, so I went for it anyone.  All
 reasoning aside. Seriously though, I just believe
 after review that it makes no business sense for that
 design.  If I was running an internal job site for 1
 company, then yes perhaps. There is a table though of
 industries and fields.

 Hope this explains my mutterings the other day.

Actually, I'm probably just more confused. You have to understand that I
don't know what business you're in nor do I know what your system is trying
to do.

You have actually caused some of this confusion by shifting the ground
with your examples. One minute, we're talking about dogs, then it turns out
that dogs were just for the purpose of your example and that you're really
dealing with colors. Only then it seems that what you *really* meant was
that you want your tables to contain movie titles. And just when we're
getting our heads around that, it turns out that those other examples were
bogus and we're actually going to store job titles, not movie titles.

I understand that you sometimes have to disguise examples a bit because of
your employer's confidentiality concerns but this has become a bit too much
of a moving target. In some cases, the exact nature of the data makes a
great deal of difference to the design an experienced person would
recommend. A solution that is perfect for color may be far less ideal for
movie titles or job titles because all of those things have different
properties. If you're going to disguise your examples, please choose a good
analogy the first time and then do your best to stick with it. It's just a
lot less confusing all the way around.

 Also, yes I would like to share my design at some
 point for some critique. It maybe slightly premature,
 but I will defintely ping you when I'm ready.

I'm certainly not insisting that you share your full design with this
mailing list or even a major part of it. But it is EXTREMELY hard to verify
that you are designing your database correctly with just a two sentence
paraphrase of how you are planning to build your system. You probably
learned the same phrase the rest of us did when we started working with
computers: Garbage in, garbage out. If you want good feedback from us, you
have to give us good input, not just a quick paraphrase.

The other thing is that you have to understand that any critique that people
on the mailing list can give you is going to be relatively superficial: we
are not going to do a full scale professional critique! All we can do is
give it a once-over and point out the most obvious flaws. We are unlikely to
catch the subtler mistakes in your design and we may even miss some of the
obvious ones.

If I were doing a *thorough* design 

Re: Replication eats 99% CPU

2004-08-28 Thread Chua Choon Keng
Thanks for your suggestion. I tried binary install
but the problem doesn't disappear. Though mysql no
longer consume 99% CPU, the load still go up till
the server hangs. Wonder why.

I seem to have a workaround now. My application
does lots of INSERTs, and after I change them to
INSERT DELAYED, the problem seems to disappear. 



--- Egor Egorov [EMAIL PROTECTED] wrote:

 Please download MySQL official binaries and
 install. Then check if
 the problem disappears. 
 




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]