Re: How do I know when to

From: Date: Sat, 12 Jan 2002 00:11:44 +0000
Subject: Re: How do I know when to
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15680@lists.php.net to get a copy of this message
Jerry, Raquel Rice has already answered your question, I'd suggest looking up some basic tutorials on relational databases. This one is pretty good: http://www.devshed.com/Server_Side/MySQL/Normal A good database design is important because it's the foundation of all the rest of your work, and you can use the power of SQL to eliminate a lot of processing loops you would otherwise have to write, whether in PHP or some other language. Char vs varchar? It probably doesn't matter, although I prefer to get my field lengths as close to the length of my data as possible, and I suspect that there has to be some processing overhead with a varchar type. Having said that a MySQL expert will probably read the post and say "Huh, he doesn't know what he's talking about. MySQL stores all chars as varchars." Welcome to the club and have fun - Miles Thompson At 03:02 PM 1/11/2002 -0800, Jerry Leonard wrote:
Hi, I am really new to MySQL and am wondering this: I understand how to make a database and tables but what I don't understand is when to make a row an "int" with auto_increment or just a plain "int". Or why would you use varchar(50) instead of char(50). Could someone please explain what is happening and why? Thank you Jerry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.db (#15680) next »