Fuente: https://docs.oracle.com/en/
Crear tablas
create table exemple(
id int primary key,
name varchar2(255)
);
Definir integridad referencia
CREATE TABLE locations_demo ( location_id NUMBER(4) , street_address VARCHAR2(40) , postal_code VARCHAR2(12) , city VARCHAR2(30) , state_province VARCHAR2(25) , country_id CHAR(2) , CONSTRAINT loc_id_pk PRIMARY KEY (location_id));
Creación de vistas
CREATE VIEW locations_view AS SELECT d.department_id, d.department_name, l.location_id, l.city FROM departments d, locations l WHERE d.location_id = l.location_id;