SlideShare a Scribd company logo
1 of 25
-478790-81280UNIVERSIDAD VERACRUZANA Facultad de Administración de Empresas EXPERIENCIA: Base de Datos ALUMNO: Lara López Karime Arely Madrigal Sosa Mariel Zarate Osorio Erik Eduardo CATEDRÁTICO: Dr. Carlos Arturo Torres Gastelú INVESTIGACION: Ejercicios De benfortan. CARRERA: Sistemas Computacionales Administrativos Veracruz, ver a 27 de Noviembre de 2009 CODIGO create database Ben CREATE TABLE Customers (   cust_id      char(10)  NOT NULL ,   cust_name    char(50)  NOT NULL ,   cust_address char(50)  NULL ,   cust_city    char(50)  NULL ,   cust_state   char(5)   NULL ,   cust_zip     char(10)  NULL ,   cust_country char(50)  NULL ,   cust_contact char(50)  NULL ,   cust_email   char(255) NULL  ); CREATE TABLE OrderItems (   order_num  int          NOT NULL ,   order_item int          NOT NULL ,   prod_id    char(10)     NOT NULL ,   quantity   int          NOT NULL ,   item_price decimal(8,2) NOT NULL  ); CREATE TABLE Orders (   order_num  int      NOT NULL ,   order_date datetime NOT NULL ,   cust_id    char(10) NOT NULL  ); CREATE TABLE Products (   prod_id    char(10)      NOT NULL ,   vend_id    char(10)      NOT NULL ,   prod_name  char(255)     NOT NULL ,   prod_price decimal(8,2)  NOT NULL ,   prod_desc  varchar(1000) NULL  ); CREATE TABLE Vendors (   vend_id      char(10) NOT NULL ,   vend_name    char(50) NOT NULL ,   vend_address char(50) NULL ,   vend_city    char(50) NULL ,   vend_state   char(5)  NULL ,   vend_zip     char(10) NULL ,   vend_country char(50) NULL  ); ALTER TABLE Customers WITH NOCHECK ADD CONSTRAINT PK_Customers PRIMARY KEY CLUSTERED (cust_id); ALTER TABLE OrderItems WITH NOCHECK ADD CONSTRAINT PK_OrderItems PRIMARY KEY CLUSTERED (order_num, order_item); ALTER TABLE Orders WITH NOCHECK ADD CONSTRAINT PK_Orders PRIMARY KEY CLUSTERED (order_num); ALTER TABLE Products WITH NOCHECK ADD CONSTRAINT PK_Products PRIMARY KEY CLUSTERED (prod_id); ALTER TABLE Vendors WITH NOCHECK ADD CONSTRAINT PK_Vendors PRIMARY KEY CLUSTERED (vend_id); ALTER TABLE OrderItems ADD CONSTRAINT FK_OrderItems_Orders FOREIGN KEY (order_num) REFERENCES Orders (order_num), CONSTRAINT FK_OrderItems_Products FOREIGN KEY (prod_id) REFERENCES Products (prod_id); ALTER TABLE Orders ADD  CONSTRAINT FK_Orders_Customers FOREIGN KEY (cust_id) REFERENCES Customers (cust_id); ALTER TABLE Products ADD CONSTRAINT FK_Products_Vendors FOREIGN KEY (vend_id) REFERENCES Vendors (vend_id); CODIGO PARA INSERTAR DATOS INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) VALUES('1000000001', 'Village Toys', '200 Maple Lane', 'Detroit', 'MI', '44444', 'USA', 'John Smith', 'sales@villagetoys.com'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact) VALUES('1000000002', 'Kids Place', '333 South Lake Drive', 'Columbus', 'OH', '43333', 'USA', 'Michelle Green'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) VALUES('1000000003', 'Fun4All', '1 Sunny Place', 'Muncie', 'IN', '42222', 'USA', 'Jim Jones', 'jjones@fun4all.com'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) VALUES('1000000004', 'Fun4All', '829 Riverside Drive', 'Phoenix', 'AZ', '88888', 'USA', 'Denise L. Stephens', 'dstephens@fun4all.com'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact) VALUES('1000000005', 'The Toy Store', '4545 53rd Street', 'Chicago', 'IL', '54545', 'USA', 'Kim Howard'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('BRS01','Bears R Us','123 Main Street','Bear Town','MI','44444', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('BRE02','Bear Emporium','500 Park Street','Anytown','OH','44333', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('DLL01','Doll House Inc.','555 High Street','Dollsville','CA','99999', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('FRB01','Furball Inc.','1000 5th Avenue','New York','NY','11111', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('FNG01','Fun and Games','42 Galaxy Road','London', NULL,'N16 6PS', 'England'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('JTS01','Jouets et ours','1 Rue Amusement','Paris', NULL,'45678', 'France'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BR01', 'BRS01', '8 inch teddy bear', 5.99, '8 inch teddy bear, comes with cap and jacket'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BR02', 'BRS01', '12 inch teddy bear', 8.99, '12 inch teddy bear, comes with cap and jacket'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BR03', 'BRS01', '18 inch teddy bear', 11.99, '18 inch teddy bear, comes with cap and jacket'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BNBG01', 'DLL01', 'Fish bean bag toy', 3.49, 'Fish bean bag toy, complete with bean bag worms with which to feed it'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BNBG02', 'DLL01', 'Bird bean bag toy', 3.49, 'Bird bean bag toy, eggs are not included'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BNBG03', 'DLL01', 'Rabbit bean bag toy', 3.49, 'Rabbit bean bag toy, comes with bean bag carrots'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('RGAN01', 'DLL01', 'Raggedy Ann', 4.99, '18 inch Raggedy Ann doll'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('RYL01', 'FNG01', 'King doll', 9.49, '12 inch king doll with royal garments and crown'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('RYL02', 'FNG01', 'Queen doll', 9.49, '12 inch queen doll with royal garments and crown'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20005, '2004-05-01', '1000000001'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20006, '2004-01-12', '1000000003'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20007, '2004-01-03', '1000000004'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20008, '2004-02-03', '1000000005'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20009, '2004-02-08', '1000000001'); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20005, 1, 'BR01', 100, 5.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20005, 2, 'BR03', 100, 10.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20006, 1, 'BR01', 20, 5.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20006, 2, 'BR02', 10, 8.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20006, 3, 'BR03', 10, 11.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 1, 'BR03', 50, 11.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 2, 'BNBG01', 100, 2.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 3, 'BNBG02', 100, 2.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 4, 'BNBG03', 100, 2.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 5, 'RGAN01', 50, 4.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 1, 'RGAN01', 5, 4.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 2, 'BR03', 5, 11.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 3, 'BNBG01', 10, 3.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 4, 'BNBG02', 10, 3.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 5, 'BNBG03', 10, 3.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20009, 1, 'BNBG01', 250, 2.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20009, 2, 'BNBG02', 250, 2.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20009, 3, 'BNBG03', 250, 2.49); PANTALLAS lefttopt t            VISTAS
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN
EJERCICIOS DE BENFORTAN

More Related Content

Similar to EJERCICIOS DE BENFORTAN

SPOOL output.log DROP TABL.pdf
SPOOL output.log DROP TABL.pdfSPOOL output.log DROP TABL.pdf
SPOOL output.log DROP TABL.pdffashionfootwear1
 
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdf
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdfSQL FILE FROM MOODLEUSE [master]GO Object Databa.pdf
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdfarrowit1
 
DROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docx
DROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docxDROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docx
DROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docxjacksnathalie
 
When debugging the code, use Drop table statementsto drop pr.docx
 When debugging the code, use Drop table statementsto drop pr.docx When debugging the code, use Drop table statementsto drop pr.docx
When debugging the code, use Drop table statementsto drop pr.docxaryan532920
 
Script de creación de la base de datos pedidos en MS Access
Script de creación de la base de datos pedidos en MS AccessScript de creación de la base de datos pedidos en MS Access
Script de creación de la base de datos pedidos en MS AccessZantiago Thrash
 
Use this script for the assignment.Please follow instructions as t.docx
Use this script for the assignment.Please follow instructions as t.docxUse this script for the assignment.Please follow instructions as t.docx
Use this script for the assignment.Please follow instructions as t.docxgarnerangelika
 
Starting from the database used in Project 1 (see the slightly cha.docx
Starting from the database used in Project 1 (see the slightly cha.docxStarting from the database used in Project 1 (see the slightly cha.docx
Starting from the database used in Project 1 (see the slightly cha.docxdessiechisomjj4
 
Tablas, Codigos De Base De Datos
Tablas, Codigos De Base De DatosTablas, Codigos De Base De Datos
Tablas, Codigos De Base De Datosguesta050b04
 
ORM을 맞이하는 우리의 자세
ORM을 맞이하는 우리의 자세ORM을 맞이하는 우리의 자세
ORM을 맞이하는 우리의 자세병태 정
 
SQL structure query language full presentation
SQL structure query language full presentationSQL structure query language full presentation
SQL structure query language full presentationJKarthickMyilvahanan
 
SQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docx
SQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docxSQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docx
SQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docxrafbolet0
 
Tablas, Codigos Base De Datos Excelsa
Tablas, Codigos Base De Datos ExcelsaTablas, Codigos Base De Datos Excelsa
Tablas, Codigos Base De Datos ExcelsaHéctor
 

Similar to EJERCICIOS DE BENFORTAN (20)

SPOOL output.log DROP TABL.pdf
SPOOL output.log DROP TABL.pdfSPOOL output.log DROP TABL.pdf
SPOOL output.log DROP TABL.pdf
 
Benforta
BenfortaBenforta
Benforta
 
Benforta
BenfortaBenforta
Benforta
 
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdf
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdfSQL FILE FROM MOODLEUSE [master]GO Object Databa.pdf
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdf
 
DROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docx
DROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docxDROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docx
DROP TABLE ordline ;Drop TABLE OrderTBL ;DROP TABLE Customer.docx
 
When debugging the code, use Drop table statementsto drop pr.docx
 When debugging the code, use Drop table statementsto drop pr.docx When debugging the code, use Drop table statementsto drop pr.docx
When debugging the code, use Drop table statementsto drop pr.docx
 
Script de creación de la base de datos pedidos en MS Access
Script de creación de la base de datos pedidos en MS AccessScript de creación de la base de datos pedidos en MS Access
Script de creación de la base de datos pedidos en MS Access
 
Use this script for the assignment.Please follow instructions as t.docx
Use this script for the assignment.Please follow instructions as t.docxUse this script for the assignment.Please follow instructions as t.docx
Use this script for the assignment.Please follow instructions as t.docx
 
Sql commands
Sql commandsSql commands
Sql commands
 
Starting from the database used in Project 1 (see the slightly cha.docx
Starting from the database used in Project 1 (see the slightly cha.docxStarting from the database used in Project 1 (see the slightly cha.docx
Starting from the database used in Project 1 (see the slightly cha.docx
 
Tablas, Codigos De Base De Datos
Tablas, Codigos De Base De DatosTablas, Codigos De Base De Datos
Tablas, Codigos De Base De Datos
 
Bd tienda
Bd tienda Bd tienda
Bd tienda
 
Milestone 1 FINAL
Milestone 1 FINALMilestone 1 FINAL
Milestone 1 FINAL
 
ORM을 맞이하는 우리의 자세
ORM을 맞이하는 우리의 자세ORM을 맞이하는 우리의 자세
ORM을 맞이하는 우리의 자세
 
SQL structure query language full presentation
SQL structure query language full presentationSQL structure query language full presentation
SQL structure query language full presentation
 
SQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docx
SQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docxSQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docx
SQL SQL 2) Add 25 CUSTOMERSs so that you now have 50 total..docx
 
Cine
CineCine
Cine
 
Sql ejercicio 1
Sql ejercicio 1Sql ejercicio 1
Sql ejercicio 1
 
Tablas, Codigos Base De Datos Excelsa
Tablas, Codigos Base De Datos ExcelsaTablas, Codigos Base De Datos Excelsa
Tablas, Codigos Base De Datos Excelsa
 
Use shop
Use shopUse shop
Use shop
 

More from arkangel8801

Anteproyecto renovado
Anteproyecto renovadoAnteproyecto renovado
Anteproyecto renovadoarkangel8801
 
mapa mental de oracle
mapa mental de oraclemapa mental de oracle
mapa mental de oraclearkangel8801
 
Presentacion ANTEPROYECTO
Presentacion ANTEPROYECTOPresentacion ANTEPROYECTO
Presentacion ANTEPROYECTOarkangel8801
 
Inv De Reporteador
Inv De ReporteadorInv De Reporteador
Inv De Reporteadorarkangel8801
 
Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)
Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)
Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)arkangel8801
 
Investigacion De Smdb
Investigacion De SmdbInvestigacion De Smdb
Investigacion De Smdbarkangel8801
 
Investigacion De Smdb
Investigacion De SmdbInvestigacion De Smdb
Investigacion De Smdbarkangel8801
 

More from arkangel8801 (13)

Anteproyecto renovado
Anteproyecto renovadoAnteproyecto renovado
Anteproyecto renovado
 
Sql Server
Sql ServerSql Server
Sql Server
 
mapa mental de oracle
mapa mental de oraclemapa mental de oracle
mapa mental de oracle
 
P H P
P H PP H P
P H P
 
Php
PhpPhp
Php
 
Presentacion ANTEPROYECTO
Presentacion ANTEPROYECTOPresentacion ANTEPROYECTO
Presentacion ANTEPROYECTO
 
Inv De Reporteador
Inv De ReporteadorInv De Reporteador
Inv De Reporteador
 
Smbd_presentacion
Smbd_presentacionSmbd_presentacion
Smbd_presentacion
 
ReseñA+El..
ReseñA+El..ReseñA+El..
ReseñA+El..
 
Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)
Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)
Ejemplo Caso Pratico Ati (Falta Lo De Auditoria Tec. No Esta Traducido)
 
Anteproyecto
AnteproyectoAnteproyecto
Anteproyecto
 
Investigacion De Smdb
Investigacion De SmdbInvestigacion De Smdb
Investigacion De Smdb
 
Investigacion De Smdb
Investigacion De SmdbInvestigacion De Smdb
Investigacion De Smdb
 

Recently uploaded

ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEApsara Of India
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Riya Pathan
 
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service KolhapurVIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service KolhapurRiya Pathan
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)bertfelixtorre
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEApsara Of India
 
fmovies-Movies hold a special place in the hearts
fmovies-Movies hold a special place in the heartsfmovies-Movies hold a special place in the hearts
fmovies-Movies hold a special place in the heartsa18205752
 
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsApsara Of India
 
Fun Call Girls In Goa 7028418221 Call Girl Service In Panaji Escorts
Fun Call Girls In Goa 7028418221 Call Girl Service In Panaji EscortsFun Call Girls In Goa 7028418221 Call Girl Service In Panaji Escorts
Fun Call Girls In Goa 7028418221 Call Girl Service In Panaji EscortsApsara Of India
 
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...anamikaraghav4
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Private Call Girls Bally - 8250192130 | 24x7 Service Available Near Me
Private Call Girls Bally - 8250192130 | 24x7 Service Available Near MePrivate Call Girls Bally - 8250192130 | 24x7 Service Available Near Me
Private Call Girls Bally - 8250192130 | 24x7 Service Available Near MeRiya Pathan
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Riya Pathan
 
(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...
(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...
(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...ranjana rawat
 
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near MeBook Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Meanamikaraghav4
 
Udaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur RajasthanUdaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur RajasthanApsara Of India
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaRiya Pathan
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdfTanjirokamado769606
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Recently uploaded (20)

ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
 
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service KolhapurVIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
 
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
 
fmovies-Movies hold a special place in the hearts
fmovies-Movies hold a special place in the heartsfmovies-Movies hold a special place in the hearts
fmovies-Movies hold a special place in the hearts
 
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
 
Fun Call Girls In Goa 7028418221 Call Girl Service In Panaji Escorts
Fun Call Girls In Goa 7028418221 Call Girl Service In Panaji EscortsFun Call Girls In Goa 7028418221 Call Girl Service In Panaji Escorts
Fun Call Girls In Goa 7028418221 Call Girl Service In Panaji Escorts
 
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
 
Private Call Girls Bally - 8250192130 | 24x7 Service Available Near Me
Private Call Girls Bally - 8250192130 | 24x7 Service Available Near MePrivate Call Girls Bally - 8250192130 | 24x7 Service Available Near Me
Private Call Girls Bally - 8250192130 | 24x7 Service Available Near Me
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
 
(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...
(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...
(KRITI) Pimpri Chinchwad Call Girls Just Call 7001035870 [ Cash on Delivery ]...
 
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near MeBook Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
 
Udaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur RajasthanUdaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
 

EJERCICIOS DE BENFORTAN

  • 1. -478790-81280UNIVERSIDAD VERACRUZANA Facultad de Administración de Empresas EXPERIENCIA: Base de Datos ALUMNO: Lara López Karime Arely Madrigal Sosa Mariel Zarate Osorio Erik Eduardo CATEDRÁTICO: Dr. Carlos Arturo Torres Gastelú INVESTIGACION: Ejercicios De benfortan. CARRERA: Sistemas Computacionales Administrativos Veracruz, ver a 27 de Noviembre de 2009 CODIGO create database Ben CREATE TABLE Customers ( cust_id char(10) NOT NULL , cust_name char(50) NOT NULL , cust_address char(50) NULL , cust_city char(50) NULL , cust_state char(5) NULL , cust_zip char(10) NULL , cust_country char(50) NULL , cust_contact char(50) NULL , cust_email char(255) NULL ); CREATE TABLE OrderItems ( order_num int NOT NULL , order_item int NOT NULL , prod_id char(10) NOT NULL , quantity int NOT NULL , item_price decimal(8,2) NOT NULL ); CREATE TABLE Orders ( order_num int NOT NULL , order_date datetime NOT NULL , cust_id char(10) NOT NULL ); CREATE TABLE Products ( prod_id char(10) NOT NULL , vend_id char(10) NOT NULL , prod_name char(255) NOT NULL , prod_price decimal(8,2) NOT NULL , prod_desc varchar(1000) NULL ); CREATE TABLE Vendors ( vend_id char(10) NOT NULL , vend_name char(50) NOT NULL , vend_address char(50) NULL , vend_city char(50) NULL , vend_state char(5) NULL , vend_zip char(10) NULL , vend_country char(50) NULL ); ALTER TABLE Customers WITH NOCHECK ADD CONSTRAINT PK_Customers PRIMARY KEY CLUSTERED (cust_id); ALTER TABLE OrderItems WITH NOCHECK ADD CONSTRAINT PK_OrderItems PRIMARY KEY CLUSTERED (order_num, order_item); ALTER TABLE Orders WITH NOCHECK ADD CONSTRAINT PK_Orders PRIMARY KEY CLUSTERED (order_num); ALTER TABLE Products WITH NOCHECK ADD CONSTRAINT PK_Products PRIMARY KEY CLUSTERED (prod_id); ALTER TABLE Vendors WITH NOCHECK ADD CONSTRAINT PK_Vendors PRIMARY KEY CLUSTERED (vend_id); ALTER TABLE OrderItems ADD CONSTRAINT FK_OrderItems_Orders FOREIGN KEY (order_num) REFERENCES Orders (order_num), CONSTRAINT FK_OrderItems_Products FOREIGN KEY (prod_id) REFERENCES Products (prod_id); ALTER TABLE Orders ADD CONSTRAINT FK_Orders_Customers FOREIGN KEY (cust_id) REFERENCES Customers (cust_id); ALTER TABLE Products ADD CONSTRAINT FK_Products_Vendors FOREIGN KEY (vend_id) REFERENCES Vendors (vend_id); CODIGO PARA INSERTAR DATOS INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) VALUES('1000000001', 'Village Toys', '200 Maple Lane', 'Detroit', 'MI', '44444', 'USA', 'John Smith', 'sales@villagetoys.com'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact) VALUES('1000000002', 'Kids Place', '333 South Lake Drive', 'Columbus', 'OH', '43333', 'USA', 'Michelle Green'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) VALUES('1000000003', 'Fun4All', '1 Sunny Place', 'Muncie', 'IN', '42222', 'USA', 'Jim Jones', 'jjones@fun4all.com'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) VALUES('1000000004', 'Fun4All', '829 Riverside Drive', 'Phoenix', 'AZ', '88888', 'USA', 'Denise L. Stephens', 'dstephens@fun4all.com'); INSERT INTO Customers(cust_id, cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country, cust_contact) VALUES('1000000005', 'The Toy Store', '4545 53rd Street', 'Chicago', 'IL', '54545', 'USA', 'Kim Howard'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('BRS01','Bears R Us','123 Main Street','Bear Town','MI','44444', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('BRE02','Bear Emporium','500 Park Street','Anytown','OH','44333', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('DLL01','Doll House Inc.','555 High Street','Dollsville','CA','99999', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('FRB01','Furball Inc.','1000 5th Avenue','New York','NY','11111', 'USA'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('FNG01','Fun and Games','42 Galaxy Road','London', NULL,'N16 6PS', 'England'); INSERT INTO Vendors(vend_id, vend_name, vend_address, vend_city, vend_state, vend_zip, vend_country) VALUES('JTS01','Jouets et ours','1 Rue Amusement','Paris', NULL,'45678', 'France'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BR01', 'BRS01', '8 inch teddy bear', 5.99, '8 inch teddy bear, comes with cap and jacket'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BR02', 'BRS01', '12 inch teddy bear', 8.99, '12 inch teddy bear, comes with cap and jacket'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BR03', 'BRS01', '18 inch teddy bear', 11.99, '18 inch teddy bear, comes with cap and jacket'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BNBG01', 'DLL01', 'Fish bean bag toy', 3.49, 'Fish bean bag toy, complete with bean bag worms with which to feed it'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BNBG02', 'DLL01', 'Bird bean bag toy', 3.49, 'Bird bean bag toy, eggs are not included'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('BNBG03', 'DLL01', 'Rabbit bean bag toy', 3.49, 'Rabbit bean bag toy, comes with bean bag carrots'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('RGAN01', 'DLL01', 'Raggedy Ann', 4.99, '18 inch Raggedy Ann doll'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('RYL01', 'FNG01', 'King doll', 9.49, '12 inch king doll with royal garments and crown'); INSERT INTO Products(prod_id, vend_id, prod_name, prod_price, prod_desc) VALUES('RYL02', 'FNG01', 'Queen doll', 9.49, '12 inch queen doll with royal garments and crown'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20005, '2004-05-01', '1000000001'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20006, '2004-01-12', '1000000003'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20007, '2004-01-03', '1000000004'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20008, '2004-02-03', '1000000005'); INSERT INTO Orders(order_num, order_date, cust_id) VALUES(20009, '2004-02-08', '1000000001'); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20005, 1, 'BR01', 100, 5.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20005, 2, 'BR03', 100, 10.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20006, 1, 'BR01', 20, 5.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20006, 2, 'BR02', 10, 8.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20006, 3, 'BR03', 10, 11.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 1, 'BR03', 50, 11.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 2, 'BNBG01', 100, 2.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 3, 'BNBG02', 100, 2.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 4, 'BNBG03', 100, 2.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20007, 5, 'RGAN01', 50, 4.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 1, 'RGAN01', 5, 4.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 2, 'BR03', 5, 11.99); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 3, 'BNBG01', 10, 3.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 4, 'BNBG02', 10, 3.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20008, 5, 'BNBG03', 10, 3.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20009, 1, 'BNBG01', 250, 2.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20009, 2, 'BNBG02', 250, 2.49); INSERT INTO OrderItems(order_num, order_item, prod_id, quantity, item_price) VALUES(20009, 3, 'BNBG03', 250, 2.49); PANTALLAS lefttopt t VISTAS