Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DATABASE `stonehenge` /*!40100 DEFAULT CHARACTER SET latin1 */;
- DROP TABLE IF EXISTS `stonehenge`.`cliente`;
- CREATE TABLE `stonehenge`.`cliente` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `nome` varchar(50) NOT NULL,
- `endereco` varchar(50) NOT NULL,
- `bairro` varchar(30) NOT NULL,
- `cidade` varchar(30) NOT NULL,
- `estado` char(2) NOT NULL,
- `telefone` varchar(14) NOT NULL,
- `cpf` varchar(14) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `Index_cpf` (`cpf`)
- ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
- DROP TABLE IF EXISTS `stonehenge`.`assuntos`;
- CREATE TABLE `stonehenge`.`assuntos` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `cpf` varchar(14) NOT NULL,
- `assunto` varchar(30) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `FK_assuntos_cpf` (`cpf`),
- CONSTRAINT `FK_assuntos_cpf` FOREIGN KEY (`cpf`) REFERENCES `cliente` (`cpf`)
- ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement