Create
Create
DATABASE Tienda_Informatica;
CREATE table Fabricantes ( Codigo int(4) PRIMARY KEY AUTO_INCREMENT, N
ombre varchar(100) );
CREATE TABLE Articulos ( Codigo int(5) PRIMARY KEY AUTO_INCREMENT, Nom
bre varchar(100), Precio int(8), Fabricante int(4), FOREIGN KEY (Fabri
cante) REFERENCES fabricantes (Codigo) );
INSERT INTO `fabricantes`(`Nombre`) VALUES ('Nvidia'), ('Intel'), ('AM
D'), ('Aerocool'), ('Gigabyte'), ('Asus'), ('Samsung'), ('Apple'), ('M
SI'), ('Razer');
INSERT INTO `articulos`(`Nombre`, `Precio`, `Fabricante`) VALUES ('RTX
2080 Super','90000','1'), ('I7 9700K','67000','2'), ('Fuente 700w
RGB','16000','4'), ('Ryzen 5 3600x','45000','3'), ('Mother Z390
Elite','22000','5'), ('ROG Phone','300000','6'), ('S22
Ultra','245000','7'), ('Iphone 13 Pro Max','500000','8'), ('Vampiric
010','33000','9'), ('Laptop RAZER','23000','10');