text: create table  media_type 
     (
     media_type int  not null,
     media_type_name nvarchar(50),
     media_type_name_en nvarchar(50),
     media_type_extensions nvarchar(50)
     );
  alter table media_type add constraint media_type_PK PRIMARY KEY (media_type);
  
  insert into media_type (media_type, media_type_name, media_type_name_en ,media_type_extensions) values (1,'MS Word','','doc,docx');
  insert into media_type (media_type, media_type_name, media_type_name_en ,media_type_extensions) values (2,'MS Excel','','xls,xlsx');
  insert into media_type (media_type, media_type_name, media_type_name_en, media_type_extensions) values (3,'MS PowerPoint','ppt,pptx','');
  insert into media_type (media_type, media_type_name, media_type_name_en, media_type_extensions) values (4,'PDF','','pdf');
  insert into media_type (media_type, media_type_name, media_type_name_en, media_type_extensions) values (5,'Picture','','jpg,png,gif');
  insert into media_type (media_type, media_type_name, media_type_name_en, media_type_extensions) values (6,'Video','','mpg4');
  insert into media_type (media_type, media_type_name, media_type_name_en, media_type_extensions) values (7,'URL','','');
  insert into media_type (media_type, media_type_name, media_type_name_en, media_type_extensions) values (8,'Text file','','txt,prn');
  insert into media_type (media_type, media_type_name, media_type_name_en, media_type_extensions) values (9,'ZIP data file','','zip,7z,tar,gz');
  update media_type set media_type_name_en=media_type_name;
  
  create table  media_file 
     (
     imedia int not null,
     iclave int not null,
     media_type int,
     media_title nvarchar(50),
     media_title_en nvarchar(50),
     media_file nvarchar (50),
     media_description nvarchar (255),
     media_description_en nvarchar (255),
     media_link nvarchar (255)
     );
  
  alter table media_file add constraint media_file_PK PRIMARY KEY (imedia);
  alter table media_file add constraint media_file_fichasFK foreign key (iclave) references fichas(clave);
  alter table media_file add constraint media_file_typeFK foreign key (media_type) references media_type(media_type);
  
  
  CREATE TABLE media_seq (
  	nextval int IDENTITY (1, 1) NOT NULL ,
  	dum int NULL 
  );
  
  