create database db_lapadoca;

use db_lapadoca;

create table tb_categoria (
cd_categoria tinyint primary key auto_increment,
nm_categoria varchar(100) not null
);

create table tb_produto (
cd_produto int primary key auto_increment,
nm_produto varchar(150) not null,
ds_produto varchar(200) not null,
vl_produto decimal(6,2) not null,
st_produto char(1) not null default '1',
id_categoria tinyint not null,
foreign key (id_categoria) references
tb_categoria(cd_categoria)
);

select * from tb_categoria;