Re: more than one possible column value

2001-12-04 Thread Etienne Marcotte
hum I have an hard time understanding, but if I'm right: CREATE TABLE files( fileID smallint unsigned auto_increment, filename varchar(36) not null, primary key (fileID) ) CREATE TABLE types( typeID smallint unsigned auto_increment, typename varchar(36) not null, typeext char(4) not null

Re: more than one possible column value

2001-12-04 Thread Erik Price
I understand now. There needs to be a table in between files and types. This allows me to assign two different rows in the types table (say, JPG and JPEG) to the same row in the files table, or two different rows in the files table to the same row in the types table. This seems like quite

Re: more than one possible column value

2001-12-04 Thread Erik Price
On Tuesday, December 4, 2001, at 01:23 PM, Etienne Marcotte wrote: CREATE TABLE filetypes ( fileID smallint unsigned not null, typeID smallint unsigned not null, unique index (fileID,typeID), unique index (typeID,fileID) ) One question, though. Do I have to construct indexes in both

Re: more than one possible column value

2001-12-04 Thread Etienne Marcotte
well I index both because it enables to pull data without even reading on the table.It reads only in the B-Tree index since it's both numeric. There is a section on mySQl optimization in the mySQL guide on the webpage. If you want to find all files that have this or that extension, mySQL will