John, > My data is made of Names, Dates and occasionally images. From the web > side the vast majority of queries will be made on the surname so I'm > thinking that I should create a full text index on the surname field ? > as that will enable fast searching on the field ?
You will only want to do this if you expect surnames to be some 1,000 chars long ;-) Otherwise, you just take CHAR / VARCHAR, and put an index on the surname column, to speed up lookups and order by statements. Names and other short text: CHAR (faster) or VARCHAR (saves disk space), Dates: DATE or DATETIME (if you need time values, too) or TIMESTAMP (if you want this for the obvious reason the name is telling), Images: You _can_ store images in the database (BLOB column type), but in most cases people just use _references_ to the images, like the file name (as CHAR/VARCHAR). The images themselves are not stored in the database. You can find more info on column types here: http://www.mysql.com/doc/en/Column_types.html > Any advice on what field types I should use for names \ dates and Images > would be appreciated - oh and table type. Table type: MyISAM is the fastest table type for quite alot of situations. If you expect a high update / select ratio for your records (I assume you don't), InnoDB tables will be superior. If you need advanced stuff like transactions, foreign keys etc. (I assume you don't, at least not at the beginning), you will _have_ to use InnoDB, as MyISAM doesn't support this. I suggest you start with MyISAM, and if you find out it doesn't (optimally) fit your needs, you can still switch to InnoDB. Regards, -- Stefan Hinz <[EMAIL PROTECTED]> Geschäftsführer / CEO iConnect GmbH <http://iConnect.de> Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 ----- Original Message ----- From: "John Berman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 04, 2003 4:38 PM Subject: Field \ Table Types - Beginner > Hi > > Well I searched the web for answers first but there is so much its hard > to know were to start > > I'm creating a Genealogical Database and want to start right and ensure > my basic table and fields are correct (I see that I can a large variety > of table types) > > My data is made of Names, Dates and occasionally images. From the web > side the vast majority of queries will be made on the surname so I'm > thinking that I should create a full text index on the surname field ? > as that will enable fast searching on the field ? > > Any advice on what field types I should use for names \ dates and Images > would be appreciated - oh and table type. > > > Regards > > John > > > --------------------------------------------------------------------- > 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