Char vs Varchar field types

2002-04-10 Thread Luke van Blerk

Hi everyone,

When is it appropriate to use Char instead of Varchar and vice versa?

Thanks
Luke

mysql


-
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




InnoDB tables

2002-04-09 Thread Luke van Blerk

Hi everyone,

I've been reading up about InnoDB tables and they seem to have lots of
advantages. I'm particularly interested in using the foreign keys as this
will save me some much need time. In the benchmark tests on the InnoDB
website they show up faster than MyISAM tables but will foreign keys have a
slow down effect? And are there any issues I need to know about before
switching to InnoDB tables?

Thanks in advance
Luke van Blerk

mysql


-
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: InnoDB tables

2002-04-09 Thread Luke van Blerk

Hi Richard

I'm writing a web application in PHP with a MySQL backend. I'm a novice at
both PHP and MySQL having started with both about November last year and I'm
also new to programming at large so please excuse any question which may
seem obvious.

The foreign keys are to be used to enforce referential integrety in the
application -- e.g. If I try to delete a specific entry from the 'town'
table it won't allow me to if there are entries in the 'advertiser' table
which refer to that town.

At the moment I'm using a table called 'advertisers_towns' which stores the
ID of each entity and thereby the relationship is maintained. But if I can
have the foreign keys operating this would cut out the need for such a table
and all the extra coding work which goes with it.

I hope that explains why I'd like to use foreign keys. What do you think?

Regards
Luke

- Original Message -
From: Richard Clarke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 09, 2002 2:11 PM
Subject: Re: InnoDB tables


 Luke,

 How exactly will the foreign keys save you time? Please explain.

 Ric.

 - Original Message -
 From: Luke van Blerk [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 09, 2002 9:17 AM
 Subject: InnoDB tables


  Hi everyone,
 
  I've been reading up about InnoDB tables and they seem to have lots of
  advantages. I'm particularly interested in using the foreign keys as
this
  will save me some much need time. In the benchmark tests on the InnoDB
  website they show up faster than MyISAM tables but will foreign keys
have
 a
  slow down effect? And are there any issues I need to know about before
  switching to InnoDB tables?
 
  Thanks in advance
  Luke van Blerk
 
  mysql
 
 
  -
  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




Best field type for ID?

2002-04-08 Thread Luke van Blerk

Hi everyone,

 What is the best field type to use for an ID field which is the primary key
and auto-increment?

I wanted to use SMALLINT UNSIGNED because its half the bytes of INT but was
wondering what happens when it reaches 65535, does the auto-increment go
back to 1 or will it cause an error? Should one use INT instead?

 Regards
Luke van Blerk


(mysql)


-
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