This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE regions ( | |
region_id INT NOT NULL, | |
region_name VARCHAR(25), | |
PRIMARY KEY (region_id) | |
); | |
INSERT INTO regions | |
VALUES ( | |
1, | |
'Europe' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE regions ( | |
region_id INT NOT NULL, | |
region_name VARCHAR(25), | |
PRIMARY KEY (region_id) | |
); | |
INSERT INTO regions | |
VALUES ( | |
1, | |
'Europe' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SCHEMA hr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group: banco example | |
description[[ the data for this dataset was generated using <http://www.generatedata.com/> | |
* the relation _Customers_ contains basic information about the customers of the bank. | |
* the relation _Accounts_ contains the basic information of a single account. Note that a customer can have any number of accounts. | |
* the relation _PremiumCustomers_ contains the customer-ids of all customers with a total balance over 1000 | |
]] | |
Customers = { cid firstname lastname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group: HR | |
description[[ the data for this dataset was generated using <http://www.generatedata.com/> | |
* the relation _Customers_ contains basic information about the customers of the bank. | |
* the relation _Accounts_ contains the basic information of a single account. Note that a customer can have any number of accounts. | |
* the relation _PremiumCustomers_ contains the customer-ids of all customers with a total balance over 1000 | |
]] | |
CREATE TABLE regions ( | |
region_id INT (11) NOT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group: Recursos_humanos | |
Dep = { Codd,Nom,Localidad | |
10, 'Administration', 1700 | |
20, 'Marketing', 1800 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group:Recursos Humanos | |
regions = { | |
region_id:number, region_name:string | |
1 , 'Europe' | |
2 , 'Americas' | |
3 , 'Asia' | |
4 , 'Middle East and Africa' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group:Recursos Humanos | |
localidad = { | |
localidad_id:number, calle:string , codpostal:string, ciudad:string , provincia:string, idpais:string | |
1000 , '1297 Via Cola di Rie' , '00989' , 'Roma' , null , 'IT' | |
1100 , '93091 Calle della Testa' , '10934' , 'Venice' , null , 'IT' | |
1200 , '2017 Shinjuku-ku' , '1689' , 'Tokyo' , 'Tokyo Prefecture' , 'JP' | |
1300 , '9450 Kamiya-cho' , '6823' , 'Hiroshima' , null , 'JP' | |
1400 , '2014 Jabberwocky Rd' , '26192' , 'Southlake' , 'Texas' , 'US' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM ******************************************************************** | |
REM Create the REGIONS table to hold region information for locations | |
REM HR.LOCATIONS table has a foreign key to this table. | |
Prompt ****** Creating REGIONS table .... | |
CREATE TABLE regions | |
( region_id NUMBER | |
CONSTRAINT region_id_nn NOT NULL | |
, region_name VARCHAR2(25) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*1.Mostrar el nombre (nombre y apellido) y el salario (salary) de todos los empleados.*/ | |
/*π nome,ap,salario (emp)*/ | |
/*2. Renombrar el nombre de la columna Nome a Nombre y Ap a Apellido y salario a Sueldo.*/ | |
/*ρ Nombre←nome ,Apellido←ap, Sueldo←salario (π nome,ap,salario (emp))*/ | |
/*3. Mostrar todos los datos de los departamentos con identificador 10 ó 70 (Codd).*/ | |
/*σ codd=10 or codd=70 (dep)*/ | |
/*Otra forma*/ | |
/*σ codd=10 (dep)∪ σ codd=70 (dep)*/ | |
/*4. Mostrar el nombre de los empleados junto al nombre del departamento donde trabajan.*/ | |
/*π nome,ap, nom (π code, nome, ap,codd (emp) ⨝ dep)*/ |
OlderNewer