Skip to content

Instantly share code, notes, and snippets.

@FernandoCutire
Created May 22, 2021 01:10
Show Gist options
  • Save FernandoCutire/bc8158a772262820ae48416cf2141764 to your computer and use it in GitHub Desktop.
Save FernandoCutire/bc8158a772262820ae48416cf2141764 to your computer and use it in GitHub Desktop.
Creando tablas para el taller de Banco general
/* 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