Created
May 22, 2021 01:10
-
-
Save FernandoCutire/bc8158a772262820ae48416cf2141764 to your computer and use it in GitHub Desktop.
Creando tablas para el taller de Banco general
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Creando Tablas */ | |
use bd_test; | |
drop table if exists bd_test.cliente_FC; | |
CREATE TABLE bd_test.cliente_FC ( | |
id_cliente int NOT NULL AUTO_INCREMENT, | |
nombre varchar(200) NOT NULL, | |
apellido varchar (64) NULL, | |
cedula varchar(64) NOT NULL, | |
sexo char(1) NULL, | |
fecha_nacimiento datetime NOT NULL, | |
PRIMARY KEY (id_cliente), | |
UNIQUE INDEX idx_unique_cedula (cedula) | |
); | |
drop table if exists bd_test.hobbie_FC; | |
create table bd_test.hobbie_FC ( | |
id_hobbie int not null AUTO_INCREMENT, | |
descripcion varchar(64), | |
primary key (id_hobbie) | |
); | |
drop table if exists bd_test.cliente_hobbie_FC; | |
create table bd_test.cliente_hobbie_FC ( | |
id_cliente int not null, | |
id_hobbie int not null, | |
primary key (id_cliente, id_hobbie)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment