Projeto de banco de dados
Queria saber se este banco de dados tem algum nexo, se realmente dar para relacionar as tabelas de categorias e/ou subcategorias com a de postagens. Estou em período de aprendizado, abraço a quem poder colaborar e ajudar. :)
/ TABELA DE USUÁRIOS /
create table usuarios (
id int(2) AUTO_INCREMENT,
login char(20),
senha char(20),
nome char(255),
PRIMARY KEY (id)
);
/ TABELA DE CATEGORIAS + SUBCATEGORIAS /
create table categorias (
id int(2) AUTO_INCREMENT,
titulo char(100),
PRIMARY KEY (id)
);
create table subcategorias (
id int(2) AUTO_INCREMENT,
titulo char(100),
cat_id int(2),
PRIMARY KEY (id)
);
/ TABELA DE POSTAGENS GERAL /
create table postagens (
id int(5) AUTO_INCREMENT,
titulo text,
conteudo text,
data char(10),
hora char(5),
destaque int(1),
cat_id int(2),
subcat_id int(2),
PRIMARY KEY (id)
);
/ TABELA DE ÁLBUM + FOTOS /
create table album (
id int(5) AUTO_INCREMENT,
titulo text,
data char(10),
PRIMARY KEY (id)
);
create table album_foto (
id int(9) AUTO_INCREMENT,
album_id int(5),
foto text,
thumb text,
PRIMARY KEY (id)
);Discussão (5)
Carregando comentários...