Left Join Problem

2001-09-20 Thread Scott Gerhardt

I'm not currently on the mailing list so please reply directly.


I have three tables joined as follows (Table WORKPLACE is just a codes
lookup with wrk_id and name):

MEMBERS(A)  |  EMPLOY(B)  |   WORKPLACE(C)
--
mem_id   mem_id
   workplacewrk_id

I want to select elements from from all three tables but run into a problem
where B.workplace is NULL (i.e. members are excluded from result set where
B.workplace has been left blank (no join between B and C).

I know this can be solved using and outer/left join but I can't seem to get
the syntax right to get elements from all three tables.


Another solution I can think of is to replace all the NULL's in EMPLOY(B)
with a logical value and then insert a corresponding entry in the lookup
table WORKPLACE(C).  I would also set the default for EMPLOY.workplace to be
the same.


_

Scott Gerhardt, P.Geo.
Gerhardt Information Technologies
_


-
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




RE: Severe problem in handling timestamp column type

2001-02-01 Thread Scott Gerhardt

MySQL always updates the first timestamp column on update, regardless.


 -Original Message-
 From: Alex Dusty [mailto:[EMAIL PROTECTED]]
 Sent: February 1, 2001 7:28 PM
 To: [EMAIL PROTECTED]
 Subject: Severe problem in handling timestamp column type


 Description:
 There is a _severe_ problem when dealing with "timestamp" column:
 if I update
 a column, also other columns are affected! I enclose a sample script to
 show the problem

 How-To-Repeat:
 create table a(t1 timestamp, t2 timestamp);
 insert into a values("2001-01-20","1999-03-04");
 select * from a;
 update a set t2="1998-05-06";
 select * from a;
 drop table a;
 -- The second "select" shows that column t1 changed too!

 Fix:
 I don't know. I used datetime type instead of timestamp and it
 _seems_ working.

 Submitter-Id:submitter ID
 Originator:  Alex Dusty
 Organization: JapoTek
 MySQL support: none

 Synopsis: Error in handling timestamp columns

 Severity: critical

 Priority: high
 Category:mysql
 Class:   sw-bug
 Release: mysql-3.23.32 (Official MySQL RPM)
 Server: /usr/bin/mysqladmin  Ver 8.14 Distrib 3.23.32, for
 pc-linux-gnu on i686
 Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
 This software comes with ABSOLUTELY NO WARRANTY. This is free software,
 and you are welcome to modify and redistribute it under the GPL license

 Server version3.23.32
 Protocol version  10
 ConnectionLocalhost via UNIX socket
 UNIX socket   /var/lib/mysql/mysql.sock
 Uptime:   15 hours 23 min 8 sec

 Threads: 2  Questions: 8036  Slow queries: 0  Opens: 927  Flush
 tables: 1  Open tables: 12 Queries per second avg: 0.145
 Environment: (tested also in other environments, always versione 3.23.32)
 System: Linux japot.dyndns.org 2.2.19pre7 #8 Tue Jan 30 16:33:29
 GMT+1 2001 i686 unknown
 Architecture: i686

 Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake
 /usr/bin/gcc /usr/bin/cc
 GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
 gcc version 2.96 2731 (Red Hat Linux 7.0)
 Compilation info: CC='egcs'  CFLAGS='-O6 -fomit-frame-pointer
 -mpentium'  CXX='egcs'  CXXFLAGS='-O6 -fomit-frame-pointer
   -felide-constructors -fno-exceptions -fno-rtti -mpentium'
 LDFLAGS=''
 LIBC:
 lrwxrwxrwx1 root root   11 Nov 23 01:05
 /lib/libc.so.6 - libc-2.2.so
 -rwxr-xr-x1 root root  4761074 Dec 15 12:39 /lib/libc-2.2.so
 -rw-r--r--1 root root 22855536 Dec 15 12:37 /usr/lib/libc.a
 -rw-r--r--1 root root  178 Dec 15 12:37 /usr/lib/libc.so
 Configure command: ./configure  --disable-shared
 --with-mysqld-ldflags=-all-static
 --with-client-ldflags=-all-static --enable-assembler
 --with-mysqld-user=mysql
 --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
 --with-extra-charsets=complex --exec-prefix=/usr
 --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
 --localstatedir=/var/lib/mysql --infodir=/usr/info
 --includedir=/usr/include --mandir=/usr/man --without-berkeley-db
 '--with-comment=Official MySQL RPM'


 -
 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




-
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




RE: How to select the 10 last items from a table?

2001-01-30 Thread Scott Gerhardt

SELECT * FROM item
ORDER BY ID
LIMIT 10

or change to "ORDER BY ID DESC" to get the desired result.

- Scott

 May be it could work
 SELECT  * FROM item ORDER BY ID LIMIT count(*)-10,10
 or
 SELECT  * FROM SELECT  * FROM item ORDER BY ID DESC LIMIT 10 ORDER BY ID




 - Original Message -
 From: Karlsson Andreas-andkar01 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, January 30, 2001 6:00 PM
 Subject: How to select the 10 last items from a table?


 Hi,
 I have a table were all rows have their own ID. How can I select only the
 last items out of this table?
 This command fixes it but I receive the items in the wrong order that I
 would like them...
 SELECT * FROM item ORDER BY ID DESC LIMIT 10
 brgds
 Andreas

 Andreas Karlsson
 MAGNET- Motorola Applications Global Network
 Campus Grsvik 2
 371 75 Karlskrona
 Phone: +46-455-379 306
 E-mail:[EMAIL PROTECTED]
 
 Become a MAGNET member - register at:
 http://www.motorola.com/developers/wireless/

 -
 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





 -
 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




-
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




RE: (+) Help needed

2001-01-27 Thread Scott Gerhardt

Slight correction, for some reason the query below does NOT work on my
sample DB unless I quote the date values.

This should work now:

 SELECT IP, Size, Date FROM your_table
WHERE Date BETWEEN '2001-02-01' AND '2001-05-01';




 so and i have Mysql table with
 IP   | Size | Date|
 --
 213.32.44.11 | 3|2001-01-11-12|
 --
 213.32.44.11 | 3|2001-01-11-13|
 --
 213.32.44.12 | 3|2001-01-12-12|
 --
 213.32.44.14 | 3|2001-01-13-17|
 --
 213.32.44.16 | 3|2001-01-14-11|
 --
 213.32.44.111 | 3|2001-02-15-10|
 --
 213.32.44.121 | 3|2001-01-13-10|
 --
 213.32.44.131 | 3|2001-01-15-10|
 --


 So i need SELECT from table only record between values
 $dat1 and $dat2
 how to do this ?!
 Thx
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


 -
 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




-
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




RE: 3 million+ records problems.

2001-01-27 Thread Scott Gerhardt

Have you tried adding an index on id?


 -Original Message-
 From: taree [mailto:taree]On Behalf Of Manuel Capinha
 Sent: January 27, 2001 12:10 PM
 To: [EMAIL PROTECTED]
 Subject: 3 million+ records problems.
 
 
 Hi!
 
 I've got a table with 3 million+ records. This table has only to
 columns: an int and a varchar(80).
 
 I need to periodically execute a statement like: "SELECT id,count(*)
 FROM names GROUP bY id", which takes very long time to end.
 
 I'm using perl (DBI) to access this table. When I do a select by id
 (SELECT name FROM names WHERE id=1) it hangs forever for very large
 results (1million).
 
 I'm running mysql 3.22.29 on FreeBSD 3.4. Would an upgrade to the latest
 3.23 help ? Would an upgrade to FreeBSD 4 or maybe Linux help ?
 The id column is indexed, but i believe this is  A Good Thing(tm).
 
 I've checked past messages of this mailing list and i couldn't find
 anything that seemed relevant to my case. Can anyone give me some
 suggestions to speed things up ?
 
 Thanks in advance.
 
 Manuel Capinha,
 who as just seen his weekend ruined.
 
 
 -
 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
 
 

-
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




RE: 3 million+ records problems.

2001-01-27 Thread Scott Gerhardt

Adding another 192megs of ram or so would really boost performance.
When I increased the RAM on my PIII 450Mhz from 128 to 256Mb, performance
almost doubled for most queries on a 72k record table.





  From a mysqldump:
 
  #
  # Table structure for table 'names'
  #
  CREATE TABLE names (
id int(10) unsigned DEFAULT '0' NOT NULL,
name varchar(80) DEFAULT '' NOT NULL,
KEY id (id)
  );
 
  The machine is an Intel Celeron 533Mhz, with 64 mb of RAM, with dual
 10
  GB EIDE hard drives (doing RAID), running FreeBSD 3.4-Release.
 
 
 
  Artem Koutchine wrote:
 
   Well then, be so kind and tell us your index configuration
   and your hardware configuration.
  
   - Original Message -
   From: "Manuel Capinha" [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Saturday, January 27, 2001 9:10 PM
   Subject: 3 million+ records problems.
  
Hi!
   
I've got a table with 3 million+ records. This table has only to
columns: an int and a varchar(80).
   
I need to periodically execute a statement like: "SELECT
 id,count(*)
FROM names GROUP bY id", which takes very long time to end.
   
I'm using perl (DBI) to access this table. When I do a select by
 id
(SELECT name FROM names WHERE id=1) it hangs forever for very
 large
results (1million).
   
I'm running mysql 3.22.29 on FreeBSD 3.4. Would an upgrade to
 the
   latest
3.23 help ? Would an upgrade to FreeBSD 4 or maybe Linux help ?
The id column is indexed, but i believe this is  A Good
 Thing(tm).
   
I've checked past messages of this mailing list and i couldn't
 find
anything that seemed relevant to my case. Can anyone give me
 some
suggestions to speed things up ?
   
Thanks in advance.
   
Manuel Capinha,
who as just seen his weekend ruined.
   
   
  
  
   -
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
   
   
 
 


 -
 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




-
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




RE: how many colums can i create before it becomes unusable?

2001-01-26 Thread Scott Gerhardt


Hello Anna,

According to the MySQL Crash-Me the maximum numbers for 3.23.xx are:
- Columns in table 3398
- max table row length (without blobs) 65534
- table row length with nulls (without blobs) 65502



If you understand the concepts of DB normalization don't bother reading the
following:

300+ columns seems like a lot of columns for member information.  Are you
sure you can't normalize your DB a little more by grouping or data into
relevant tables?

Example:

table members:
id  |  first  | last  |  job_1  |  job_2  |  job_3  |  job_4  |

You could create another table called jobs and your resulting tables would
look like:


table members
mem_id |  first  | last  |


table jobs
job_id  |  mem_id  |  job  |  job_no  |


Regards,


 -Scott


 i've been asked to design a for a new web-based system which
 stores lots of data on it's members.  There are currently about
 500,000 member records.

 the problem is that i have to store at least 248 pieces of
 information on each user.  i've made the system as relational as
 possible so that for each user record, i am only storing
 integers, for the most part tinyints and smallints.

 Is there a limit on the number of fields per record.  I can
 easily see this new system requiring 300 fields(columns).  what
 are the consequences for making a table with so many columns.
 this table will be updated very frequently - will access time
 degrade severely even though i use mainly ints in this table?

 thanks for your help.
 anna





-
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




GRANT Privileges

2001-01-26 Thread Scott Gerhardt

I was just wondering what the "USAGE" privilege is good for and where it
would be used?

Pauls's book says that USAGE is a special "no privileges" privilege.


___

Scott A. Gerhardt  P.Geo.
Gerhardt Information Technologies
[EMAIL PROTECTED]
___



-
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




RE: Uninstalling and Troubleshooting RPM

2001-01-25 Thread Scott Gerhardt

Sir,

What OS are you running?
What version of MySQL are you trying to install?
What RPMs are you trying to install?

- Scott



 -Original Message-
 From: lkeeton [mailto:[EMAIL PROTECTED]]
 Sent: January 25, 2001 10:56 AM
 To: [EMAIL PROTECTED]
 Subject: Uninstalling and Troubleshooting RPM
 
 
 I am very frusturated as of right now. I have a mysql database 
 that doesn't 
 work on Cobalt Raq3. I installed the RPM version and guess what 
 the mysql.sock 
 file isn't there and ther server gives me this error when starting:
 
 Starting mysqld daemon with databases from /var/lib/mysql
 mysqld daemon ended
 
 Then it gives me when i connect with command prompt mysql
 
 Can't connect can't connect through mysql.sock and it may not exist
 
 I am so frusturated now all I want to do is uninstall this rpm 
 and install the 
 source files. The bottom line is that the command rpm -e filename 
 doesn't work 
 it gives me an error filename is not installed. The truth is it 
 is installed 
 and I want it to work. I will be happy for a solution to either 
 to fix this 
 sock problem or uninstall this software all 3 
 rpm's(client,server, and devel) 
 so I can just install the source tarball.
 
 Any suggestions
 Brent
 
 
 -
 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
 
 

-
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




RE: I am failing to optimize this left join ...

2001-01-25 Thread Scott Gerhardt

Does this help?

SELECT
   ArgumentCalendar.Docket
 , ArgumentCalendar.Date
 , DATE_FORMAT(ArgumentCalendar.Date, '%W, %M %e, %Y') AS formatted_date
 , CaseID.CASEID
 , CONCAT(Party1, ' v. ', Party2) AS name
 , Blurb

  FROM
   ArgumentCalendar
 , CaseID
 , Parties

  LEFT JOIN Preview ON Parties.CASEID = Preview.CASEID

   WHERE   Preview.CASEID IS NULL
   AND CaseID.DocketNumber = ArgumentCalendar.Docket
   AND Parties.CASEID = CaseID.CASEID
   AND '20010125' = ArgumentCalendar.Date


 Hi.  I have a query which works and is quick, but it misses a couple of
 records.

 SELECT ArgumentCalendar.Docket
 , ArgumentCalendar.Date
 , CaseID.CASEID
 , CONCAT(Party1, ' v. ', Party2) AS name
 , Preview.Blurb
 FROM ArgumentCalendar
 , CaseID
 , Parties
 , Preview
 WHERE CaseID.DocketNumber = ArgumentCalendar.Docket
 AND Parties.CASEID = CaseID.CASEID
 AND Preview.CASEID = CaseID.CASEID
 AND '20001001' = ArgumentCalendar.Date
 AND ArgumentCalendar.Date = '20010630;

 I needed to _also_ select the records which don't have a corresponding
 record in Preview, so I threw in a left join:

 SELECT ArgumentCalendar.Docket
 , ArgumentCalendar.Date
 , DATE_FORMAT(ArgumentCalendar.Date, '%W, %M %e, %Y') AS formatted_date
 , CaseID.CASEID
 , CONCAT(Party1, ' v. ', Party2) AS name
 , Blurb
 FROM ArgumentCalendar
 , CaseID
 , Parties
 LEFT JOIN Preview ON Preview.CASEID = Parties.CASEID
 WHERE CaseID.DocketNumber = ArgumentCalendar.Docket
 AND Parties.CASEID = CaseID.CASEID
 AND '20010125' = ArgumentCalendar.Date

 The second query works correctly with the left join, but now
 mysql looks at
 all 19000 records in Parties (according to EXPLAIN) and the query takes
 about 15 seconds to execute.  I have fiddled and read  fiddled
 more, but I
 have failed to speed up this query.  If I change the order around or add
 another left join I have removed the problem with the Parties table, but
 then EXPLAIN says all 19000 CaseID records are being examined.
 Without the
 LEFT JOIN MySQL only looks at all the ArgumentCalendar  all the Preview
 records, which are like 63 and 150 respectively.

 With the Left Join I select 61 records, without it 59 (which is
 as expected
 -- the issue is just speed).

 I am using MySQL 3.22.25.

 Am I screwed or is there some syntactic SQL point I am missing?

 - BLH


 -
 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




-
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




RE: Newbie: difference between tinytext and varchar

2001-01-25 Thread Scott Gerhardt


The answer to your question depends upon depends on the nature of the text
information you are going to store:

- The length of text you want to store.
- Database size and fragmentation considerations.
- Uppercase/Lower case significance
- Indexing (prior to 3.23).



 I am trying to determine when it is best to use
 varchar and when it is appropriate to use tinytext. I
 have looked at the manual and have read the difference
 between them but would like to have an understanding
 of this in more practical, real-life terms.

 Is a space between characters considered a character
 in both column types or does one handle it
 differently?

 When I use a varchar I have to define its maximum
 length. I don't have to declare max length in
 tinytext. does this make a difference when it comes to
 storage space?

 Thanks,
 Karen McAdams


 =
 Karen McAdams
 http://kmcadams.com
 [EMAIL PROTECTED]

 __
 Do You Yahoo!?
 Yahoo! Auctions - Buy the things you want at great prices.
 http://auctions.yahoo.com/

 -
 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




-
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




RE: Help Pub Crawl display

2001-01-25 Thread Scott Gerhardt

Your Query is making me thirsty  ;-)

Unfortunately your tables got garbled so I had to improvise.
Next time don't paste the tables beside each other...

Also, I'm not sure if I understand your problem or what you are trying to
accmplish.
Are you trying to de-normalize your data and display the Beggining and
Ending Pubs for each stop?


- Scott








 I am trying to do a select that would allow me to display the following:

   ** UPCOMING PUB CRAWLS **

 Event
 IDBeginning   Ending  DateHosted By
 321   Cubby Bear  Harry Carry's   01-27-01Sammy Sosa
 198   River Shannon   Cubby Bear  02-21-01unassigned
 369   John Barleycorn Wrightwood Tap  02-23-01Pamela Anderson


 My select statement below is not cutting it and I beginning to wonder if
 what I want to do can be done with a select statement or a join.  If it
 can some help me figure out how.  If it can' can someone suggest some
 other way of going about it.

 SELECT e.eventid, e.date, e.host_id, p.name h.name
 FROM event e, pub p, host h, stop s
 WHERE e.eventid=s.event_id
 AND s.p_id=p.p_id
 AND e.host_id=h.host_id

 -
 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




-
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




RE: mySQL vs Oracle

2001-01-22 Thread Scott Gerhardt

Hello Ann,

The answer to you question depends on how you plan to use the database (i.e.
financial trancactions, serving data on the web etc.) as well as financial
considerations.  MySQL is free and Oracle is expensive.


Here are some questions you should answer:

1.) Do you need full Transaction support (commit roll-back)?
2.) Do you need subselect and union queries?
3.) Do you need Triggers and Stored Procedures?
4.) Do you absolutely need Foreign Key support?

If you anwered YES to any of the above go with Oracle, Sybase, Frontbase,
Openbase etc. otherwise, MySQL is an excellent choice.  MySQL is very fast
and probably faster than Oracle in most cases but I have no documented proof
(Oracle doesn't like having their benchmarks published).

I know this isn't a definite answer and you are on a tight deadline.  Hope
this helps just the same.


___

Scott A. Gerhardt  P.Geo.
Gerhardt Information Technologies
[EMAIL PROTECTED]
___










 I am trying to choose between mySQL and Oracle for a Linux server. My
 specific questions are:

 1) Will mySQL handle 3000 hits/day well?
 2) Does mySQL handle multi-media file formats? For example, if I want to
 store audio clips, or Flash movie clips, or PowerPoint presentations,
 can I do so?

 We make the decision this decision at 3:00 today. Your advice will be
 most helpful.
 Thanks,
 Ann


 -
 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




-
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




RE: What degree of concurrency does MySQL support?

2001-01-18 Thread Scott Gerhardt

As far as hardware goes, you should be able to increase performance with
more RAM and faster disks such as UW-160 SCSI.
Also, I don't think they make dual processor motherboards for Athalons.


- Scott


 (The total throughput we need is on the order of 100 indexed updates
 per second; currently we are running a single 900 MHz Athlon with generic
 IDE disk but would buy more processors if it would help).





 -
 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




-
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




RE: Frontend Dilema

2001-01-18 Thread Scott Gerhardt

You can connect to the DB on Linux using ODBC over any TCP/IP network, and
you don't need to worry about NFS, File sharing, Samba etc.
All you need is MySQL on Linux connected to your network and ODBC will
connect on port 3306 over TCP/IP, that's all you need.
A system built this way can use many different front-ends on different OS's
completely independant of the DB.

- Scott


 Thanks for the reply.  Curses worked OK.  But I was convinced that a web
 server would be more efficient than NFS for sharing the database files.
 Is that true?  Or is a NFS a longtime viable solution for clients on the
 LAN quering the database.

 Richard

 "Jeremy D. Zawodny" wrote:
 
  On Wed, Jan 17, 2001 at 03:17:52PM -0600, Richard Reina wrote:
 
   I run a small business.  A year and a half ago I embarked on a
   jorney to port my DOS Foxpro Database to linux.  I selected mysql as
   an the engine and and begand writing the app. using perl/dbi and
   perlmenu module/curses as the front end at first I used NFS to share
   the databse files on the LAN.  I was soon after convinced by a perl
   gut to ditch NFS as and use apach/mod_perl and write the front end
   in HTML.
  
   I hired someone to help me and we wrote the first phase and I hate
   the frontend.  I hate having to hit submit after every entry.  I
   hate the way a browser looks and the wait it feels.  We're even
   tried using w3m I still hate it.  I'm looking for a NON GRAPHICAL
   interface taht I guess would work with apache mod-perl.  Any
   suggestions?  Does Perl Tk fit this bill?
 
  Perl/Tk is for generating GUIs, which you don't want.
 
  I don't understand what's wrong with the curses/DBI approach. It
  should work fine. There's not need for mod_perl and Apache if there is
  not supposed to be a web interface.
 
  Jeremy
  --
  Jeremy D. Zawodny, [EMAIL PROTECTED]
  Technical Yahoo - Yahoo Finance
  Desk: (408) 328-7878Fax: (408) 530-5454
  Cell: (408) 439-9951

 -
 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




-
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




RE: date_format

2001-01-17 Thread Scott Gerhardt

Hello Cindy,

I posted this in response to another date formatting question, hope it
helps.
The link should be helpful if you haven't found it already.

SELECT fields, DATE_FORMAT(datefield, '%M %d, %Y');

I just looked it up myself...It's all in the manual at:
http://www.mysql.com/doc/D/a/Date_and_time_functions.html


Regards,


___

Scott A. Gerhardt  P.Geo.
Gerhardt Information Technologies
[EMAIL PROTECTED]
___



-
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




Foreign Key Info error in manual

2001-01-16 Thread Scott Gerhardt

I was reading the information on foreign keys in the manual
http://www.mysql.com/doc/e/x/example-Foreign_keys.html
and noticed that there is no mention of locking the tables.

It seems to me that using the example verbatim could lead to loss of
referencial integrity if INSERTS did not occur in sequence (i.e. another
person was inserted before shirts).

Using "LAST_INSERT_ID()" can only be guranteed to work if the tables are
locked.

Am I correct or did I miss something?



___

Scott A. Gerhardt  P.Geo.
Gerhardt Information Technologies
[EMAIL PROTECTED]
___



-
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




RE: Foreign Key Info error in manual

2001-01-16 Thread Scott Gerhardt

Thanks for your responses Jeremy,
I'm just trying to clarify any misunderstandings I may have.

So, as far as the example goes, the relationships between shirts and people
is maintained by using the LAST_INSERT_ID (in one connection) but
referential integrity is not maintained in terms of foriegn keys for
subsequent deletes and updates since MySQL does not support them.  Thus all
subsequent deletes and updates etc. must use explicit joins or reference by
primary key.

___

Scott A. Gerhardt  P.Geo.
Gerhardt Information Technologies
[EMAIL PROTECTED]
___


  So referential integrity is maintained but AUTO_INCREMENT values may
  not be chronological?

 Nope. Referential integrity is not maintained.

 Jeremy
 --
 Jeremy D. Zawodny, [EMAIL PROTECTED]
 Technical Yahoo - Yahoo Finance
 Desk: (408) 328-7878Fax: (408) 530-5454
 Cell: (408) 439-9951



-
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