0% found this document useful (0 votes)
63 views1 page

Bddoc

The document contains SQL commands that create 3 tables: a "cliente" table to store customer data including ID, name, address and email; a "compras" table to record purchases linking a customer ID, payment ID, date, amount and status; and a "detalle_compras" table to keep purchase details like product ID, purchase ID, quantity and purchase price for each item.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views1 page

Bddoc

The document contains SQL commands that create 3 tables: a "cliente" table to store customer data including ID, name, address and email; a "compras" table to record purchases linking a customer ID, payment ID, date, amount and status; and a "detalle_compras" table to keep purchase details like product ID, purchase ID, quantity and purchase price for each item.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATE TABLE `cliente` (

`idCliente` int(11) UNSIGNED NOT NULL,


`Dni` varchar(9) DEFAULT NULL,
`Nombres` varchar(255) DEFAULT NULL,
`Direccion` varchar(255) DEFAULT NULL,
`Email` varchar(255) DEFAULT NULL,
`Password` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `compras` (


`idCompras` int(11) UNSIGNED NOT NULL,
`idCliente` int(11) UNSIGNED NOT NULL,
`idPago` int(11) UNSIGNED NOT NULL,
`FechaCompras` varchar(11) DEFAULT NULL,
`Monto` double DEFAULT NULL,
`Estado` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `detalle_compras` (


`idDetalle` int(10) UNSIGNED NOT NULL,
`idProducto` int(11) UNSIGNED NOT NULL,
`idCompras` int(11) UNSIGNED NOT NULL,
`Cantidad` int(11) UNSIGNED DEFAULT NULL,
`PrecioCompra` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

You might also like