Skip to content

Instantly share code, notes, and snippets.

CREATE TABLE regions (
region_id INT NOT NULL,
region_name VARCHAR(25),
PRIMARY KEY (region_id)
);
INSERT INTO regions
VALUES (
1,
'Europe'
);
CREATE TABLE regions (
region_id INT NOT NULL,
region_name VARCHAR(25),
PRIMARY KEY (region_id)
);
INSERT INTO regions
VALUES (
1,
'Europe'
);
@civera2
civera2 / hr
Last active March 22, 2018 20:45
m
CREATE SCHEMA hr;
@civera2
civera2 / hr
Last active March 22, 2018 21:15
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,
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
group: Recursos_humanos
Dep = { Codd,Nom,Localidad
10, 'Administration', 1700
20, 'Marketing', 1800
}
group:Recursos Humanos
regions = {
region_id:number, region_name:string
1 , 'Europe'
2 , 'Americas'
3 , 'Asia'
4 , 'Middle East and Africa'
}
@civera2
civera2 / RH-Ej1
Last active April 18, 2018 11:50
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'
group:espectaculos
Persona = {DNI, Tel, email
1,'44444', 'p1@gmail.com'
2,'44444', 'p2@gmail.com'
3,'44444', 'p2@gmail.com'
}
Teatro = {Codt, Nom, Direc, Tel, Capac, prov
1, 'Bicentenario','Av España','3333', 1200, 'SJ'
2, 'Sarmiento','Av España','3333', 1200, 'SJ'
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)