All pastes #331701 Raw Edit

Mine

public text v1 · immutable
#331701 ·published 2007-01-29 03:33 UTC
rendered paste body
create table manufacture
(
	id int not null primary key auto_increment ,
	name varchar(350) not null ,
	address varchar(300) null ,
	address2 varchar(150) null ,
	city varchar(75) null ,
	state varchar(50) null ,
	zip varchar(25) null ,
	contact_name varchar(350) null ,
	contact_number varchar(20) null
);

create index idx_manufacture on manufacture ( name(350) , contact_name(100) );

create table products
(
	id int not null primary key auto_increment ,
	idManufacture int not null ,
	name varchar(350) not null ,
	size float not null default 0 ,
	weight float not null default 0 ,
	inventory int not null default 0 ,
	description text null ,
	price float not null default 0 ,
	constraint fk_products_manufacture foreign key (idManufacture) references manufacture(id)
);

create index idx_products on products ( idManufacture , name(350) , description(350) );