owl - tesis.uson.mx - Universidad de Sonora

Anuncio
ANEXO 1: COMANDOS PARA CREAR LA BASE DE
DATOS
Tabla grupo investigación.
CREATE TABLE `grupoinv` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(45) NOT NULL,
`ies` VARCHAR(45) NOT NULL,
`gradocons` VARCHAR(45) NOT NULL,
`diciplina` VARCHAR(45) NOT NULL,
`pais` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
Tabla integrantes.
CREATE TABLE IF NOT EXISTS `integrantes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Nombre` varchar(45) NOT NULL,
`apellido` varchar(45) NOT NULL,
`ies` varchar(45) NOT NULL,
`grado` varchar(45) NOT NULL,
`grupoinv` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
68
KEY `Index_2` (`grupoinv`),
KEY `FK_integrantes_2` (`ies`)
) ENGINE=InnoDB;
Tabla Colaboradores
CREATE TABLE IF NOT EXISTS `colaboradores` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`nombre` varchar(45) NOT NULL,
`tipo` varchar(45) NOT NULL,
`fechaini` date NOT NULL,
`ies` varchar(45) NOT NULL,
`tipocolaborador` varchar(45) NOT NULL,
`pais` varchar(45) NOT NULL,
`descripcion` varchar(45) NOT NULL,
`grupoinv` int(10) unsigned NOT NULL,
`apellidop` varchar(45) NOT NULL,
`apellidom` varchar(45) NOT NULL,
PRIMARY KEY (`id`),
KEY `Index_2` (`grupoinv`),
KEY `ies` (`ies`)
) ENGINE=InnoDB
Tabla Investigacion
69
CREATE TABLE IF NOT EXISTS `investigacion` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`nombre` varchar(45) NOT NULL,
`grupoinv` int(10) unsigned NOT NULL,
`estado` varchar(45) NOT NULL,
`patrocinador` varchar(45) NOT NULL,
`fechaini` date NOT NULL,
`fechafin` date NOT NULL,
PRIMARY KEY (`id`),
KEY `Index_2` (`grupoinv`)
) ENGINE=InnoDB
Tabla Publicaciones
CREATE TABLE IF NOT EXISTS `publicaciones` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`tipo` varchar(45) NOT NULL,
`titulo` varchar(45) NOT NULL,
`autor` int(10) unsigned NOT NULL,
`grupoinv` int(10) unsigned NOT NULL,
`fechapub` date NOT NULL,
`lugarpub` varchar(45) NOT NULL,
`mediopub` varchar(45) NOT NULL,
70
PRIMARY KEY (`id`),
KEY `Index_2` (`autor`),
KEY `Index_3` (`grupoinv`)
) ENGINE=InnoDB
Filtros para el funcionamiento de las llaves foráneas
Filtros para la tabla `colaboradores`
ALTER TABLE `colaboradores`
ADD CONSTRAINT `FK_colaboradores_1` FOREIGN KEY (`grupoinv`)
REFERENCES `grupoinv` (`id`) ON DELETE CASCADE ON UPDATE
CASCADE,
ADD
CONSTRAINT
`FK_colaboradores_2`
FOREIGN
KEY
(`ies`)
REFERENCES `grupoinv` (`ies`) ON DELETE CASCADE ON UPDATE
CASCADE;
Filtros para la tabla `integrantes`
ALTER TABLE `integrantes`
ADD CONSTRAINT `FK_Integrantes_1` FOREIGN KEY (`grupoinv`)
REFERENCES `grupoinv` (`id`) ON DELETE CASCADE ON UPDATE
CASCADE,
ADD
CONSTRAINT
`FK_integrantes_2`
FOREIGN
KEY
(`ies`)
REFERENCES `grupoinv` (`ies`) ON DELETE CASCADE ON UPDATE
CASCADE;
Filtros para la tabla `investigacion`
ALTER TABLE `investigacion`
71
ADD CONSTRAINT `FK_investigacion_1` FOREIGN KEY (`grupoinv`)
REFERENCES `grupoinv` (`id`) ON DELETE CASCADE ON UPDATE
CASCADE;
Filtros para la tabla `publicaciones`
ALTER TABLE `publicaciones`
ADD
CONSTRAINT
`FK_publicaciones_1`
FOREIGN
KEY
(`autor`)
REFERENCES `integrantes` (`id`) ON DELETE CASCADE ON UPDATE
CASCADE,
ADD CONSTRAINT `FK_publicaciones_2` FOREIGN KEY (`grupoinv`)
REFERENCES `grupoinv` (`id`) ON DELETE CASCADE ON UPDATE
CASCADE;
72
ANEXO 2: COMANDOS PARA LLENAR LA BASE DE
DATOS
INSERT INTO `grupoinv` (`id`, `nombre`, `ies`, `gradocons`, `diciplina`, `pais`)
VALUES
(1, 'Grupo Informatico de la UANL', 'Universidad Autonoma de Nuevo Leon',
'Consolidado', 'Informatica', 'Mexico'),
(2, 'Grupo Investigacion Tecnologica de la UNISON', 'Universidad de Sonora', 'En
Consolidacion', 'Informatica', 'Mexico'),
(3, 'Grupo Innovacion Tecnoligica de la UABC', 'Universidad Autonoma de Baja
California', 'En Formacion', 'Informatica', 'Mexico'),
(4, 'Grupo Informatico de la UNAM', 'Universidad Nacional Autonoma de Mexico',
'Consolidado', 'Informatica', 'Mexico'),
(5, 'Grupo Tecnologico ITSON', 'Instituto Tecnologico del Estado de Sonora', 'En
Formacion', 'Informatica', 'Mexico');
INSERT
INTO
`tipocolaborador`,
`colaboradores`
`pais`,
(`id`,
`descripcion`,
`nombre`,
`tipo`,
`fechaini`,
`grupoinv`,
`apellidop`,
`ies`,
`apellidom`)
VALUES
(1, 'Carlos', 'Alumno', '2003-01-03', 'Universidad de Sonora', 'Tesista', 'Mexico',
'Realiza tesis nivel licenciatura', 2, 'Lopez', 'Armenta'),
(2, 'Carlos', 'Profesor', '2000-11-01', 'Universidad Autonoma de Nuevo Leon',
'investigador', 'Mexico', 'Realiza trabajo similar', 1, 'Martinez', 'Treviño de la
Garza'),
(3, 'Arturo', 'Profesor', '2005-04-10', 'Universidad Autonoma de Baja California',
'investigador', 'Mexico', 'Realiza trabajo similar', 4, 'Perez', 'Lopez'),
73
(4, 'Arturo', 'Profesor', '2005-04-10', 'Universidad Autonoma de Baja California',
'investigador', 'Mexico', 'Dio conferencia acerca de la investigacion', 4, 'Perez',
'Lopez'),
(5, 'Manuel', 'Profesor', '2002-05-03', 'Universidad Nacional Autonoma de Mexico',
'investigador', 'Mexico', 'Realizo un trabajo similar', 4, 'Fernandez', 'Doriga');
INSERT INTO `integrantes` (`id`, `Nombre`, `apellido`, `ies`, `grado`, `grupoinv`)
VALUES
(1, 'Julian', 'Gonzalez China', 'Universidad de Sonora', 'Maestro en ciencias', 2),
(2,
'Roberto',
'Lopez
Navarro',
'Universidad
de
Sonora',
'Maestro
en
\r\n\r\nciencias', 2),
(3, 'Saul', 'Garcia Montes', 'Universidad de Sonora', 'Maestro en ciencias', 2),
(4, 'Raul', 'Moreno Peinado', 'Universidad de Sonora', 'Doctor en ciencias', 2),
(5, 'Arturo ', 'Gomez', 'Universidad de Sonora', 'doctor', 4);
INSERT INTO `investigacion` (`id`, `nombre`, `grupoinv`, `estado`, `patrocinador`,
`fechaini`, `fechafin`) VALUES
(1, 'ontologias y empresas', 2, 'en desarrollo', 'ninguno', '2008-02-23', '2009-0224'),
(2, 'ontologias en la educacion', 2, 'finalizada', 'promep', '2008-05-03', '2010-0312'),
(3, 'Redes sociales', 2, 'en inicio', 'ninguno', '2009-08-12', '2010-06-01'),
(4, 'data warehousing', 2, 'finalizada', 'conacyt', '2009-01-31', '2009-11-30');
INSERT INTO `publicaciones` (`id`, `tipo`, `titulo`, `autor`, `grupoinv`, `fechapub`,
`lugarpub`, `mediopub`) VALUES
(2, 'Articulo', 'Ontologias y las Empresas', 1, 2, '2008-10-11', 'Mexico', 'Revista'),
74
(3, 'Memorias de Conferencia', 'Las bases de datos y el mundo de hoy', 2, 2,
'2009-07-14', 'Mexico', 'Internet'),
(4, 'Libro', 'Principios de Programacion', 2, 2, '2008-12-05', 'Mexico', 'Editorial'),
(5, 'Articulo', 'Data Warehousing', 3, 2, '2009-09-24', 'Mexico', 'Revista en Linea'),
(6, 'Articulo', 'Redes sociales y sus ventajas', 3, 2, '2009-06-16', 'Mexico', 'Revista');
75
ANEXO 3: ONTOLOGÍA (OWL) OAGI
<?xml version="1.0"?>
<rdf:RDF
xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#"
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:swrl="http://www.w3.org/2003/11/swrl#"
xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns="http://www.owl-ontologies.com/Ontology1283037737.owl#"
xml:base="http://www.owl-ontologies.com/Ontology1283037737.owl">
<owl:Ontology rdf:about=""/>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
<Table_Metaclass rdf:ID="colaboradores">
<Foreign_Keys>
<Foreign_Key rdf:about="http://www.owlontologies.com/Foreign_Key_Instance_2">
<FK_Name
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>fk_ies_grupoinv_ies</FK_Name>
<Local_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes.ies</Local_Field>
<Reference_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</Reference_Table>
<Reference_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv.ies</Reference_Field>
</Foreign_Key>
</Foreign_Keys>
<Foreign_Keys>
<Foreign_Key rdf:about="http://www.owlontologies.com/Foreign_Key_Instance_1">
<Reference_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv.id</Reference_Field>
<FK_Name
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>fk_grupoinv_grupoinv_id</FK_Name>
<Local_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes.grupoinv</Local_Field>
<Reference_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</Reference_Table>
</Foreign_Key>
</Foreign_Keys>
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>colaboradores</rdfs:label>
76
<Primary_Key_Fields
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>id</Primary_Key_Fields>
<Is_Bridge_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>false</Is_Bridge_Table>
</Table_Metaclass>
<Table_Metaclass rdf:ID="integrantes">
<Is_Bridge_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>false</Is_Bridge_Table>
<Foreign_Keys>
<Foreign_Key rdf:about="http://www.owlontologies.com/Foreign_Key_Instance_3">
<Reference_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv.id</Reference_Field>
<FK_Name
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>fk_grupoinv_grupoinv_id</FK_Name>
<Local_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes.grupoinv</Local_Field>
<Reference_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</Reference_Table>
</Foreign_Key>
</Foreign_Keys>
<Foreign_Keys>
<Foreign_Key rdf:about="http://www.owlontologies.com/Foreign_Key_Instance_4">
<Local_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes.ies</Local_Field>
<Reference_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</Reference_Table>
<Reference_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv.ies</Reference_Field>
<FK_Name
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>fk_ies_grupoinv_ies</FK_Name>
</Foreign_Key>
</Foreign_Keys>
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes</rdfs:label>
<Primary_Key_Fields
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>id</Primary_Key_Fields>
</Table_Metaclass>
</owl:unionOf>
</owl:Class>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
77
<Table_Metaclass rdf:about="#colaboradores"/>
<Table_Metaclass rdf:about="#integrantes"/>
</owl:unionOf>
</owl:Class>
<owl:Class rdf:ID="Foreign_Key">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Foreign Key</rdfs:label>
</owl:Class>
<owl:Class rdf:ID="Table_Metaclass">
<rdfs:subClassOf>
<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class">
<rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdfschema#Class"/>
</rdf:Description>
</rdfs:subClassOf>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Table Metaclass</rdfs:label>
</owl:Class>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
<Table_Metaclass rdf:about="#colaboradores"/>
</owl:unionOf>
</owl:Class>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
<Table_Metaclass rdf:about="#colaboradores"/>
</owl:unionOf>
</owl:Class>
<owl:ObjectProperty rdf:ID="publicaciones.grupoinv_INSTANCE">
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description
rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
<Table_Metaclass rdf:ID="publicaciones">
<Primary_Key_Fields
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>id</Primary_Key_Fields>
<Foreign_Keys>
<Foreign_Key rdf:about="http://www.owlontologies.com/Foreign_Key_Instance_6">
<Local_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes.ies</Local_Field>
<Reference_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</Reference_Table>
<FK_Name
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>fk_ies_grupoinv_ies</FK_Name>
<Reference_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv.ies</Reference_Field>
</Foreign_Key>
</Foreign_Keys>
78
<Foreign_Keys>
<Foreign_Key rdf:about="http://www.owlontologies.com/Foreign_Key_Instance_7">
<FK_Name
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>fk_grupoinv_grupoinv_id</FK_Name>
<Reference_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</Reference_Table>
<Reference_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv.id</Reference_Field>
<Local_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>publicaciones.grupoinv</Local_Field>
</Foreign_Key>
</Foreign_Keys>
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>publicaciones</rdfs:label>
<Is_Bridge_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>false</Is_Bridge_Table>
</Table_Metaclass>
</owl:unionOf>
</owl:Class>
</rdfs:domain>
<rdfs:range>
<Table_Metaclass rdf:ID="grupoinv">
<Primary_Key_Fields
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>id</Primary_Key_Fields>
<Is_Bridge_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>false</Is_Bridge_Table>
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</rdfs:label>
</Table_Metaclass>
</rdfs:range>
<rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>publicaciones.grupoinv_INSTANCE</rdfs:label>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="colaboradores.grupoinv_INSTANCE">
<rdfs:range rdf:resource="#grupoinv"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>colaboradores.grupoinv_INSTANCE</rdfs:label>
<rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description
rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
<Table_Metaclass rdf:about="#colaboradores"/>
79
</owl:unionOf>
</owl:Class>
</rdfs:domain>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="integrantes.ies_INSTANCE">
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description
rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
<Table_Metaclass rdf:about="#colaboradores"/>
<Table_Metaclass rdf:about="#integrantes"/>
<Table_Metaclass rdf:about="#publicaciones"/>
</owl:unionOf>
</owl:Class>
</rdfs:domain>
<rdfs:range rdf:resource="#grupoinv"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes.ies_INSTANCE</rdfs:label>
<rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="investigacion.grupoinv_INSTANCE">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>investigacion.grupoinv_INSTANCE</rdfs:label>
<rdfs:range rdf:resource="#grupoinv"/>
<rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description
rdf:about="http://www.w3.org/2002/07/owl#Thing"/>
<Table_Metaclass rdf:ID="investigacion">
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>investigacion</rdfs:label>
<Foreign_Keys>
<Foreign_Key rdf:about="http://www.owlontologies.com/Foreign_Key_Instance_5">
<Local_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>integrantes.grupoinv</Local_Field>
<FK_Name
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>fk_grupoinv_grupoinv_id</FK_Name>
<Reference_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv</Reference_Table>
<Reference_Field
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>grupoinv.id</Reference_Field>
</Foreign_Key>
</Foreign_Keys>
<Is_Bridge_Table
rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>false</Is_Bridge_Table>
80
Descargar