Created
June 16, 2025 16:31
-
-
Save mauricio-montiel-valencia/197f43830f20eec6ade6a91831009d80 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 project2_MUSEUM ( | |
museum_ID number not null, | |
primary key (museum_ID), | |
museum_name varchar2(50) not null, | |
museum_Type varchar2(50) not null, | |
museum_location varchar2(50) not null, | |
museum_fundation_date date not null, | |
museum_directo_name varchar2(50) not null, | |
museum_web_site varchar2(50) not null | |
); | |
CREATE TABLE project2_ROOMS ( | |
rooms_ID number not null, | |
primary key(rooms_ID), | |
rooms_name varchar2(50) not null, | |
rooms_description varchar2(300) not null, | |
museum_ID number not null, | |
foreign key (museum_ID) references project2_MUSEUM (museum_ID) | |
); | |
CREATE TABLE project2_COLLECTIONS ( | |
collections_ID number not null, | |
primary key (collections_ID), | |
collection_name varchar2(50) not null, | |
collection_century date not null, | |
collection_description varchar2(300) not null, | |
rooms_ID number not null, | |
foreign key (rooms_ID) references project2_ROOMS(rooms_ID) | |
); | |
CREATE TABLE project2_SPECIES ( | |
species_ID number not null, | |
primary key (species_ID), | |
species_scientific_name varchar2(80) not null, | |
species_popular_name varchar2(80) not null, | |
species_extinction_date date not null, | |
species_era_lived date not null, | |
species_weight number not null, | |
species_height number not null, | |
species_principal_characteristics varchar(500) not null, | |
species_image varchar2(50) not null, | |
collections_ID number not null, | |
foreign key(collections_ID) references project2_COLLECTIONS (collections_ID) | |
); | |
CREATE TABLE project2_THEMES( | |
themes_ID number not null, | |
primary key(themes_ID), | |
themes_name varchar2(50) not null, | |
themes_characteristics varchar2(500) not null, | |
themes_era date not null, | |
themes_image varchar2(50) not null, | |
rooms_ID number not null, | |
foreign key (rooms_ID) references project2_ROOMS (rooms_ID) | |
); | |
CREATE TABLE project2_PRICES ( | |
prices_ID number not null, | |
primary key (prices_ID), | |
prices_date date not null, | |
prices_ticket number not null, | |
rooms_ID number not null, | |
foreign key (rooms_ID) references project2_ROOMS (rooms_ID) | |
); | |
CREATE TABLE project2_COMISSIONS_KEY ( | |
comission_key_ID number not null, | |
primary key (comission_key_ID), | |
comission_key_keyType varchar2(30) not null, | |
comission_key_charged number not null, | |
comission_key_QR varchar2(50) not null, | |
rooms_ID number not null, | |
foreign key (rooms_ID) references project2_ROOMS (rooms_ID) | |
); | |
CREATE TABLE project2_ENTRANCE ( | |
entrance_ID number not null, | |
primary key (entrance_ID), | |
entrance_sale number not null, | |
entrance_daytovisit number not null, | |
entrance_rooms_names varchar2(500) not null, | |
entrance_total_price number not null, | |
entrance_QR varchar2(50) not null, | |
rooms_ID number not null, | |
foreign key (rooms_ID) references project2_ROOMS (rooms_ID), | |
prices_ID number not null, | |
foreign key (prices_ID) references project2_PRICES (prices_ID) | |
); | |
--AUTORIZAR ENTRADA-- | |
CREATE TABLE project2_AUTORICE_ENTRANCE ( | |
autorice_entrance_ID number not null, | |
primary key (autorice_entrance_ID), | |
rooms_ID number not null, | |
foreign key (rooms_id) references project2_ROOMS (rooms_ID), | |
autorice_entrance_roomTicket date not null | |
); | |
CREATE TABLE project2_COMISSION_REGISTER ( | |
comission_register_ID number not null, | |
primary key (comission_register_ID), | |
entrance_ID number not null, | |
foreign key (entrance_ID)references project2_ENTRANCE (entrance_ID) | |
); | |
CREATE TABLE project2_CHIPS_ROOMS( | |
chips_rooms_ID number not null, | |
primary key (chips_rooms_ID), | |
rooms_ID number not null, | |
foreign key (rooms_ID)references project2_ROOMS(rooms_ID), | |
chips_rooms_chips varchar2(50) not null, | |
chips_rooms_calification number not null, -- ver si se puede poner un estandar entre 1 a 5 | |
chips_rooms_observation varchar2(500) not null, | |
chips_rooms_valoratioPromedy number not null, | |
species_ID number not null, | |
foreign key (species_ID) references project2_SPECIES(species_ID), | |
themes_ID number not null, | |
foreign key (themes_ID) references project2_THEMES (themes_ID) | |
); | |
--Cantidad total de pago de comisiones por rango de fechas-- | |
CREATE TABLE project2_TOTAL_PAY_COMISSIONS ( | |
total_pay_comission_ID number not null, | |
primary key (total_pay_comission_ID), | |
total_pay_commission_date date not null, | |
comission_key_ID number not null, | |
foreign key (comission_key_ID) references project2_COMISSIONS_KEY (comission_key_ID), | |
total_Pay_comission_keyBrands varchar2(50) not null, | |
total_pay_comission_perBrand number not null, | |
total_pay_comission_PDF varchar2(100) not null | |
); | |
CREATE TABLE project2_ROOM_VALORATION ( | |
room_valoration_ID number not null, | |
primary key (room_valoration_ID), | |
room_valoration_best varchar2(500) not null, | |
room_valoration_worst varchar2(500) not null, | |
chips_rooms_ID number not null, | |
foreign key (chips_rooms_ID) references project2_CHIPS_ROOMS (chips_rooms_ID) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment