SlideShare a Scribd company logo
1 of 22
-------------------------
-- Create Departmentsstable
-------------------------
CREATE TABLE Departmentss
(
dept_id smallint NOTNULL ,
dept_name varchar(20) NOT NULL
);
--------------------------
-- Create ProductType table
--------------------------
CREATE TABLE ProductType
(
product_type_id varchar(10) NOTNULL ,
product_type_name varchar(50) NOTNULL ,
);
----------------------
-- Create Product table
----------------------
CREATE TABLE Product
(
product_id varchar(10) NOT NULL ,
product_name varchar(50) NOT NULL ,
Product_type_id varchar(10) NOTNULL ,
date_offereddatetime NOTNULL,
date_retireddatetime NOTNULL,
);
------------------------
-- Create Account table
------------------------
CREATE TABLE Account
(
account_id Integer NOT NULL ,
product_id varchar(10) NOT NULL ,
custom_id integer NOT NULL ,
open_date date NOTNULL ,
close_date date NOTNULL ,
last_activity date NOTNULL ,
account_status varchar(10) NULL,
branch_id smallintNOTNULL,
emp_id smallintNOTNULL,
avail_balance float(10,2) NOTNULL,
pending_balance float(10,2) NOTNULL,
);
-----------------------
-- Create Customertable
-----------------------
CREATE TABLE Customer
(
custom_id integer NOTNULL ,
custom_type char(2) NOTNULL,
fed_id varchar(12) NOTNULL ,
custom_addressvarchar(30) NULL ,
custom_city varchar(20) NULL ,
custom_state varchar(20) NULL ,
custom_zip varchar(10) NULL ,
);
-----------------------
-- Create Businesstable
-----------------------
CREATE TABLE Business
(
busi_id char(10) NOTNULL ,
custom_id integer NOTNULL ,
busi_name varchar(40) NOT NULL ,
id_state char(5) NOT NULL ,
incorp_date date NOTNULL
);
-----------------------
-- Create Officertable
-----------------------
CREATE TABLE Officer
(
officer_idsmallintNOTNULL ,
custom_id integer NOT NULL ,
first_name varchar(30) NOTNULL ,
last_name varchar(30) NOT NULL ,
starts_date date NOT NULL ,
end_date date NOT NULL
);
-----------------------
-- Create Individual table
-----------------------
CREATE TABLE Individual
(
individual_id char(10) NOTNULL ,
custom_id integer NOT NULL ,
f_name varchar(30) NOT NULL ,
l_name varchar(30) NOT NULL ,
birth_date date NOT NULL
);
-----------------------
-- Create Transactions table
-----------------------
CREATE TABLE Transactions
(
txn_id integerNOTNULL ,
txn_date datetime NOTNULL ,
account_id integer NOTNULL ,
txn_type_od varchar(10) NOT NULL ,
amount double(10,2) NULL,
emp_id smallint NOTNULL ,
branch_id smallintNOTNULL ,
funds_avail date NOT NULL
);
-----------------------
-- Create Employee table
-----------------------
CREATE TABLE Employee
(
emp_id smallint NOTNULL ,
fname varchar(20) NOT NULL ,
lname varchar(20) NOT NULL ,
s_date date NOT NULL ,
e_date date NOT NULL ,
superior_emp_id smallint NOTNULL ,
dept_id smallint NOTNULL ,
tit varchar(20) NULL,
branch_idsmallintNOTNULL
);
-----------------------
-- Create Branch table
-----------------------
CREATE TABLE Branch
(
branch_id smallintNOTNULL,
branch_name varchar(20) NOT NULL ,
branch_addresschar(30) NULL ,
branch_city char(20) NULL ,
branch_state varchar(20) NULL ,
branch_zip char(12) NULL ,
);
----------------------
-- Define primary keys
----------------------
ALTER TABLE CustomerWITHNOCHECKADD CONSTRAINTPK_CustomerPRIMARYKEYCLUSTERED
(custom_id);
ALTER TABLE Branch WITH NOCHECKADD CONSTRAINTPK_BranchPRIMARYKEY CLUSTERED
(branch_id);
ALTER TABLE Product_type WITHNOCHECKADD CONSTRAINTPK_Product_type PRIMARYKEY
CLUSTERED (product_type_id);
ALTER TABLE ProductWITH NOCHECKADD CONSTRAINTPK_ProductPRIMARYKEY CLUSTERED
(product_id);
ALTER TABLE AccountWITH NOCHECKADD CONSTRAINTPK_AccountPRIMARYKEY CLUSTERED
(account_id);
ALTER TABLE OfficerWITHNOCHECKADD CONSTRAINTPK_OfficerPRIMARYKEYCLUSTERED
(officer_id);
ALTER TABLE BusinessWITHNOCHECKADDCONSTRAINTPK_BusinessPRIMARYKEYCLUSTERED
(busi_id);
ALTER TABLE Individual WITHNOCHECKADDCONSTRAINTPK_Individual PRIMARYKEYCLUSTERED
(individual_id);
ALTER TABLE Employee WITHNOCHECKADDCONSTRAINTPK_Employee PRIMARYKEYCLUSTERED
(emp_id);
ALTER TABLE TransactionsWITH NOCHECKADD CONSTRAINTPK_TransactionsPRIMARYKEY
CLUSTERED (txn_id);
ALTER TABLE DeparmentsWITHNOCHECKADD CONSTRAINTPK_DepartmentsPRIMARYKEY
CLUSTERED (dept_id);
----------------------
-- Define foreignkeys
----------------------
ALTER TABLE ProductADD
CONSTRAINTFK_Product_ProductType FOREIGN KEY(product_type_id) REFERENCESProductType
(product_type_id);
ALTER TABLE AccountADD
CONSTRAINTFK_Account_ProductFOREIGN KEY(product_id) REFERENCESProduct(product_id),
CONSTRAINTFK_Account_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer
(custom_id),
CONSTRAINTFK_Account_Branch FOREIGN KEY (branch_id) REFERENCESBranch(branch_id),
CONSTRAINTFK_Account_EmployeeFOREIGN KEY(emp_id) REFERENCESEmployee (emp_id);
ALTER TABLE BusinessADD
CONSTRAINTFK_Business_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer
(custom_id);
ALTER TABLE Individual ADD
CONSTRAINTFK_Individual_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer
(custom_id);
ALTER TABLE OfficerADD
CONSTRAINTFK_Officer_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer(custom_id);
ALTER TABLE TransactionsADD
CONSTRAINTFK_Transactions_AccountFOREIGN KEY(account_id) REFERENCESAccount
(account_id),
CONSTRAINTFK_Transactions_Employee FOREIGN KEY(emp_id) REFERENCESEmployee (emp_id),
CONSTRAINTFK_Transactions_BranchFOREIGN KEY(branch_id) REFERENCESBranch (branch_id);
ALTER TABLE Employee ADD
CONSTRAINTFK_Employee_DepartmentsFOREIGN KEY(dept_id) REFERENCESDeparments
(dept_id),
CONSTRAINTFK_Employee_EmployeeFOREIGN KEY(superior_emp_id) REFERENCESEmployee
(superior_emp_id),
CONSTRAINTFK_Employee_BranchFOREIGN KEY(branch_id) REFERENCESBranch(branch_id);
---TRANSACTIONS---
INSERT INTOTransactions
(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00001,'2005-02-22',101,'CDT','1000.00',1,901,'2005-02-22')
INSERT INTO
Transactions(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00002,'2005-02-23',102,'CDT','525.75',2,902,'2005-02-23')
INSERT INTOTransactions
(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00003,'2005-02-24',103,'DBT','100.00',3,903,'2005-02-24')
INSERT INTOTransactions
(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00004,'2005-02-24',104,'CDT','55',4,904,'2005-02-25')
INSERT INTOTransactions
(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00005,'2005-02-25',105,'DBT','50',5,905,'2005-02-26')
INSERT INTOTransactions
(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00007,'2005-02-25',107,'CDT','125.37',6,906,'2005-02-27')
INSERT INTOTransactions
(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00008,'2005-02-26',108,'DBT','10',7,907,'2005-02-28')
INSERT INTOTransactions
(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail)
VALUES(00009,'2005-02-27',109,'CDT','75',8,908,'2005-02-29')
----ACCOUNT-----
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(101,20001,0001,'2005-02-22','2005-03-02','2005-05-11','active',901,1,'1000.00','200')
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(102,20002,0002,'2005-02-23','2005-03-03','2005-05-12','active',902,2,'1000.00','200')
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(103,20003,0003,'2005-02-24','2005-03-04','2005-05-13','active',903,3,'1000.00','200')
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(104,20004,0004,'2005-02-25','2005-03-05','2005-05-14','active',904,4,'1000.00','200')
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(105,20005,0005,'2005-02-26','2005-03-06','2005-05-15','inactive',905,5,'1000.00','200')
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(107,20006,0006,'2005-02-27','2005-04-07','2005-05-15','inactive',906,6,'1000.00','200')
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(108,20007,0007,'2005-02-28','2005-04-08','2005-05-16','inactive',907,7,'1000.00','200')
INSERT INTO
Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra
nch_id,emp_id,avail_balance,pending_balance)
VALUES(109,20009,0008,'2005-02-29','2005-04-09','2005-05-17','inactive',908,8,'1000.00','200')
----EMPLOYEE-------
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(1,'Michael','Smith','2005-04-03','2008-04-03',801,501,'informatica',901)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(2, 'Susan','Barker','2005-04-03','2008-04-03',802,502,'gerente',902)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(3,'Robert','Tyler','2005-04-03','2008-04-03',803,503,'contador',903)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(4,'Susan','Hawthorne','2005-04-03','2008-04-03',805,504,'gerente',904)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(5,'John','Gooding','2005-04-03','2008-04-03',805,505,'acesor',905)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(6,'Helen','Fleming','2005-04-03','2008-04-03',806,506,'acesor de tramites',906)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(7,'Chris','Tucker','2005-04-03','2008-04-03',807,507,'operador',907)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(8,'Sarah','Parker','2005-04-03','2008-04-03',808,508,'cajero',908)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(9,'Jane','Grossman','2005-04-03','2008-04-03',809,509,'ejecutivo',909)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(10, 'Paula','Roberts','2005-04-03','2008-04-03',810,510,'abogado',910)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(11, 'Thomas','Ziegler','2005-04-03','2008-04-03',811,511,'policia',911)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(12, 'Samantha','Jameson','2005-04-03','2008-04-03',812,512,'intendente',913)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(13, 'John','Blake','2005-04-03','2008-04-03',813,513,'ejecutivo',914)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(14, 'Cindy','Mason','2005-04-03','2008-04-03',814,514,'diseñador',915)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(15, 'Frank','Portmant','2005-04-03','2008-04-03',815,515,'abogado',915)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(16, 'Theresa','Markham','2005-04-03','2008-04-03',816,516,'acesor',916)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(17, 'Beth','Fowler','2005-04-03','2008-04-03',817,517,'ejecutivo',917)
INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id,
dept_id,tit,branch_id)
VALUES(18, 'Rick','Tulman','2005-04-03','2008-04-03',818,518,'cobrador',918)
----PRODUCTYPE-------
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(601,'credito')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(602,'debito')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(603,'platino')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(604,'dorada')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(605,'empresarial')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(606,'preferente')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(607,'credito')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(608,'debito')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(609,'platino')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(610,'preferente')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(611,'empresarial')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(612,'dorada')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(613,'credito')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(614,'debito')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(615,'empresarial')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(616,'platino')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(617,'dorada')
INSERT INTOProductType( product_type_id,product_type_name)
VALUES(618,'credito')
------PRODUCT----------
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20001,'tarjeta',601,'2005-01-28','2006-01-05')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20002,'tarjeta',602,'2005-02-28','2006-02-06')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20003,'tarjeta',603,'2005-03-28','2006-03-07')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20004,'tarjeta',604,'2005-04-28','2006-04-11')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20005,'tarjeta',605,'2005-05-28','2006-05-30')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20006,'tarjeta',606,'2005-06-28','2006-06-24')
INSERT INTOProduct( product_id,product_name, product_type_id,date_offered,date_retired)
VALUES(20007,'tarjeta',607,'2005-07-28','2006-07-28')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20008,'tarjeta',608,'2005-08-28','2006-08-14')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20009,'tarjeta',609,'2005-09-28','2006-09-16')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20010,'tarjeta',610,'2005-10-28','2006-10-15')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20011,'tarjeta',611,'2005-11-28','2006-11-13')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20012,'tarjeta',612,'2005-12-28','2006-12-29')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20013,'tarjeta',613,'2005-01-28','2006-02-28')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20014,'tarjeta',614,'2005-02-28','2006-03-31')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20015,'tarjeta',615,'2005-03-28','2006-04-19')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20016,'tarjeta',616,'2005-04-28','2006-05-02')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20017,'tarjeta',617,'2005-05-28','2006-06-08')
INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
VALUES(20018,'tarjeta',618,'2005-06-28','2006-07-12')
--------BRANCH--------
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(901,'diazmiron','diazmiron#655','veracruz','veracruz','91700')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(902,'independencia','independencia #273','veracruz','veracruz','91710' )
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(903,'ruizcortinez','ruizcortinez#949','veracruz','veracruz','91720')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(904,'2 de abril','2 de abril #399','veracruz','veracruz','91730')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(905,'20 de noviembre','diazmiron#8838','veracruz','veracruz','91740')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(906,'bolivar','bolivar#427','veracruz','veracruz','91750')
INSERT INTOBranch( branch_id,branch_name, branch_address,
branch_city,branch_state,branch_zip)
VALUES(907,'reforma','reforma#345','veracruz','veracruz','91760')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(908,'juanpabloII','juanpablo II #8060','veracruz','veracruz','91770')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(909,'costa verde','costaverde #6780','veracruz','veracruz','91780')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(910,'costa de oro','costa de oro #523','veracruz','veracruz','91790')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(911,'cuauhtemoc','cuauhtemoc#499','veracruz','veracruz','91800')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(912,'miguel aleman','miguel aleman#324','veracruz','veracruz','91810')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(913,'circunvalacion','circunvalacion#7011','veracruz','veracruz','91820')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(914,'la fragua','lafragua#6030','veracruz','veracruz','91830')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(915,'marti','marti #7030','veracruz','veracruz','91840')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(916,'americas','americas#1110','veracruz','veracruz','91850')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(917,'5 de mayo','5 de mayo #220','veracruz','veracruz','91860')
INSERT INTOBranch( branch_id,branch_name,branch_address,
branch_city,branch_state,branch_zip)
VALUES(918,'hidalgo','hidalgo#330','veracruz','veracruz','91870')
----CUSTOMER-----
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0001', 'ep','00012341', 'reforma#145', 'mexico','veracruz','95400');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0002', 'pl','00012342', 'carpio #43', 'mexico','guadalajara','94670');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0003','pr', '00012343', 'libertad#1136', 'mexico','xalapa', '45678');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0004', 'hm', '00012344', 'campo real #717', 'mexico','monterrey','45678');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0005', 'pl','00012345', 'ruiz cortinez#67', 'mexico','veracruz','95400');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0006', 'ep','00012346', 'diaz miron#654', 'mexico','veracruz','95400');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0007', 'hm', '00012347', '2 de abril #245', 'mexico','yucatan','45673');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0008', 'pr', '00012348', '20 de noviembre #1678', 'mexico','guanajuato','56433');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0009', 'pl','00012349', 'murillovidal #25', 'mexico','veracruz','95400');
INSERT INTOCustomer(custom_id,
custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
VALUES('0010', 'ep','00012351', 'arriola molina#456', 'mexico','xalapa','45678');
------OFFICER-------
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('1000', '0001', 'roberto','meguelle','2010/08/03', '2010/12/31');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('2000', '0002', 'juan carlos','vidal','1990/10/23', '1995/05/29');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('3000', '0003', 'fernando','guzman','2010/01/03', '2010/08/16');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('4000', '0004', 'enrique','rodriguez','2010/05/07', '2010/07/12');
INSERT INTOOfficer(officer_id, custom_id,first_name,last_name,starts_date,end_date)
VALUES('5000', '0005', 'jose','mimendi','2010/02/14', '2010/03/19');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('6000', '0006', 'ivan','nicanor', '2000/09/12', '2003/12/17');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('7000', '0007', 'jonathan','nieto','2008/05/18', '2010/11/22');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('8000', '0008', 'julian','hernandez','2003/10/16', '2005/09/11');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('9000', '0009', 'arturo', 'lopez','2010/01/03', '2010/12/31');
INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
VALUES('1100', '0010', 'noe','avila','2007/07/25', '2010/11/20');
----------BUSINESS--------
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123451', '0001', 'tramite tarjeta','ver','2010/09/10');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123452', '0002', 'asesoriabancaria','gdl', '2003/06/19');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123453', '0003', 'cuentacheques','xlp','2001/01/22');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123454', '0004', 'tramite tarjeta','mty', '2006/01/11');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123455', '0005', 'cancelacion','ver','2006/04/24');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123456', '0006', 'deposito','ver', '2010/06/15');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123457', '0007', 'retiroenefectivo','mex','2009/10/24');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123458', '0008', 'tramite de tarjeta','ver', '2008/07/09');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123459', '0009', 'deposito','gdl','2010/08/08');
INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
VALUES('123461', '0010', 'cuentacheques','mex','2000/09/10');
------------INDIVIDUAL-----------
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10131', '0001', 'monica','lorenzo','1984/09/11');
INSERT INTOIndividual(individual_id,custom_id,f_name, l_name,birth_date)
VALUES('10132', '0002', 'mariana','camara', '1986/11/23');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10133', '0003', 'victor','vidal','1990/03/15');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10134', '0004', 'manuel','hernandez','1970/07/17');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10135', '0005', 'gonzalo','nicanor','1978/01/05');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10136', '0006', 'daniel','limon','1976/02/14');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10137', '0007', 'lorena','perez','1979/11/11');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10138', '0008', 'zamara', 'moreno','1984/03/22');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10139', '0009', 'saul','zamorano','1989/12/01');
INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
VALUES('10140', '0010', 'johnny','granda','1978/07/01');

More Related Content

Similar to Actividad 1 de unidad 4

Try PostgreSQL on linux
Try PostgreSQL on linuxTry PostgreSQL on linux
Try PostgreSQL on linuxAey Unthika
 
- Php myadmin sql dump-- version 4.0.10.7-- httpwww.php
 - Php myadmin sql dump-- version 4.0.10.7-- httpwww.php - Php myadmin sql dump-- version 4.0.10.7-- httpwww.php
- Php myadmin sql dump-- version 4.0.10.7-- httpwww.phpssuserfa5723
 
CreacióN Tablas En Oracle
CreacióN Tablas En OracleCreacióN Tablas En Oracle
CreacióN Tablas En Oracleesacre
 
Databricks Sql cheatseet for professional exam
Databricks Sql cheatseet for professional examDatabricks Sql cheatseet for professional exam
Databricks Sql cheatseet for professional examRupiniSarguru
 
database-querry-student-note
database-querry-student-notedatabase-querry-student-note
database-querry-student-noteLeerpiny Makouach
 
data constraints,group by
data constraints,group by data constraints,group by
data constraints,group by Visakh V
 

Similar to Actividad 1 de unidad 4 (9)

Try PostgreSQL on linux
Try PostgreSQL on linuxTry PostgreSQL on linux
Try PostgreSQL on linux
 
- Php myadmin sql dump-- version 4.0.10.7-- httpwww.php
 - Php myadmin sql dump-- version 4.0.10.7-- httpwww.php - Php myadmin sql dump-- version 4.0.10.7-- httpwww.php
- Php myadmin sql dump-- version 4.0.10.7-- httpwww.php
 
Code snipplets
Code snippletsCode snipplets
Code snipplets
 
SAV
SAVSAV
SAV
 
CreacióN Tablas En Oracle
CreacióN Tablas En OracleCreacióN Tablas En Oracle
CreacióN Tablas En Oracle
 
Databricks Sql cheatseet for professional exam
Databricks Sql cheatseet for professional examDatabricks Sql cheatseet for professional exam
Databricks Sql cheatseet for professional exam
 
Create
CreateCreate
Create
 
database-querry-student-note
database-querry-student-notedatabase-querry-student-note
database-querry-student-note
 
data constraints,group by
data constraints,group by data constraints,group by
data constraints,group by
 

More from sergio

Ensayo u4
Ensayo u4Ensayo u4
Ensayo u4sergio
 
Actividad 2 de la unidad 5
Actividad 2 de la unidad 5Actividad 2 de la unidad 5
Actividad 2 de la unidad 5sergio
 
Ati u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcingAti u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcingsergio
 
Ati u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcingAti u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcingsergio
 
Ati u3 cap7_eq6_map_outsourcing
Ati u3 cap7_eq6_map_outsourcingAti u3 cap7_eq6_map_outsourcing
Ati u3 cap7_eq6_map_outsourcingsergio
 
Caso de estudio outsourcing 2007
Caso de estudio outsourcing 2007Caso de estudio outsourcing 2007
Caso de estudio outsourcing 2007sergio
 
Justificacion de outsourcing
Justificacion de outsourcingJustificacion de outsourcing
Justificacion de outsourcingsergio
 
Ejemplos de outsourcing
Ejemplos de outsourcingEjemplos de outsourcing
Ejemplos de outsourcingsergio
 
Plan estrategico de grutnitski
Plan estrategico de grutnitskiPlan estrategico de grutnitski
Plan estrategico de grutnitskisergio
 
Plan estratégico de si de Lerma
Plan estratégico de si de LermaPlan estratégico de si de Lerma
Plan estratégico de si de Lermasergio
 
Plan estrategico de si de lerma
Plan estrategico de si de lermaPlan estrategico de si de lerma
Plan estrategico de si de lermasergio
 
Plan estrategico general
Plan estrategico generalPlan estrategico general
Plan estrategico generalsergio
 
Plan estrategico de gurtniski
Plan estrategico de gurtniskiPlan estrategico de gurtniski
Plan estrategico de gurtniskisergio
 
Actividades unidad 2
Actividades unidad 2Actividades unidad 2
Actividades unidad 2sergio
 
Ati l1 eq6_map_admon tecnologia
Ati l1 eq6_map_admon tecnologiaAti l1 eq6_map_admon tecnologia
Ati l1 eq6_map_admon tecnologiasergio
 
Actividad 1 de unidad 5
Actividad 1 de unidad 5Actividad 1 de unidad 5
Actividad 1 de unidad 5sergio
 
Consultas del equipo 8
Consultas del equipo 8Consultas del equipo 8
Consultas del equipo 8sergio
 
Benford
BenfordBenford
Benfordsergio
 
Reportes
ReportesReportes
Reportessergio
 

More from sergio (20)

Ensayo u4
Ensayo u4Ensayo u4
Ensayo u4
 
Actividad 2 de la unidad 5
Actividad 2 de la unidad 5Actividad 2 de la unidad 5
Actividad 2 de la unidad 5
 
Cemex
CemexCemex
Cemex
 
Ati u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcingAti u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcing
 
Ati u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcingAti u3 cap8_eq6_map_outsourcing
Ati u3 cap8_eq6_map_outsourcing
 
Ati u3 cap7_eq6_map_outsourcing
Ati u3 cap7_eq6_map_outsourcingAti u3 cap7_eq6_map_outsourcing
Ati u3 cap7_eq6_map_outsourcing
 
Caso de estudio outsourcing 2007
Caso de estudio outsourcing 2007Caso de estudio outsourcing 2007
Caso de estudio outsourcing 2007
 
Justificacion de outsourcing
Justificacion de outsourcingJustificacion de outsourcing
Justificacion de outsourcing
 
Ejemplos de outsourcing
Ejemplos de outsourcingEjemplos de outsourcing
Ejemplos de outsourcing
 
Plan estrategico de grutnitski
Plan estrategico de grutnitskiPlan estrategico de grutnitski
Plan estrategico de grutnitski
 
Plan estratégico de si de Lerma
Plan estratégico de si de LermaPlan estratégico de si de Lerma
Plan estratégico de si de Lerma
 
Plan estrategico de si de lerma
Plan estrategico de si de lermaPlan estrategico de si de lerma
Plan estrategico de si de lerma
 
Plan estrategico general
Plan estrategico generalPlan estrategico general
Plan estrategico general
 
Plan estrategico de gurtniski
Plan estrategico de gurtniskiPlan estrategico de gurtniski
Plan estrategico de gurtniski
 
Actividades unidad 2
Actividades unidad 2Actividades unidad 2
Actividades unidad 2
 
Ati l1 eq6_map_admon tecnologia
Ati l1 eq6_map_admon tecnologiaAti l1 eq6_map_admon tecnologia
Ati l1 eq6_map_admon tecnologia
 
Actividad 1 de unidad 5
Actividad 1 de unidad 5Actividad 1 de unidad 5
Actividad 1 de unidad 5
 
Consultas del equipo 8
Consultas del equipo 8Consultas del equipo 8
Consultas del equipo 8
 
Benford
BenfordBenford
Benford
 
Reportes
ReportesReportes
Reportes
 

Recently uploaded

Investment analysis and portfolio management
Investment analysis and portfolio managementInvestment analysis and portfolio management
Investment analysis and portfolio managementJunaidKhan750825
 
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...Khaled Al Awadi
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Timedelhimodelshub1
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiMalviyaNagarCallGirl
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckHajeJanKamps
 
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDFCATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDFOrient Homes
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creationsnakalysalcedo61
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...lizamodels9
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsApsara Of India
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdfOrient Homes
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfCatalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfOrient Homes
 

Recently uploaded (20)

Investment analysis and portfolio management
Investment analysis and portfolio managementInvestment analysis and portfolio management
Investment analysis and portfolio management
 
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Time
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
 
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDFCATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creations
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdf
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfCatalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
 

Actividad 1 de unidad 4

  • 1.
  • 2. ------------------------- -- Create Departmentsstable ------------------------- CREATE TABLE Departmentss ( dept_id smallint NOTNULL , dept_name varchar(20) NOT NULL ); -------------------------- -- Create ProductType table -------------------------- CREATE TABLE ProductType ( product_type_id varchar(10) NOTNULL , product_type_name varchar(50) NOTNULL , ); ---------------------- -- Create Product table ---------------------- CREATE TABLE Product ( product_id varchar(10) NOT NULL , product_name varchar(50) NOT NULL , Product_type_id varchar(10) NOTNULL , date_offereddatetime NOTNULL,
  • 3. date_retireddatetime NOTNULL, ); ------------------------ -- Create Account table ------------------------ CREATE TABLE Account ( account_id Integer NOT NULL , product_id varchar(10) NOT NULL , custom_id integer NOT NULL , open_date date NOTNULL , close_date date NOTNULL , last_activity date NOTNULL , account_status varchar(10) NULL, branch_id smallintNOTNULL, emp_id smallintNOTNULL, avail_balance float(10,2) NOTNULL, pending_balance float(10,2) NOTNULL, ); ----------------------- -- Create Customertable ----------------------- CREATE TABLE Customer
  • 4. ( custom_id integer NOTNULL , custom_type char(2) NOTNULL, fed_id varchar(12) NOTNULL , custom_addressvarchar(30) NULL , custom_city varchar(20) NULL , custom_state varchar(20) NULL , custom_zip varchar(10) NULL , ); ----------------------- -- Create Businesstable ----------------------- CREATE TABLE Business ( busi_id char(10) NOTNULL , custom_id integer NOTNULL , busi_name varchar(40) NOT NULL , id_state char(5) NOT NULL , incorp_date date NOTNULL ); ----------------------- -- Create Officertable -----------------------
  • 5. CREATE TABLE Officer ( officer_idsmallintNOTNULL , custom_id integer NOT NULL , first_name varchar(30) NOTNULL , last_name varchar(30) NOT NULL , starts_date date NOT NULL , end_date date NOT NULL ); ----------------------- -- Create Individual table ----------------------- CREATE TABLE Individual ( individual_id char(10) NOTNULL , custom_id integer NOT NULL , f_name varchar(30) NOT NULL , l_name varchar(30) NOT NULL , birth_date date NOT NULL ); ----------------------- -- Create Transactions table -----------------------
  • 6. CREATE TABLE Transactions ( txn_id integerNOTNULL , txn_date datetime NOTNULL , account_id integer NOTNULL , txn_type_od varchar(10) NOT NULL , amount double(10,2) NULL, emp_id smallint NOTNULL , branch_id smallintNOTNULL , funds_avail date NOT NULL ); ----------------------- -- Create Employee table ----------------------- CREATE TABLE Employee ( emp_id smallint NOTNULL , fname varchar(20) NOT NULL , lname varchar(20) NOT NULL , s_date date NOT NULL , e_date date NOT NULL , superior_emp_id smallint NOTNULL , dept_id smallint NOTNULL , tit varchar(20) NULL, branch_idsmallintNOTNULL
  • 7. ); ----------------------- -- Create Branch table ----------------------- CREATE TABLE Branch ( branch_id smallintNOTNULL, branch_name varchar(20) NOT NULL , branch_addresschar(30) NULL , branch_city char(20) NULL , branch_state varchar(20) NULL , branch_zip char(12) NULL , ); ---------------------- -- Define primary keys ---------------------- ALTER TABLE CustomerWITHNOCHECKADD CONSTRAINTPK_CustomerPRIMARYKEYCLUSTERED (custom_id); ALTER TABLE Branch WITH NOCHECKADD CONSTRAINTPK_BranchPRIMARYKEY CLUSTERED (branch_id); ALTER TABLE Product_type WITHNOCHECKADD CONSTRAINTPK_Product_type PRIMARYKEY CLUSTERED (product_type_id); ALTER TABLE ProductWITH NOCHECKADD CONSTRAINTPK_ProductPRIMARYKEY CLUSTERED (product_id); ALTER TABLE AccountWITH NOCHECKADD CONSTRAINTPK_AccountPRIMARYKEY CLUSTERED (account_id);
  • 8. ALTER TABLE OfficerWITHNOCHECKADD CONSTRAINTPK_OfficerPRIMARYKEYCLUSTERED (officer_id); ALTER TABLE BusinessWITHNOCHECKADDCONSTRAINTPK_BusinessPRIMARYKEYCLUSTERED (busi_id); ALTER TABLE Individual WITHNOCHECKADDCONSTRAINTPK_Individual PRIMARYKEYCLUSTERED (individual_id); ALTER TABLE Employee WITHNOCHECKADDCONSTRAINTPK_Employee PRIMARYKEYCLUSTERED (emp_id); ALTER TABLE TransactionsWITH NOCHECKADD CONSTRAINTPK_TransactionsPRIMARYKEY CLUSTERED (txn_id); ALTER TABLE DeparmentsWITHNOCHECKADD CONSTRAINTPK_DepartmentsPRIMARYKEY CLUSTERED (dept_id); ---------------------- -- Define foreignkeys ---------------------- ALTER TABLE ProductADD CONSTRAINTFK_Product_ProductType FOREIGN KEY(product_type_id) REFERENCESProductType (product_type_id); ALTER TABLE AccountADD CONSTRAINTFK_Account_ProductFOREIGN KEY(product_id) REFERENCESProduct(product_id), CONSTRAINTFK_Account_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer (custom_id), CONSTRAINTFK_Account_Branch FOREIGN KEY (branch_id) REFERENCESBranch(branch_id), CONSTRAINTFK_Account_EmployeeFOREIGN KEY(emp_id) REFERENCESEmployee (emp_id); ALTER TABLE BusinessADD CONSTRAINTFK_Business_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer (custom_id); ALTER TABLE Individual ADD
  • 9. CONSTRAINTFK_Individual_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer (custom_id); ALTER TABLE OfficerADD CONSTRAINTFK_Officer_CustomerFOREIGN KEY(custom_id) REFERENCESCustomer(custom_id); ALTER TABLE TransactionsADD CONSTRAINTFK_Transactions_AccountFOREIGN KEY(account_id) REFERENCESAccount (account_id), CONSTRAINTFK_Transactions_Employee FOREIGN KEY(emp_id) REFERENCESEmployee (emp_id), CONSTRAINTFK_Transactions_BranchFOREIGN KEY(branch_id) REFERENCESBranch (branch_id); ALTER TABLE Employee ADD CONSTRAINTFK_Employee_DepartmentsFOREIGN KEY(dept_id) REFERENCESDeparments (dept_id), CONSTRAINTFK_Employee_EmployeeFOREIGN KEY(superior_emp_id) REFERENCESEmployee (superior_emp_id), CONSTRAINTFK_Employee_BranchFOREIGN KEY(branch_id) REFERENCESBranch(branch_id); ---TRANSACTIONS--- INSERT INTOTransactions (txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00001,'2005-02-22',101,'CDT','1000.00',1,901,'2005-02-22') INSERT INTO Transactions(txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00002,'2005-02-23',102,'CDT','525.75',2,902,'2005-02-23') INSERT INTOTransactions (txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00003,'2005-02-24',103,'DBT','100.00',3,903,'2005-02-24') INSERT INTOTransactions (txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00004,'2005-02-24',104,'CDT','55',4,904,'2005-02-25')
  • 10. INSERT INTOTransactions (txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00005,'2005-02-25',105,'DBT','50',5,905,'2005-02-26') INSERT INTOTransactions (txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00007,'2005-02-25',107,'CDT','125.37',6,906,'2005-02-27') INSERT INTOTransactions (txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00008,'2005-02-26',108,'DBT','10',7,907,'2005-02-28') INSERT INTOTransactions (txn_id,txn_date,account_id,txn_type_od,amount,emp_id,branch_id,funds_avail) VALUES(00009,'2005-02-27',109,'CDT','75',8,908,'2005-02-29') ----ACCOUNT----- INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance) VALUES(101,20001,0001,'2005-02-22','2005-03-02','2005-05-11','active',901,1,'1000.00','200') INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance) VALUES(102,20002,0002,'2005-02-23','2005-03-03','2005-05-12','active',902,2,'1000.00','200') INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance) VALUES(103,20003,0003,'2005-02-24','2005-03-04','2005-05-13','active',903,3,'1000.00','200') INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance)
  • 11. VALUES(104,20004,0004,'2005-02-25','2005-03-05','2005-05-14','active',904,4,'1000.00','200') INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance) VALUES(105,20005,0005,'2005-02-26','2005-03-06','2005-05-15','inactive',905,5,'1000.00','200') INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance) VALUES(107,20006,0006,'2005-02-27','2005-04-07','2005-05-15','inactive',906,6,'1000.00','200') INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance) VALUES(108,20007,0007,'2005-02-28','2005-04-08','2005-05-16','inactive',907,7,'1000.00','200') INSERT INTO Account(account_id,product_id,custom_id,open_date,close_date,last_activity,account_status,bra nch_id,emp_id,avail_balance,pending_balance) VALUES(109,20009,0008,'2005-02-29','2005-04-09','2005-05-17','inactive',908,8,'1000.00','200') ----EMPLOYEE------- INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(1,'Michael','Smith','2005-04-03','2008-04-03',801,501,'informatica',901) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(2, 'Susan','Barker','2005-04-03','2008-04-03',802,502,'gerente',902) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(3,'Robert','Tyler','2005-04-03','2008-04-03',803,503,'contador',903) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id)
  • 12. VALUES(4,'Susan','Hawthorne','2005-04-03','2008-04-03',805,504,'gerente',904) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(5,'John','Gooding','2005-04-03','2008-04-03',805,505,'acesor',905) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(6,'Helen','Fleming','2005-04-03','2008-04-03',806,506,'acesor de tramites',906) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(7,'Chris','Tucker','2005-04-03','2008-04-03',807,507,'operador',907) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(8,'Sarah','Parker','2005-04-03','2008-04-03',808,508,'cajero',908) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(9,'Jane','Grossman','2005-04-03','2008-04-03',809,509,'ejecutivo',909) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(10, 'Paula','Roberts','2005-04-03','2008-04-03',810,510,'abogado',910) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(11, 'Thomas','Ziegler','2005-04-03','2008-04-03',811,511,'policia',911) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(12, 'Samantha','Jameson','2005-04-03','2008-04-03',812,512,'intendente',913) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(13, 'John','Blake','2005-04-03','2008-04-03',813,513,'ejecutivo',914)
  • 13. INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(14, 'Cindy','Mason','2005-04-03','2008-04-03',814,514,'diseñador',915) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(15, 'Frank','Portmant','2005-04-03','2008-04-03',815,515,'abogado',915) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(16, 'Theresa','Markham','2005-04-03','2008-04-03',816,516,'acesor',916) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(17, 'Beth','Fowler','2005-04-03','2008-04-03',817,517,'ejecutivo',917) INSERT INTOEmployee(emp_id,fname,lname,s_date,e_date,superior_emp_id, dept_id,tit,branch_id) VALUES(18, 'Rick','Tulman','2005-04-03','2008-04-03',818,518,'cobrador',918) ----PRODUCTYPE------- INSERT INTOProductType( product_type_id,product_type_name) VALUES(601,'credito') INSERT INTOProductType( product_type_id,product_type_name) VALUES(602,'debito') INSERT INTOProductType( product_type_id,product_type_name) VALUES(603,'platino') INSERT INTOProductType( product_type_id,product_type_name) VALUES(604,'dorada') INSERT INTOProductType( product_type_id,product_type_name) VALUES(605,'empresarial')
  • 14. INSERT INTOProductType( product_type_id,product_type_name) VALUES(606,'preferente') INSERT INTOProductType( product_type_id,product_type_name) VALUES(607,'credito') INSERT INTOProductType( product_type_id,product_type_name) VALUES(608,'debito') INSERT INTOProductType( product_type_id,product_type_name) VALUES(609,'platino') INSERT INTOProductType( product_type_id,product_type_name) VALUES(610,'preferente') INSERT INTOProductType( product_type_id,product_type_name) VALUES(611,'empresarial') INSERT INTOProductType( product_type_id,product_type_name) VALUES(612,'dorada') INSERT INTOProductType( product_type_id,product_type_name) VALUES(613,'credito') INSERT INTOProductType( product_type_id,product_type_name) VALUES(614,'debito') INSERT INTOProductType( product_type_id,product_type_name) VALUES(615,'empresarial') INSERT INTOProductType( product_type_id,product_type_name) VALUES(616,'platino') INSERT INTOProductType( product_type_id,product_type_name) VALUES(617,'dorada') INSERT INTOProductType( product_type_id,product_type_name) VALUES(618,'credito')
  • 15. ------PRODUCT---------- INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20001,'tarjeta',601,'2005-01-28','2006-01-05') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20002,'tarjeta',602,'2005-02-28','2006-02-06') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20003,'tarjeta',603,'2005-03-28','2006-03-07') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20004,'tarjeta',604,'2005-04-28','2006-04-11') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20005,'tarjeta',605,'2005-05-28','2006-05-30') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20006,'tarjeta',606,'2005-06-28','2006-06-24') INSERT INTOProduct( product_id,product_name, product_type_id,date_offered,date_retired) VALUES(20007,'tarjeta',607,'2005-07-28','2006-07-28') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20008,'tarjeta',608,'2005-08-28','2006-08-14') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20009,'tarjeta',609,'2005-09-28','2006-09-16') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20010,'tarjeta',610,'2005-10-28','2006-10-15') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20011,'tarjeta',611,'2005-11-28','2006-11-13') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired)
  • 16. VALUES(20012,'tarjeta',612,'2005-12-28','2006-12-29') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20013,'tarjeta',613,'2005-01-28','2006-02-28') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20014,'tarjeta',614,'2005-02-28','2006-03-31') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20015,'tarjeta',615,'2005-03-28','2006-04-19') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20016,'tarjeta',616,'2005-04-28','2006-05-02') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20017,'tarjeta',617,'2005-05-28','2006-06-08') INSERT INTOProduct( product_id,product_name,product_type_id,date_offered,date_retired) VALUES(20018,'tarjeta',618,'2005-06-28','2006-07-12') --------BRANCH-------- INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(901,'diazmiron','diazmiron#655','veracruz','veracruz','91700') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(902,'independencia','independencia #273','veracruz','veracruz','91710' ) INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(903,'ruizcortinez','ruizcortinez#949','veracruz','veracruz','91720') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip)
  • 17. VALUES(904,'2 de abril','2 de abril #399','veracruz','veracruz','91730') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(905,'20 de noviembre','diazmiron#8838','veracruz','veracruz','91740') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(906,'bolivar','bolivar#427','veracruz','veracruz','91750') INSERT INTOBranch( branch_id,branch_name, branch_address, branch_city,branch_state,branch_zip) VALUES(907,'reforma','reforma#345','veracruz','veracruz','91760') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(908,'juanpabloII','juanpablo II #8060','veracruz','veracruz','91770') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(909,'costa verde','costaverde #6780','veracruz','veracruz','91780') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(910,'costa de oro','costa de oro #523','veracruz','veracruz','91790') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(911,'cuauhtemoc','cuauhtemoc#499','veracruz','veracruz','91800') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(912,'miguel aleman','miguel aleman#324','veracruz','veracruz','91810') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(913,'circunvalacion','circunvalacion#7011','veracruz','veracruz','91820')
  • 18. INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(914,'la fragua','lafragua#6030','veracruz','veracruz','91830') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(915,'marti','marti #7030','veracruz','veracruz','91840') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(916,'americas','americas#1110','veracruz','veracruz','91850') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(917,'5 de mayo','5 de mayo #220','veracruz','veracruz','91860') INSERT INTOBranch( branch_id,branch_name,branch_address, branch_city,branch_state,branch_zip) VALUES(918,'hidalgo','hidalgo#330','veracruz','veracruz','91870') ----CUSTOMER----- INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0001', 'ep','00012341', 'reforma#145', 'mexico','veracruz','95400'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0002', 'pl','00012342', 'carpio #43', 'mexico','guadalajara','94670'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0003','pr', '00012343', 'libertad#1136', 'mexico','xalapa', '45678'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip)
  • 19. VALUES('0004', 'hm', '00012344', 'campo real #717', 'mexico','monterrey','45678'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0005', 'pl','00012345', 'ruiz cortinez#67', 'mexico','veracruz','95400'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0006', 'ep','00012346', 'diaz miron#654', 'mexico','veracruz','95400'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0007', 'hm', '00012347', '2 de abril #245', 'mexico','yucatan','45673'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0008', 'pr', '00012348', '20 de noviembre #1678', 'mexico','guanajuato','56433'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0009', 'pl','00012349', 'murillovidal #25', 'mexico','veracruz','95400'); INSERT INTOCustomer(custom_id, custom_type,fed_id,custom_address,custom_city,custom_state,custom_zip) VALUES('0010', 'ep','00012351', 'arriola molina#456', 'mexico','xalapa','45678'); ------OFFICER------- INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('1000', '0001', 'roberto','meguelle','2010/08/03', '2010/12/31'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('2000', '0002', 'juan carlos','vidal','1990/10/23', '1995/05/29'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('3000', '0003', 'fernando','guzman','2010/01/03', '2010/08/16'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date)
  • 20. VALUES('4000', '0004', 'enrique','rodriguez','2010/05/07', '2010/07/12'); INSERT INTOOfficer(officer_id, custom_id,first_name,last_name,starts_date,end_date) VALUES('5000', '0005', 'jose','mimendi','2010/02/14', '2010/03/19'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('6000', '0006', 'ivan','nicanor', '2000/09/12', '2003/12/17'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('7000', '0007', 'jonathan','nieto','2008/05/18', '2010/11/22'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('8000', '0008', 'julian','hernandez','2003/10/16', '2005/09/11'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('9000', '0009', 'arturo', 'lopez','2010/01/03', '2010/12/31'); INSERT INTOOfficer(officer_id,custom_id,first_name,last_name,starts_date,end_date) VALUES('1100', '0010', 'noe','avila','2007/07/25', '2010/11/20'); ----------BUSINESS-------- INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123451', '0001', 'tramite tarjeta','ver','2010/09/10'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123452', '0002', 'asesoriabancaria','gdl', '2003/06/19'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123453', '0003', 'cuentacheques','xlp','2001/01/22'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123454', '0004', 'tramite tarjeta','mty', '2006/01/11'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123455', '0005', 'cancelacion','ver','2006/04/24'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date)
  • 21. VALUES('123456', '0006', 'deposito','ver', '2010/06/15'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123457', '0007', 'retiroenefectivo','mex','2009/10/24'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123458', '0008', 'tramite de tarjeta','ver', '2008/07/09'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123459', '0009', 'deposito','gdl','2010/08/08'); INSERT INTOBusiness(busi_id,custom_id,busi_name,id_state,incorp_date) VALUES('123461', '0010', 'cuentacheques','mex','2000/09/10'); ------------INDIVIDUAL----------- INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10131', '0001', 'monica','lorenzo','1984/09/11'); INSERT INTOIndividual(individual_id,custom_id,f_name, l_name,birth_date) VALUES('10132', '0002', 'mariana','camara', '1986/11/23'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10133', '0003', 'victor','vidal','1990/03/15'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10134', '0004', 'manuel','hernandez','1970/07/17'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10135', '0005', 'gonzalo','nicanor','1978/01/05'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10136', '0006', 'daniel','limon','1976/02/14'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10137', '0007', 'lorena','perez','1979/11/11'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date)
  • 22. VALUES('10138', '0008', 'zamara', 'moreno','1984/03/22'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10139', '0009', 'saul','zamorano','1989/12/01'); INSERT INTOIndividual(individual_id,custom_id,f_name,l_name,birth_date) VALUES('10140', '0010', 'johnny','granda','1978/07/01');