Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- drop table zipcode cascade constraints;
- create table zipcode(address varchar(25) not null,
- code varchar(8) not null,
- primary key(code));
- drop table gym cascade constraints;
- create table gym(
- id number(3) not null unique,
- code varchar(8) not null,
- primary key (id, code),
- foreign key (code) references zipcode(code) ON DELETE CASCADE);
- drop table people cascade constraints;
- create table people(nif number(9) not null,
- naame varchar(35) not null,
- date_birth date not null,
- sex char(1) not null CHECK (sex IN ( 'F' , 'M' )),
- code varchar(8),
- email varchar(35) not null,
- iban number(21) not null,
- id number(3) not null,
- password number(4) not null,
- primary key (nif),
- foreign key (id) references gym(id) ON DELETE CASCADE);
- drop table staff cascade constraints;
- create table staff( staff_nif number(9) not null references people(nif),
- primary key (staff_nif));
- drop table manager cascade constraints;
- create table manager( manager_nif number(9) not null references staff(staff_nif),
- primary key (manager_nif));
- drop table p_trainer cascade constraints;
- create table p_trainer( ptrainer_nif number(9) not null references staff(staff_nif),
- primary key (ptrainer_nif));
- drop table membership cascade constraints;
- create table membership(m_id number(3) not null,
- price number(3) not null,
- description varchar(35) not null,
- manager_nif number(9) not null,
- primary key (m_id),
- foreign key (manager_nif) references manager(manager_nif) ON DELETE CASCADE);
- drop table payment_type cascade constraints;
- create table payment_type(code_paym number(3) not null,
- description varchar(35) not null,
- primary key (code_paym));
- drop table customers cascade constraints;
- create table customers( customer_nif number(9) not null references people(nif),
- date_joined date not null,
- expiration_date date not null,
- code_payment number(3) not null,
- m_id number(3) not null,
- primary key (customer_nif),
- foreign key (code_payment) references payment_type(code_paym) ON DELETE CASCADE,
- foreign key (m_id) references membership(m_id) ON DELETE CASCADE);
- drop table sign_up cascade constraints;
- create table sign_up( class_id number(3) not null,
- customer_nif number(9) not null,
- primary key (customer_nif, class_id),
- foreign key (customer_nif) references customers(customer_nif) ON DELETE CASCADE,
- foreign key (class_id) references classs(class_id) ON DELETE CASCADE);
- drop table class_type cascade constraints;
- create table class_type(c_type number(3) not null,
- description varchar(35) not null,
- primary key (c_type));
- drop table classs cascade constraints;
- create table classs(class_id number(3) not null,
- c_type number(3) not null,
- ptrainer_nif number(9) not null,
- primary key (class_id),
- foreign key (c_type) references class_type(c_type) ON DELETE CASCADE,
- foreign key (ptrainer_nif) references p_trainer(ptrainer_nif) ON DELETE CASCADE);
- drop table attendance cascade constraints;
- create table attendance(customer_nif number(9) not null,
- class_id number(3) not null,
- datee date not null,
- primary key (customer_nif, class_id, datee),
- foreign key (customer_nif) references customers(customer_nif) ON DELETE CASCADE,
- foreign key (class_id) references classs(class_id) ON DELETE CASCADE);
- drop table timetable cascade constraints;
- create table timetable( daay number(1) not null CHECK ( daay>=2 and daay<=8),
- hoour number(2) not null CHECK ( hoour>=0 and hoour<24),
- miin number(2) not null CHECK ( miin>=0 and miin<=60 ),
- primary key (daay, hoour, miin));
- drop table tiime cascade constraints;
- create table tiime( daay number(1) not null,
- hoour number(2) not null,
- miin number(2) not null,
- class_id number(3) not null,
- room number(3) not null,
- primary key (room, daay, hoour, miin),
- foreign key (class_id) references classs(class_id) ON DELETE CASCADE,
- foreign key (room) references rooms(id) ON DELETE CASCADE,
- foreign key (daay, hoour, miin) references timetable(daay, hoour, miin) ON DELETE CASCADE);
- drop table equipment cascade constraints;
- create table equipment(eq_number number (3) not null,
- description varchar(35) not null,
- capacity number(3) not null,
- primary key (eq_number));
- drop table rooms cascade constraints;
- create table rooms( capacity number(2) not null,
- id number(3) not null,
- idgym number(3) not null,
- primary key (id),
- foreign key (idgym) references gym(id) ON DELETE CASCADE);
- drop table rooms_equip cascade constraints;
- create table rooms_equip( room number(3) not null,
- equip number(3) not null,
- foreign key (room) references rooms(id) ON DELETE CASCADE,
- foreign key (equip) references equipment(eq_number) ON DELETE CASCADE);
- drop view Vcustomers;
- create view Vcustomers as
- select people.nif, people.naame, people.date_birth, people.sex, people.email, customers.date_joined, people.id as Gym
- from people
- inner join customers
- on customers.customer_nif = people.nif
- order by naame;
- drop view Vstaff;
- create view Vstaff as
- select people.nif, people.naame, people.date_birth, people.sex, people.email, people.id as Gym
- from people
- inner join staff
- on staff.staff_nif = people.nif
- order by naame;
- drop view Vmanager;
- create view Vmanager as
- select people.nif, people.naame, people.date_birth, people.sex, people.email, people.id as Gym
- from people
- inner join manager
- on manager.manager_nif = people.nif
- order by naame;
- drop view VlistClass;
- create view VlistClass as
- select classs.class_id, classs.ptrainer_nif, people.naame, count(sign_up.customer_nif) as numbCustomer
- from classs
- join sign_up on sign_up.class_id = classs.class_id
- join people on people.nif = classs.ptrainer_nif
- GROUP BY classs.class_id, classs.ptrainer_nif, people.naame;
- /***** gym *****/
- CREATE SEQUENCE gym_on_insert
- START WITH 1
- INCREMENT BY 1;
- CREATE TRIGGER gym_on_insert
- BEFORE INSERT ON gym
- FOR EACH ROW
- BEGIN
- SELECT gym_on_insert.nextval
- INTO :new.id
- FROM dual;
- END;
- /
- /***** membership *****/
- CREATE SEQUENCE membership_on_insert
- START WITH 1
- INCREMENT BY 1;
- CREATE TRIGGER membership_on_insert
- BEFORE INSERT ON membership
- FOR EACH ROW
- BEGIN
- SELECT membership_on_insert.nextval
- INTO :new.m_id
- FROM dual;
- END;
- /
- /***** payment_type *****/
- CREATE SEQUENCE payment_type_on_insert
- START WITH 1
- INCREMENT BY 1;
- CREATE TRIGGER payment_type_on_insert
- BEFORE INSERT ON payment_type
- FOR EACH ROW
- BEGIN
- SELECT payment_type_on_insert.nextval
- INTO :new.code_paym
- FROM dual;
- END;
- /
- /***** class_type *****/
- CREATE SEQUENCE class_type_on_insert
- START WITH 1
- INCREMENT BY 1;
- CREATE TRIGGER class_type_on_insert
- BEFORE INSERT ON class_type
- FOR EACH ROW
- BEGIN
- SELECT class_type_on_insert.nextval
- INTO :new.c_type
- FROM dual;
- END;
- /
- /***** classs *****/
- CREATE SEQUENCE classs_on_insert
- START WITH 1
- INCREMENT BY 1;
- CREATE TRIGGER classs_on_insert
- BEFORE INSERT ON classs
- FOR EACH ROW
- BEGIN
- SELECT classs_on_insert.nextval
- INTO :new.class_id
- FROM dual;
- END;
- /
- /***** equipment *****/
- CREATE SEQUENCE equipment_on_insert
- START WITH 1
- INCREMENT BY 1;
- CREATE TRIGGER equipment_on_insert
- BEFORE INSERT ON equipment
- FOR EACH ROW
- BEGIN
- SELECT equipment_on_insert.nextval
- INTO :new.eq_number
- FROM dual;
- END;
- /
- /***** room *****/
- CREATE SEQUENCE rooms_on_insert
- START WITH 1
- INCREMENT BY 1;
- CREATE TRIGGER rooms_on_insert
- BEFORE INSERT ON rooms
- FOR EACH ROW
- BEGIN
- SELECT rooms_on_insert.nextval
- INTO :new.id
- FROM dual;
- END;
- /
- create or replace trigger generatePassword
- before insert on people
- for each row
- declare new_p number(4);
- begin
- select round(dbms_random.value(1111,9999)) into new_p from dual;
- :NEW.password := new_p;
- end;
- /
- create or replace trigger insertGym
- before insert on gym
- for each row
- declare addrs varchar2(50);
- begin
- select address into addrs from zipcode where code=:NEW.code;
- end;
- /
- CREATE OR REPLACE TRIGGER insertCustomers
- instead of insert on Vcustomers
- for each row
- begin
- insert into people(nif, naame, date_birth, sex, code, email, iban,id) values(:NEW.nif, :NEW.naame, :NEW.date_birth, :NEW.sex, :NEW.code, :NEW.email, :NEW.iban, :NEW.Gym);
- insert into customers(customer_nif, date_joined, expiration_date, code_payment, m_id) values(:NEW.nif, :NEW.date_joined, :NEW.expiration_date, :NEW.code_payment, :NEW.m_id);
- end;
- /
- create or replace trigger deleteCustomers
- instead of delete on Vcustomers
- for each row
- begin
- delete from people where nif=:OLD.nif;
- delete from customers where customer_nif=:OLD.nif;
- end;
- /
- CREATE OR REPLACE TRIGGER "INSERTPT"
- instead of insert on VpersonalTrainer
- for each row
- begin
- insert into people(nif, naame, date_birth, sex, code, email, iban, id) values(:NEW.nif, :NEW.naame, :NEW.date_birth, :NEW.sex, :NEW.code, :NEW.email, :NEW.iban, :NEW.Gym);
- insert into staff(staff_nif) values(:NEW.nif);
- insert into p_trainer(ptrainer_nif) values(:NEW.nif);
- end;
- /
- create or replace trigger deletePT
- instead of delete on VpersonalTrainer
- for each row
- begin
- delete from people where nif=:OLD.nif;
- delete from p_trainer where ptrainer_nif=:OLD.nif;
- end;
- /
- CREATE OR REPLACE TRIGGER "INSERTMANAGER"
- instead of insert on Vmanager
- for each row
- begin
- insert into people(nif, naame, date_birth, sex, code, email, iban, id) values(:NEW.nif, :NEW.naame, :NEW.date_birth, :NEW.sex, :NEW.code, :NEW.email, :NEW.iban, :NEW.Gym);
- insert into staff(staff_nif) values(:NEW.nif);
- insert into manager(manager_nif) values(:NEW.nif);
- end;
- /
- create or replace trigger deleteManager
- instead of delete on Vmanager
- for each row
- begin
- delete from people where nif=:OLD.nif;
- delete from manager where manager_nif=:OLD.nif;
- end;
- /
- /***ZIPCODE***/
- insert into zipcode (address, code) values('Alexandre Herculano', '1150-006');
- insert into zipcode (address, code) values('Alfragide', '2790-236');
- insert into zipcode (address, code) values('Almirante Reis', '1150-011');
- insert into zipcode (address, code) values('Arco do Cego', '1000-286');
- insert into zipcode (address, code) values('Elias Garcia', '1050-100');
- /***GYM***/
- insert into gym (code) values('1150-006');
- insert into gym (code) values('2790-236');
- insert into gym (code) values('1150-011');
- insert into gym (code) values('1000-286');
- insert into gym (code) values('1050-100');
- /**PEOPLE**/
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Tiago', '01-01-95', 'M', '1150-006', 'tiago@gmail.com', '000032123454312343231', '123456789', '1');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Ana', '10-01-96', 'F', '2790-236', 'ana@gmail.com', '000032123454311143231', '123456723', '2');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Carlos', '03-07-95', 'M', '1150-006', 'carlos@gmail.com', '000032123454312343111', '234567239', '3');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Duarte', '01-22-97', 'M', '2790-236', 'duarte@gmail.com', '000031113454312343231', '123423789', '3');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Luis', '02-15-93', 'M', '1150-011', 'luis@gmail.com', '000032123454234343231', '123450089', '2');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Rita', '01-04-91', 'F', '2790-236', 'rita@gmail.com', '000032123555312343231', '123456781', '4');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Miguel', '01-07-90', 'M', '1150-006', 'miguel@gmail.com', '000032123174312343231', '123156789', '1');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Joao', '01-12-90', 'M', '1150-011', 'joao@gmail.com', '000032123467512343231', '123456189', '1');
- insert into people (naame, date_birth, sex, code, email, iban, nif, id) values ('Luisa', '07-11-92', 'F', '1150-006', 'luisa@gmail.com', '000032123434312343231', '123422789', '3');
- /**STAFF**/
- insert into staff(staff_nif) values ('123456789');
- insert into staff(staff_nif) values ('123456723');
- insert into staff(staff_nif) values ('234567239');
- insert into staff(staff_nif) values ('123423789');
- insert into staff(staff_nif) values ('123450089');
- /**MANAGER**/
- insert into manager(manager_nif) values ('123456789');
- /**PERSONAL TRAINER**/
- insert into p_trainer(ptrainer_nif) values ('123456723');
- insert into p_trainer(ptrainer_nif) values ('234567239');
- insert into p_trainer(ptrainer_nif) values ('123423789');
- insert into p_trainer(ptrainer_nif) values ('123450089');
- /***TIME_TABLE***/
- insert into timetable(daay, hoour, miin) values(2, 16, 0);
- insert into timetable(daay, hoour, miin) values(2, 16, 15);
- insert into timetable(daay, hoour, miin) values(2, 16, 30);
- insert into timetable(daay, hoour, miin) values(2, 16, 45);
- insert into timetable(daay, hoour, miin) values(2, 17, 0);
- insert into timetable(daay, hoour, miin) values(2, 17, 15);
- insert into timetable(daay, hoour, miin) values(2, 17, 30);
- insert into timetable(daay, hoour, miin) values(2, 17, 45);
- insert into timetable(daay, hoour, miin) values(2, 18, 0);
- insert into timetable(daay, hoour, miin) values(2, 18, 15);
- insert into timetable(daay, hoour, miin) values(2, 18, 30);
- insert into timetable(daay, hoour, miin) values(2, 18, 45);
- insert into timetable(daay, hoour, miin) values(2, 19, 0);
- insert into timetable(daay, hoour, miin) values(2, 19, 15);
- insert into timetable(daay, hoour, miin) values(2, 19, 30);
- insert into timetable(daay, hoour, miin) values(2, 19, 45);
- insert into timetable(daay, hoour, miin) values(2, 20, 0);
- insert into timetable(daay, hoour, miin) values(2, 20, 15);
- insert into timetable(daay, hoour, miin) values(2, 20, 30);
- insert into timetable(daay, hoour, miin) values(2, 20, 45);
- insert into timetable(daay, hoour, miin) values(3, 16, 0);
- insert into timetable(daay, hoour, miin) values(3, 16, 15);
- insert into timetable(daay, hoour, miin) values(3, 16, 30);
- insert into timetable(daay, hoour, miin) values(3, 16, 45);
- insert into timetable(daay, hoour, miin) values(3, 17, 0);
- insert into timetable(daay, hoour, miin) values(3, 17, 15);
- insert into timetable(daay, hoour, miin) values(3, 17, 30);
- insert into timetable(daay, hoour, miin) values(3, 17, 45);
- insert into timetable(daay, hoour, miin) values(3, 18, 0);
- insert into timetable(daay, hoour, miin) values(3, 18, 15);
- insert into timetable(daay, hoour, miin) values(3, 18, 30);
- insert into timetable(daay, hoour, miin) values(3, 18, 45);
- insert into timetable(daay, hoour, miin) values(3, 19, 0);
- insert into timetable(daay, hoour, miin) values(3, 19, 15);
- insert into timetable(daay, hoour, miin) values(3, 19, 30);
- insert into timetable(daay, hoour, miin) values(3, 19, 45);
- insert into timetable(daay, hoour, miin) values(3, 20, 0);
- insert into timetable(daay, hoour, miin) values(3, 20, 15);
- insert into timetable(daay, hoour, miin) values(3, 20, 30);
- insert into timetable(daay, hoour, miin) values(3, 20, 45);
- insert into timetable(daay, hoour, miin) values(4, 16, 0);
- insert into timetable(daay, hoour, miin) values(4, 16, 15);
- insert into timetable(daay, hoour, miin) values(4, 16, 30);
- insert into timetable(daay, hoour, miin) values(4, 16, 45);
- insert into timetable(daay, hoour, miin) values(4, 17, 0);
- insert into timetable(daay, hoour, miin) values(4, 17, 15);
- insert into timetable(daay, hoour, miin) values(4, 17, 30);
- insert into timetable(daay, hoour, miin) values(4, 17, 45);
- insert into timetable(daay, hoour, miin) values(4, 18, 0);
- insert into timetable(daay, hoour, miin) values(4, 18, 15);
- insert into timetable(daay, hoour, miin) values(4, 18, 30);
- insert into timetable(daay, hoour, miin) values(4, 18, 45);
- insert into timetable(daay, hoour, miin) values(4, 19, 0);
- insert into timetable(daay, hoour, miin) values(4, 19, 15);
- insert into timetable(daay, hoour, miin) values(4, 19, 30);
- insert into timetable(daay, hoour, miin) values(4, 19, 45);
- insert into timetable(daay, hoour, miin) values(4, 20, 0);
- insert into timetable(daay, hoour, miin) values(4, 20, 15);
- insert into timetable(daay, hoour, miin) values(4, 20, 30);
- insert into timetable(daay, hoour, miin) values(4, 20, 45);
- insert into timetable(daay, hoour, miin) values(5, 16, 0);
- insert into timetable(daay, hoour, miin) values(5, 16, 15);
- insert into timetable(daay, hoour, miin) values(5, 16, 30);
- insert into timetable(daay, hoour, miin) values(5, 16, 45);
- insert into timetable(daay, hoour, miin) values(5, 17, 0);
- insert into timetable(daay, hoour, miin) values(5, 17, 15);
- insert into timetable(daay, hoour, miin) values(5, 17, 30);
- insert into timetable(daay, hoour, miin) values(5, 17, 45);
- insert into timetable(daay, hoour, miin) values(5, 18, 0);
- insert into timetable(daay, hoour, miin) values(5, 18, 15);
- insert into timetable(daay, hoour, miin) values(5, 18, 30);
- insert into timetable(daay, hoour, miin) values(5, 18, 45);
- insert into timetable(daay, hoour, miin) values(5, 19, 0);
- insert into timetable(daay, hoour, miin) values(5, 19, 15);
- insert into timetable(daay, hoour, miin) values(5, 19, 30);
- insert into timetable(daay, hoour, miin) values(5, 19, 45);
- insert into timetable(daay, hoour, miin) values(5, 20, 0);
- insert into timetable(daay, hoour, miin) values(5, 20, 15);
- insert into timetable(daay, hoour, miin) values(5, 20, 30);
- insert into timetable(daay, hoour, miin) values(5, 20, 45);
- insert into timetable(daay, hoour, miin) values(6, 16, 0);
- insert into timetable(daay, hoour, miin) values(6, 16, 15);
- insert into timetable(daay, hoour, miin) values(6, 16, 30);
- insert into timetable(daay, hoour, miin) values(6, 16, 45);
- insert into timetable(daay, hoour, miin) values(6, 17, 0);
- insert into timetable(daay, hoour, miin) values(6, 17, 15);
- insert into timetable(daay, hoour, miin) values(6, 17, 30);
- insert into timetable(daay, hoour, miin) values(6, 17, 45);
- insert into timetable(daay, hoour, miin) values(6, 18, 0);
- insert into timetable(daay, hoour, miin) values(6, 18, 15);
- insert into timetable(daay, hoour, miin) values(6, 18, 30);
- insert into timetable(daay, hoour, miin) values(6, 18, 45);
- insert into timetable(daay, hoour, miin) values(6, 19, 0);
- insert into timetable(daay, hoour, miin) values(6, 19, 15);
- insert into timetable(daay, hoour, miin) values(6, 19, 30);
- insert into timetable(daay, hoour, miin) values(6, 19, 45);
- insert into timetable(daay, hoour, miin) values(6, 20, 0);
- insert into timetable(daay, hoour, miin) values(6, 20, 15);
- insert into timetable(daay, hoour, miin) values(6, 20, 30);
- insert into timetable(daay, hoour, miin) values(6, 20, 45);
- /***EQUIPMENT***/
- insert into equipment(description, capacity) values('Prensa a 45º musculação', 2);
- insert into equipment(description, capacity) values('Banco Supino', 5);
- insert into equipment(description, capacity) values('Halteres', 200);
- insert into equipment(description, capacity) values('Passadeira', 10);
- insert into equipment(description, capacity) values('Bicicleta', 75);
- /**CLASSS**/
- insert into classs (c_type, ptrainer_nif) values ('1', '123456723');
- insert into classs (c_type, ptrainer_nif) values ('2', '234567239');
- insert into classs (c_type, ptrainer_nif) values ('3', '123423789');
- insert into classs (c_type, ptrainer_nif) values ('4', '123450089');
- /**CUSTOMERS**/
- insert into customers(customer_nif, date_joined, expiration_date, code_payment, m_id) values ('123456781', '01-15-16','02-15-16', '1', '2');
- insert into customers(customer_nif, date_joined, expiration_date, code_payment, m_id) values ('123156789', '01-15-16','01-30-16', '2', '1');
- insert into customers(customer_nif, date_joined, expiration_date, code_payment, m_id) values ('123456189', '03-11-16','03-11-17', '3', '2');
- insert into customers(customer_nif, date_joined, expiration_date, code_payment, m_id) values ('123422789', '05-20-16','06-20-16', '2', '1');
- /***ROOMS***/
- insert into rooms(capacity, idgym) values('50', '1');
- insert into rooms(capacity, idgym) values('50', '1');
- insert into rooms(capacity, idgym) values('30', '4');
- insert into rooms(capacity, idgym) values('45', '2');
- insert into rooms(capacity, idgym) values('80', '2');
- insert into rooms(capacity, idgym) values('40', '4');
- insert into rooms(capacity, idgym) values('25', '4');
- insert into rooms(capacity, idgym) values('52', '1');
- insert into rooms(capacity, idgym) values('63', '3');
- insert into rooms(capacity, idgym) values('53', '3');
- insert into rooms(capacity, idgym) values('24', '3');
- /**SIGN_UP**/
- insert into sign_up (class_id, customer_nif) values (1, 123456781);
- insert into sign_up (class_id, customer_nif) values (1, 123156789);
- insert into sign_up (class_id, customer_nif) values (2, 123422789);
- insert into sign_up (class_id, customer_nif) values (1, 123456189);
- /***ROOMS***/
- insert into rooms(capacity, idgym) values('50', '1');
- insert into rooms(capacity, idgym) values('50', '1');
- insert into rooms(capacity, idgym) values('30', '4');
- insert into rooms(capacity, idgym) values('45', '2');
- insert into rooms(capacity, idgym) values('80', '2');
- insert into rooms(capacity, idgym) values('40', '4');
- insert into rooms(capacity, idgym) values('25', '4');
- insert into rooms(capacity, idgym) values('52', '1');
- insert into rooms(capacity, idgym) values('63', '3');
- insert into rooms(capacity, idgym) values('53', '3');
- insert into rooms(capacity, idgym) values('24', '3');
- /***ROOMS_EQUIP***/
- insert into rooms_equip(room, equip) values(1,2);
- insert into rooms_equip(room, equip) values(1,2);
- insert into rooms_equip(room, equip) values(2,3);
- insert into rooms_equip(room, equip) values(3,4);
- insert into rooms_equip(room, equip) values(6,5);
- insert into rooms_equip(room, equip) values(8,1);
- insert into rooms_equip(room, equip) values(8,2);
- insert into rooms_equip(room, equip) values(8,3);
- /**ATTENDANCE**/
- insert into attendance(customer_nif, class_id, datee) values ('123456781', '1', '12-07-16');
- insert into attendance(customer_nif, class_id, datee) values ('123456781', '2', '11-07-16');
- insert into attendance(customer_nif, class_id, datee) values ('123456781', '3', '10-07-16');
- insert into attendance(customer_nif, class_id, datee) values ('123456781', '4', '09-07-16');
- /***insert_TIIME***/
- insert into tiime (daay, hoour, miin, class_id, room) values('2', '19', '00', '1', '10');
- insert into tiime (daay, hoour, miin, class_id, room) values('2', '19', '30', '2', '4');
- insert into tiime (daay, hoour, miin, class_id, room) values('3', '19', '30', '3', '7');
- insert into tiime (daay, hoour, miin, class_id, room) values('4', '17', '30', '2', '8');
- insert into tiime (daay, hoour, miin, class_id, room) values('3', '18', '30', '4', '6');
- insert into tiime (daay, hoour, miin, class_id, room) values('2', '17', '15', '4', '2');
- insert into tiime (daay, hoour, miin, class_id, room) values('5', '19', '30', '4', '5');
- insert into tiime (daay, hoour, miin, class_id, room) values('6', '19', '00', '4', '3');
- insert into tiime (daay, hoour, miin, class_id, room) values('2', '19', '30', '2', '1');
- /**MEMBERSHIP**/
- insert into membership (price, description, manager_nif) values ('15', 'Access to a gym', '123456789');
- insert into membership (price, description, manager_nif) values ('20', 'Access to all gyms', '123456789');
- /**PAYMENT_TYPE**/
- insert into payment_type(description) values('monthly')
- insert into payment_type(description) values('bi-weekly');
- insert into payment_type(description) values('annual');
- /**CLASS_TYPE**/
- insert into class_type(description) values('Zumba');
- insert into class_type(description) values('Dance Moves');
- insert into class_type(description) values('Pilates Moves');
- insert into class_type(description) values('Yoga Moves');
- insert into class_type(description) values('BodyAttack');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement