Skip to content

Instantly share code, notes, and snippets.

@jas-
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jas-/15f2c9b437e9f69f3c6e to your computer and use it in GitHub Desktop.
Save jas-/15f2c9b437e9f69f3c6e to your computer and use it in GitHub Desktop.
SQLite Structure & Contents for small collection
-- Handles dates
-- |_ id referenced by dates2objects as foreign key
DROP TABLE IF EXISTS `dates`;
CREATE TABLE `dates` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`date` INT(4) UNIQUE DEFAULT NULL
);
-- Handles origin
-- |_ id referenced by origin2objects as foreign key
DROP TABLE IF EXISTS `origin`;
CREATE TABLE `origin` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`location` TEXT UNIQUE DEFAULT NULL
);
-- Handles languages
-- |_ id referenced by language2objects as foreign key
DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languages` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`language` TEXT UNIQUE DEFAULT NULL
);
-- Handles creator
-- |_ id referenced by creator2objects as foreign key
DROP TABLE IF EXISTS `creator`;
CREATE TABLE `creator` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` TEXT UNIQUE DEFAULT NULL
);
-- Handles genre
-- |_ id referenced by genrea2objects as foreign key
DROP TABLE IF EXISTS `genre`;
CREATE TABLE `genre` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` TEXT UNIQUE DEFAULT NULL
);
-- Handles images
-- |_ id referenced by images2objects as foreign key
DROP TABLE IF EXISTS `images`;
CREATE TABLE `images` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`path` TEXT DEFAULT NULL,
`description` TEXT DEFAULT NULL
);
-- Handles objects
DROP TABLE IF EXISTS `objects`;
CREATE TABLE `objects` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`callID` TEXT DEFAULT NULL
);
-- Handles many to many relations for dates to objects
DROP TABLE IF EXISTS `date2objects`;
CREATE TABLE `date2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`date` INTEGER,
`object` INTEGER,
FOREIGN KEY (`date`) REFERENCES `dates`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for origin to objects
DROP TABLE IF EXISTS `origin2objects`;
CREATE TABLE `origin2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`location` INTEGER,
`object` INTEGER,
FOREIGN KEY (`location`) REFERENCES `origin`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for language to objects
DROP TABLE IF EXISTS `language2objects`;
CREATE TABLE `language2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`language` INTEGER,
`object` INTEGER,
FOREIGN KEY (`language`) REFERENCES `languages`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for creator to objects
DROP TABLE IF EXISTS `creator2objects`;
CREATE TABLE `creator2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`name` INTEGER,
`object` INTEGER,
FOREIGN KEY (`name`) REFERENCES `creator`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for genre to objects
DROP TABLE IF EXISTS `genre2objects`;
CREATE TABLE `genre2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`genre` INTEGER,
`object` INTEGER,
FOREIGN KEY (`genre`) REFERENCES `genre`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for images to objects
DROP TABLE IF EXISTS `images2objects`;
CREATE TABLE `images2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`image` INTEGER,
`object` INTEGER,
FOREIGN KEY (`image`) REFERENCES `images`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
DROP VIEW IF EXISTS `laag`;
CREATE VIEW `laag` AS
SELECT
obj.id AS Id,
obj.callID AS CallID,
d.date AS Date,
o.location AS Location,
l.language AS Language,
c.name AS Name,
g.subject AS Genre
FROM
objects obj,
dates d,
origin o,
languages l,
creator c,
genre g,
date2objects d2o,
origin2objects o2o,
language2objects l2o,
creator2objects c2o,
genre2objects g2o
WHERE
obj.id = d2o.object AND d.id = d2o.date
AND
obj.id = o2o.object AND o.id = o2o.location
AND
obj.id = l2o.object AND l.id = l2o.language
AND
obj.id = c2o.object AND c.id = c2o.name
AND
obj.id = g2o.object AND g.id = g2o.genre
ORDER BY Id ASC;
-- Values for dates table
INSERT INTO `dates` (`id`, `date`) VALUES (1, 1966);
INSERT INTO `dates` (`id`, `date`) VALUES (2, 1971);
INSERT INTO `dates` (`id`, `date`) VALUES (3, 1974);
INSERT INTO `dates` (`id`, `date`) VALUES (4, 1975);
INSERT INTO `dates` (`id`, `date`) VALUES (5, 1976);
INSERT INTO `dates` (`id`, `date`) VALUES (6, 1977);
INSERT INTO `dates` (`id`, `date`) VALUES (7, 1978);
INSERT INTO `dates` (`id`, `date`) VALUES (8, 1979);
INSERT INTO `dates` (`id`, `date`) VALUES (9, 1980);
INSERT INTO `dates` (`id`, `date`) VALUES (10, 1981);
INSERT INTO `dates` (`id`, `date`) VALUES (11, 1982);
INSERT INTO `dates` (`id`, `date`) VALUES (12, 1984);
INSERT INTO `dates` (`id`, `date`) VALUES (13, 1987);
INSERT INTO `dates` (`id`, `date`) VALUES (14, 1988);
INSERT INTO `dates` (`id`, `date`) VALUES (15, 2004);
INSERT INTO `dates` (`id`, `date`) VALUES (16, 2007);
INSERT INTO `dates` (`id`, `date`) VALUES (17, 1995);
INSERT INTO `dates` (`id`, `date`) VALUES (18, 2000);
INSERT INTO `dates` (`id`, `date`) VALUES (19, 2001);
-- Values for origin table
INSERT INTO `origin` (`id`, `location`) VALUES (1, 'Argentina');
INSERT INTO `origin` (`id`, `location`) VALUES (2, 'Spain');
INSERT INTO `origin` (`id`, `location`) VALUES (3, 'Portugal');
INSERT INTO `origin` (`id`, `location`) VALUES (4, 'Brazil');
INSERT INTO `origin` (`id`, `location`) VALUES (5, 'Uruguay');
INSERT INTO `origin` (`id`, `location`) VALUES (6, 'Mexico');
INSERT INTO `origin` (`id`, `location`) VALUES (7, 'Cuba');
INSERT INTO `origin` (`id`, `location`) VALUES (8, 'United States');
INSERT INTO `origin` (`id`, `location`) VALUES (9, 'Netherlands');
-- Values for languages table
INSERT INTO `languages` (`id`, `language`) VALUES (1, 'Spanish');
INSERT INTO `languages` (`id`, `language`) VALUES (2, 'Portugese');
INSERT INTO `languages` (`id`, `language`) VALUES (3, 'Catalan');
INSERT INTO `languages` (`id`, `language`) VALUES (4, 'English');
INSERT INTO `languages` (`id`, `language`) VALUES (5, 'French');
INSERT INTO `languages` (`id`, `language`) VALUES (6, 'Italian');
-- Values for creator table
INSERT INTO `creator` (`id`, `name`) VALUES (1, 'Barreto, Eduardo');
INSERT INTO `creator` (`id`, `name`) VALUES (2, 'Bofarul');
INSERT INTO `creator` (`id`, `name`) VALUES (3, 'Castro, Lourdes');
INSERT INTO `creator` (`id`, `name`) VALUES (4, 'Carlos, Joao');
INSERT INTO `creator` (`id`, `name`) VALUES (5, 'Clemente, Padin');
INSERT INTO `creator` (`id`, `name`) VALUES (6, 'Deniz, Gerardo');
INSERT INTO `creator` (`id`, `name`) VALUES (7, 'Goulart, Claudio');
INSERT INTO `creator` (`id`, `name`) VALUES (8, 'Gross, Camela');
INSERT INTO `creator` (`id`, `name`) VALUES (9, 'Gutierrez Marx, Graciela');
INSERT INTO `creator` (`id`, `name`) VALUES (10, 'Gutierrez, Juan Pedro');
INSERT INTO `creator` (`id`, `name`) VALUES (11, 'Hendrix, Jan');
INSERT INTO `creator` (`id`, `name`) VALUES (12, 'Hermann, Villari');
INSERT INTO `creator` (`id`, `name`) VALUES (13, 'Jungle, Ted');
INSERT INTO `creator` (`id`, `name`) VALUES (14, 'Lambrecht, Karin');
INSERT INTO `creator` (`id`, `name`) VALUES (15, 'Lara, Magali');
INSERT INTO `creator` (`id`, `name`) VALUES (16, 'Lara, Mario');
INSERT INTO `creator` (`id`, `name`) VALUES (17, 'Lisboa, Unhandeijara');
INSERT INTO `creator` (`id`, `name`) VALUES (18, 'Michael, Scott');
INSERT INTO `creator` (`id`, `name`) VALUES (19, 'Palou, Joan');
INSERT INTO `creator` (`id`, `name`) VALUES (20, 'Pazos, Luis');
INSERT INTO `creator` (`id`, `name`) VALUES (21, 'Piyama, Ana');
INSERT INTO `creator` (`id`, `name`) VALUES (22, 'Plaza, Julio');
INSERT INTO `creator` (`id`, `name`) VALUES (23, 'Sampaio, Carlos');
INSERT INTO `creator` (`id`, `name`) VALUES (24, 'Schraenen, Guy');
INSERT INTO `creator` (`id`, `name`) VALUES (25, 'Silveira, Regina');
INSERT INTO `creator` (`id`, `name`) VALUES (26, 'Ugalde, Juan');
INSERT INTO `creator` (`id`, `name`) VALUES (27, 'Varela, Dailor');
INSERT INTO `creator` (`id`, `name`) VALUES (28, 'Various');
INSERT INTO `creator` (`id`, `name`) VALUES (29, 'Zabala, Horacio');
INSERT INTO `creator` (`id`, `name`) VALUES (30, 'Ediciones Vigía');
INSERT INTO `creator` (`id`, `name`) VALUES (31, 'Blanco, Reynaldo García');
INSERT INTO `creator` (`id`, `name`) VALUES (32, 'Febles, Rodríguez');
INSERT INTO `creator` (`id`, `name`) VALUES (33, 'Gómez, Yamil Díaz ');
INSERT INTO `creator` (`id`, `name`) VALUES (34, 'Jordán, Rolando Estévez');
INSERT INTO `creator` (`id`, `name`) VALUES (35, 'León, Gerardo Fulleda');
-- Values for genre table
INSERT INTO `genre` (`id`, `subject`) VALUES (1, 'conceptual');
INSERT INTO `genre` (`id`, `subject`) VALUES (2, 'event documentation');
INSERT INTO `genre` (`id`, `subject`) VALUES (3, 'graphics');
INSERT INTO `genre` (`id`, `subject`) VALUES (4, 'mail art');
INSERT INTO `genre` (`id`, `subject`) VALUES (5, 'multiple works');
INSERT INTO `genre` (`id`, `subject`) VALUES (6, 'performance');
INSERT INTO `genre` (`id`, `subject`) VALUES (7, 'photography');
INSERT INTO `genre` (`id`, `subject`) VALUES (8, 'poetics');
INSERT INTO `genre` (`id`, `subject`) VALUES (9, 'politics');
INSERT INTO `genre` (`id`, `subject`) VALUES (10, 'mixed media');
INSERT INTO `genre` (`id`, `subject`) VALUES (11, 'artist book');
INSERT INTO `genre` (`id`, `subject`) VALUES (12, 'drawings');
-- Values for objects table
INSERT INTO `objects` (`id`, `callID`) VALUES (2, 'N7433.4 .C386');
INSERT INTO `objects` (`id`, `callID`) VALUES (3, 'N7433.4 .P394');
INSERT INTO `objects` (`id`, `callID`) VALUES (4, 'N7433.4 .C386');
INSERT INTO `objects` (`id`, `callID`) VALUES (5, 'N7433.4 .P22');
INSERT INTO `objects` (`id`, `callID`) VALUES (6, 'N7433.3');
INSERT INTO `objects` (`id`, `callID`) VALUES (7, 'NE3001 .L37');
INSERT INTO `objects` (`id`, `callID`) VALUES (8, 'N7433.4 .G666');
INSERT INTO `objects` (`id`, `callID`) VALUES (9, 'N7433.4 .P22');
INSERT INTO `objects` (`id`, `callID`) VALUES (10, 'N7433.4 .P22');
INSERT INTO `objects` (`id`, `callID`) VALUES (11, 'N7433.4 .V374');
INSERT INTO `objects` (`id`, `callID`) VALUES (12, 'N7433.4 .B3676');
INSERT INTO `objects` (`id`, `callID`) VALUES (13, 'PQ9003');
INSERT INTO `objects` (`id`, `callID`) VALUES (14, 'N6494 .M35');
INSERT INTO `objects` (`id`, `callID`) VALUES (15, 'N7433.4 .P62');
INSERT INTO `objects` (`id`, `callID`) VALUES (16, 'N6639 .Z83');
INSERT INTO `objects` (`id`, `callID`) VALUES (17, 'NX456.5 .A8');
INSERT INTO `objects` (`id`, `callID`) VALUES (18, 'N7433.4 .G815');
INSERT INTO `objects` (`id`, `callID`) VALUES (19, 'N7108');
INSERT INTO `objects` (`id`, `callID`) VALUES (20, 'N6494 .M35');
INSERT INTO `objects` (`id`, `callID`) VALUES (21, '');
INSERT INTO `objects` (`id`, `callID`) VALUES (22, 'NX533 .S26');
INSERT INTO `objects` (`id`, `callID`) VALUES (23, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (24, 'N7433.4 .G666');
INSERT INTO `objects` (`id`, `callID`) VALUES (25, 'N6549 .H46');
INSERT INTO `objects` (`id`, `callID`) VALUES (26, 'N7433.4 .L353');
INSERT INTO `objects` (`id`, `callID`) VALUES (27, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (28, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (29, 'N7433.4 .P25');
INSERT INTO `objects` (`id`, `callID`) VALUES (30, 'N7433.4 .P59');
INSERT INTO `objects` (`id`, `callID`) VALUES (31, 'N7433.4 .J86');
INSERT INTO `objects` (`id`, `callID`) VALUES (32, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (33, 'N6494 .M35');
INSERT INTO `objects` (`id`, `callID`) VALUES (34, 'N7433.4 .G87');
INSERT INTO `objects` (`id`, `callID`) VALUES (35, 'N7433.4 .L364');
INSERT INTO `objects` (`id`, `callID`) VALUES (36, 'N7433.4 .U47');
INSERT INTO `objects` (`id`, `callID`) VALUES (37, 'PQ7390 .G83');
INSERT INTO `objects` (`id`, `callID`) VALUES (38, 'N6659 .S49');
INSERT INTO `objects` (`id`, `callID`) VALUES (39, 'PQ7298.14 .E48');
INSERT INTO `objects` (`id`, `callID`) VALUES (40, 'N6639 .Z33');
INSERT INTO `objects` (`id`, `callID`) VALUES (41, 'N6658 .E63 1979');
INSERT INTO `objects` (`id`, `callID`) VALUES (42, 'N7433.35 .C83 R48 2000');
INSERT INTO `objects` (`id`, `callID`) VALUES (43, 'N7433.45 .C83 G37 1995');
INSERT INTO `objects` (`id`, `callID`) VALUES (44, 'N7433.35 .C83 R63 2001');
INSERT INTO `objects` (`id`, `callID`) VALUES (45, 'N7433.35 .C83 D52 2007');
INSERT INTO `objects` (`id`, `callID`) VALUES (46, 'N7433.35 .C83 E77');
INSERT INTO `objects` (`id`, `callID`) VALUES (47, 'N7433.35 .C83 F85 2007');
-- Values for dates2objects table
INSERT INTO `date2objects` (`date`, `object`) VALUES (1, 2);
INSERT INTO `date2objects` (`date`, `object`) VALUES (2, 3);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 4);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 5);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 6);
INSERT INTO `date2objects` (`date`, `object`) VALUES (4, 7);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 8);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 9);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 10);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 11);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 12);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 13);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 14);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 15);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 16);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 17);
INSERT INTO `date2objects` (`date`, `object`) VALUES (7, 18);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 19);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 20);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 22);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 41);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 23);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 24);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 25);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 26);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 27);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 28);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 29);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 30);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 31);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 32);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 33);
INSERT INTO `date2objects` (`date`, `object`) VALUES (11, 34);
INSERT INTO `date2objects` (`date`, `object`) VALUES (12, 36);
INSERT INTO `date2objects` (`date`, `object`) VALUES (13, 37);
INSERT INTO `date2objects` (`date`, `object`) VALUES (14, 38);
INSERT INTO `date2objects` (`date`, `object`) VALUES (15, 39);
INSERT INTO `date2objects` (`date`, `object`) VALUES (16, 40);
-- Values for origin2objects table
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 3);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 16);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 34);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 40);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 19);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 29);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 30);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 36);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 2);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 4);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 14);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 20);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 6);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 7);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 8);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 11);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 12);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 13);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 15);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 18);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 22);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 24);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 26);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 31);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 38);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 41);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 5);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 9);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 10);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 23);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 25);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 27);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 28);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 32);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 39);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (7, 37);
-- Values for language2objects table
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 10);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 16);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 19);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 23);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 25);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 27);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 28);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 6);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 11);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 12);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 13);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 14);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 15);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 18);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 20);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 21);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 26);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 31);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 41);
INSERT INTO `language2objects` (`language`, `object`) VALUES (3, 30);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 24);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 2);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 8);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 9);
-- Values for creator2objects table
INSERT INTO `creator2objects` (`name`, `object`) VALUES (1, 12);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (2, 19);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (3, 2);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (3, 4);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (4, 7);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 5);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 9);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 10);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (6, 39);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (7, 8);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (7, 24);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (8, 18);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (9, 34);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (10, 37);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (11, 25);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (12, 22);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (13, 31);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (14, 26);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 23);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 27);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 28);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 32);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (16, NULL);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (17, 14);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (17, 20);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (18, 33);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (19, 29);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (20, 3);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (21, 30);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (22, 15);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (23, 6);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (24, 4);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (25, 38);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (26, 36);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (27, 11);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 13);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 17);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 22);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 41);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (29, 16);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (29, 40);
-- Values for creator2objects table
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 16);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 29);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 33);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 38);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 2);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 8);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 15);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 18);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 23);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 24);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 27);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 28);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 30);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 31);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 36);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 7);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 41);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 11);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 32);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 12);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 19);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 22);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 39);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 12);
-- Handles origin
-- |_ id referenced by origin2objects as foreign key
DROP TABLE IF EXISTS `origin`;
CREATE TABLE `origin` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`location` TEXT UNIQUE DEFAULT NULL
);
-- Handles languages
-- |_ id referenced by language2objects as foreign key
DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languages` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`language` TEXT UNIQUE DEFAULT NULL
);
-- Handles genre
-- |_ id referenced by genrea2objects as foreign key
DROP TABLE IF EXISTS `genre`;
CREATE TABLE `genre` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` TEXT UNIQUE DEFAULT NULL
);
-- Handles images
-- |_ id referenced by images2objects as foreign key
DROP TABLE IF EXISTS `images`;
CREATE TABLE `images` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`path` TEXT DEFAULT NULL,
`description` TEXT DEFAULT NULL
);
-- Handles objects
DROP TABLE IF EXISTS `objects`;
CREATE TABLE `objects` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`callID` TEXT DEFAULT NULL,
`date` INT(4) DEFAULT NULL,
`author` TEXT DEFAULT NULL
);
-- Handles many to many relations for origin to objects
DROP TABLE IF EXISTS `origin2objects`;
CREATE TABLE `origin2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`location` INTEGER,
`object` INTEGER,
FOREIGN KEY (`location`)
REFERENCES `origin`(`id`),
FOREIGN KEY (`object`)
REFERENCES `objects`(`id`)
);
-- Handles many to many relations for language to objects
DROP TABLE IF EXISTS `language2objects`;
CREATE TABLE `language2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`language` INTEGER,
`object` INTEGER,
FOREIGN KEY (`language`)
REFERENCES `languages`(`id`),
FOREIGN KEY (`object`)
REFERENCES `objects`(`id`)
);
-- Handles many to many relations for genre to objects
DROP TABLE IF EXISTS `genre2objects`;
CREATE TABLE `genre2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`genre` INTEGER,
`object` INTEGER,
FOREIGN KEY (`genre`)
REFERENCES `genre`(`id`),
FOREIGN KEY (`object`)
REFERENCES `objects`(`id`)
);
-- Handles many to many relations for images to objects
DROP TABLE IF EXISTS `images2objects`;
CREATE TABLE `images2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`image` INTEGER,
`object` INTEGER,
FOREIGN KEY (`image`)
REFERENCES `images`(`id`),
FOREIGN KEY (`object`)
REFERENCES `objects`(`id`)
);
DROP VIEW IF EXISTS `laag`;
CREATE VIEW `laag` AS
SELECT DISTINCT
obj.id AS ID,
obj.callID AS CallID,
obj.date AS Date,
obj.author AS Author,
IFNULL(l.language, '') AS Language,
IFNULL(o.location, '') AS Origin,
IFNULL(g.subject, '') AS Genre
FROM
objects obj,
language2objects l2o,
origin2objects o2o,
genre2objects g2o
LEFT JOIN languages l ON
l2o.language = l.id AND l2o.object = obj.id
LEFT JOIN origin o ON
o2o.location = o.id AND o2o.object = obj.id
LEFT JOIN genre g ON
g2o.genre = g.id AND g2o.object = obj.id
ORDER BY ID;
-- Values for origin table
INSERT INTO `origin` (`id`, `location`) VALUES (1, 'Argentina');
INSERT INTO `origin` (`id`, `location`) VALUES (2, 'Spain');
INSERT INTO `origin` (`id`, `location`) VALUES (3, 'Portugal');
INSERT INTO `origin` (`id`, `location`) VALUES (4, 'Brazil');
INSERT INTO `origin` (`id`, `location`) VALUES (5, 'Uruguay');
INSERT INTO `origin` (`id`, `location`) VALUES (6, 'Mexico');
INSERT INTO `origin` (`id`, `location`) VALUES (7, 'Cuba');
INSERT INTO `origin` (`id`, `location`) VALUES (8, 'United States');
INSERT INTO `origin` (`id`, `location`) VALUES (9, 'Netherlands');
INSERT INTO `origin` (`id`, `location`) VALUES (10, 'Belgium');
-- Values for languages table
INSERT INTO `languages` (`id`, `language`) VALUES (1, 'Spanish');
INSERT INTO `languages` (`id`, `language`) VALUES (2, 'Portugese');
INSERT INTO `languages` (`id`, `language`) VALUES (3, 'Catalan');
INSERT INTO `languages` (`id`, `language`) VALUES (4, 'English');
INSERT INTO `languages` (`id`, `language`) VALUES (5, 'French');
INSERT INTO `languages` (`id`, `language`) VALUES (6, 'Italian');
-- Values for genre table
INSERT INTO `genre` (`id`, `subject`) VALUES (1, 'conceptual');
INSERT INTO `genre` (`id`, `subject`) VALUES (2, 'event documentation');
INSERT INTO `genre` (`id`, `subject`) VALUES (3, 'graphics');
INSERT INTO `genre` (`id`, `subject`) VALUES (4, 'mail art');
INSERT INTO `genre` (`id`, `subject`) VALUES (5, 'multiple works');
INSERT INTO `genre` (`id`, `subject`) VALUES (6, 'performance');
INSERT INTO `genre` (`id`, `subject`) VALUES (7, 'photography');
INSERT INTO `genre` (`id`, `subject`) VALUES (8, 'poetics');
INSERT INTO `genre` (`id`, `subject`) VALUES (9, 'politics');
INSERT INTO `genre` (`id`, `subject`) VALUES (10, 'mixed media');
INSERT INTO `genre` (`id`, `subject`) VALUES (11, 'artist book');
INSERT INTO `genre` (`id`, `subject`) VALUES (12, 'drawings');
-- Values for objects table
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (2, 'N7433.4 .C386', 1966, 'Castro, Lourdes');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (3, 'N7433.4 .P394', 1971, 'Pazos, Luis');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (4, 'N7433.4 .C386', 1974, 'Castro, Lourdes');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (5, 'N7433.4 .P22', 1974, 'Padin, Clemente');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (6, 'N7433.3', 1974, 'Sampaio, Carlos');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (7, 'NE3001 .L37', 1975, 'Carlos, Joao.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (8, 'N7433.4 .G666', 1979, 'Goulart, Claudio,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (9, 'N7433.4 .P22', 1976, 'Padín, Clemente.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (10, 'N7433.4 .P22', 1976, 'Padin, Clemente.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (11, 'N7433.4 .V374', 1976, 'Varela, Dailor.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (12, 'N7433.4 .B3676', 1977, 'Barreto, Eduardo.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (13, 'PQ9003', 1977, 'Various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (14, 'N6494 .M35', 1977, 'Lisboa, Unhandeijara.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (15, 'N7433.4 .P62', 1977, 'Plaza, Julio.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (16, 'N6639 .Z83', 1977, 'Zabala, Horacio,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (17, 'NX456.5 .A8', 1977, 'Various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (18, 'N7433.4 .G815', 1978, 'Gross, Carmela.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (19, 'N7108', 1979, 'Bofarul.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (20, 'N6494 .M35', 1979, 'Lisboa, Unhandeijara.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (22, 'NX533 .S26', 1979, 'Various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (23, 'N7433.4 .L363', 1980, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (24, 'N7433.4 .G666', 1980, 'Goulart, Claudio,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (25, 'N6549 .H46', 1980, 'Hendrix, Jan,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (26, 'N7433.4 .L353', 1980, 'Lambrecht, Karin,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (27, 'N7433.4 .L363', 1980, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (28, 'N7433.4 .L363', 1980, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (29, 'N7433.4 .P25', 1980, 'Palou, Joan.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (30, 'N7433.4 .P59', 1980, 'Piyama, Ana.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (31, 'N7433.4 .J86', 1981, 'Jungle, Ted,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (32, 'N7433.4 .L363', 1981, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (33, 'N6494 .M35', 1981, 'Scott, Michael.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (34, 'N7433.4 .G87', 1982, 'Gutiérrez Marx, Graciela.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (35, 'N7433.4 .L364', 1983, 'Lara, Mario.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (36, 'N7433.4 .U47', 1984, 'Ugalde, Juan');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (37, 'PQ7390 .G83', 1987, 'Gutiérrez, Pedro Juan');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (38, 'N6659 .S49', 1988, 'Silveira, Regina');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (39, 'PQ7298.14 .E48', 2004, 'Deniz, Gerardo');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (40, 'N6639 .Z33', 2007, 'Zabala, Horacio');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (41, 'N6658 .E63 1979', 1979, 'various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (42, 'N7433.35 .C83 R48 2000', 2000, 'Ediciones Vigía');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (43, 'N7433.45 .C83 G37 1995', 1995, 'Blanco, Reynaldo García');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (44, 'N7433.35 .C83 R63 2001', 2001, 'Febles, Rodríguez');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (45, 'N7433.35 .C83 D52 2007', 2007, 'Gómez, Yamil Díaz');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (46, 'N7433.35 .C83 E77', 2007, 'Jordán, Rolando Estévez');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (47, 'N7433.35 .C83 F85 2007', 2007, 'León, Gerardo Fulleda');
-- Values for origin2objects table
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 3);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 16);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 34);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 40);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 19);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 29);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 30);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 36);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 2);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 10);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 4);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 14);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 20);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 6);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 7);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 8);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 11);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 12);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 13);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 15);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 18);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 22);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 24);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 26);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 31);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 38);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 41);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 5);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 9);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 10);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 23);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 25);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 27);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 28);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 32);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 39);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (7, 37);
-- Values for language2objects table
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 10);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 16);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 19);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 23);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 25);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 27);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 28);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 6);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 11);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 12);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 13);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 14);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 15);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 18);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 20);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 21);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 26);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 31);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 41);
INSERT INTO `language2objects` (`language`, `object`) VALUES (3, 30);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 24);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 2);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 8);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 4);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 9);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 7);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 7);
-- Values for creator2objects table
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 16);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 29);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 33);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 38);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 2);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 8);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 15);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 18);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 23);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 24);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 27);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 28);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 30);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 31);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 36);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 7);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 41);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 11);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 32);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 12);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 19);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 22);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 39);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 12);
DROP TABLE IF EXISTS `dates`;
CREATE TABLE `dates` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`date` INT(4) UNIQUE DEFAULT NULL
);
DROP TABLE IF EXISTS `origin`;
CREATE TABLE `origin` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`location` TEXT UNIQUE DEFAULT NULL
);
DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languages` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`language` TEXT UNIQUE DEFAULT NULL
);
DROP TABLE IF EXISTS `creator`;
CREATE TABLE `creator` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` TEXT UNIQUE DEFAULT NULL
);
DROP TABLE IF EXISTS `genre`;
CREATE TABLE `genre` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` TEXT UNIQUE DEFAULT NULL
);
DROP TABLE IF EXISTS `images`;
CREATE TABLE `images` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`path` TEXT DEFAULT NULL,
`description` TEXT DEFAULT NULL
);
DROP TABLE IF EXISTS `objects`;
CREATE TABLE `objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`date` INTEGER DEFAULT NULL,
`location` INTEGER DEFAULT NULL,
`language` INTEGER DEFAULT NULL,
`name` INTEGER DEFAULT NULL,
`genre` INTEGER DEFAULT NULL,
`images` INTEGER DEFAULT NULL,
FOREIGN KEY (`date`) REFERENCES `date`(`id`),
FOREIGN KEY (`location`) REFERENCES `origin`(`id`),
FOREIGN KEY (`language`) REFERENCES `languages`(`id`),
FOREIGN KEY (`name`) REFERENCES `creator`(`id`),
FOREIGN KEY (`genre`) REFERENCES `genre`(`id`),
FOREIGN KEY (`images`) REFERENCES `images`(`id`)
);
DROP VIEW IF EXISTS `laag`;
CREATE VIEW `laag` AS
SELECT o.id AS Id,
d.date AS Date,
og.location AS Location,
l.language AS Language,
c.name AS Name,
g.subject AS Genre,
i.path AS Images
FROM objects o
LEFT JOIN dates d ON d.id = o.date
LEFT JOIN origin og ON og.id = o.location
LEFT JOIN languages l ON l.id = o.language
LEFT JOIN creator c ON c.id = o.name
LEFT JOIN genre g ON g.id = o.genre
LEFT JOIN images i ON i.id = o.images
ORDER BY Id ASC;
INSERT INTO `dates` (`date`) VALUES (1966);
INSERT INTO `dates` (`date`) VALUES (1971);
INSERT INTO `dates` (`date`) VALUES (1974);
INSERT INTO `dates` (`date`) VALUES (1975);
INSERT INTO `dates` (`date`) VALUES (1976);
INSERT INTO `dates` (`date`) VALUES (1977);
INSERT INTO `dates` (`date`) VALUES (1978);
INSERT INTO `dates` (`date`) VALUES (1979);
INSERT INTO `dates` (`date`) VALUES (1980);
INSERT INTO `dates` (`date`) VALUES (1981);
INSERT INTO `dates` (`date`) VALUES (1982);
INSERT INTO `dates` (`date`) VALUES (1983);
INSERT INTO `dates` (`date`) VALUES (1984);
INSERT INTO `dates` (`date`) VALUES (1987);
INSERT INTO `dates` (`date`) VALUES (1988);
INSERT INTO `dates` (`date`) VALUES (2004);
INSERT INTO `dates` (`date`) VALUES (2007);
INSERT INTO `origin` (`location`) VALUES ('Argentina');
INSERT INTO `origin` (`location`) VALUES ('Spain');
INSERT INTO `origin` (`location`) VALUES ('Portugal');
INSERT INTO `origin` (`location`) VALUES ('Brazil');
INSERT INTO `origin` (`location`) VALUES ('Uruguay');
INSERT INTO `origin` (`location`) VALUES ('Mexico');
INSERT INTO `languages` (`language`) VALUES ('Spanish');
INSERT INTO `languages` (`language`) VALUES ('Portugese');
INSERT INTO `languages` (`language`) VALUES ('Catalan');
INSERT INTO `languages` (`language`) VALUES ('English');
INSERT INTO `languages` (`language`) VALUES ('French');
INSERT INTO `languages` (`language`) VALUES ('Italian');
INSERT INTO `creator` (`name`) VALUES ('Barreto');
INSERT INTO `creator` (`name`) VALUES ('Eduardo, Bofarul');
INSERT INTO `creator` (`name`) VALUES ('Castro, Lourdes');
INSERT INTO `creator` (`name`) VALUES ('Clemente, Padin');
INSERT INTO `creator` (`name`) VALUES ('Deniz, Gerardo');
INSERT INTO `creator` (`name`) VALUES ('Goulart, Claudio');
INSERT INTO `creator` (`name`) VALUES ('Gross, Camela');
INSERT INTO `creator` (`name`) VALUES ('Gutierrez Marx, Graciela');
INSERT INTO `creator` (`name`) VALUES ('Gutierrez, Juan Pedro');
INSERT INTO `creator` (`name`) VALUES ('Hendrix, Jan');
INSERT INTO `creator` (`name`) VALUES ('Jungle, Ted');
INSERT INTO `creator` (`name`) VALUES ('Lambrecht, Karin');
INSERT INTO `creator` (`name`) VALUES ('Lara, Magali');
INSERT INTO `creator` (`name`) VALUES ('Lara, Mario');
INSERT INTO `creator` (`name`) VALUES ('Lisboa, Unhandeijara');
INSERT INTO `creator` (`name`) VALUES ('Michael, Scott');
INSERT INTO `creator` (`name`) VALUES ('Palou, Joan');
INSERT INTO `creator` (`name`) VALUES ('Pazos, Luis');
INSERT INTO `creator` (`name`) VALUES ('Piyama, Ana');
INSERT INTO `creator` (`name`) VALUES ('Plaza, Julio');
INSERT INTO `creator` (`name`) VALUES ('Sampaio, Carlos');
INSERT INTO `creator` (`name`) VALUES ('Schraenen, Guy');
INSERT INTO `creator` (`name`) VALUES ('Silveira, Regina');
INSERT INTO `creator` (`name`) VALUES ('Ugalde, Juan');
INSERT INTO `creator` (`name`) VALUES ('Varela, Dailor');
INSERT INTO `creator` (`name`) VALUES ('Various');
INSERT INTO `creator` (`name`) VALUES ('Zabala, Horacio');
INSERT INTO `genre` (`subject`) VALUES ('aesthetics');
INSERT INTO `genre` (`subject`) VALUES ('conceptual');
INSERT INTO `genre` (`subject`) VALUES ('event documentation');
INSERT INTO `genre` (`subject`) VALUES ('graphics');
INSERT INTO `genre` (`subject`) VALUES ('mail art');
INSERT INTO `genre` (`subject`) VALUES ('multiple works');
INSERT INTO `genre` (`subject`) VALUES ('performance');
INSERT INTO `genre` (`subject`) VALUES ('photography');
INSERT INTO `genre` (`subject`) VALUES ('politics');
-- Handles dates
-- |_ id referenced by dates2objects as foreign key
DROP TABLE IF EXISTS `dates`;
CREATE TABLE `dates` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`date` INT(4) UNIQUE DEFAULT NULL
);
-- Handles origin
-- |_ id referenced by origin2objects as foreign key
DROP TABLE IF EXISTS `origin`;
CREATE TABLE `origin` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`location` TEXT UNIQUE DEFAULT NULL
);
-- Handles languages
-- |_ id referenced by language2objects as foreign key
DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languages` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`language` TEXT UNIQUE DEFAULT NULL
);
-- Handles creator
-- |_ id referenced by creator2objects as foreign key
DROP TABLE IF EXISTS `creator`;
CREATE TABLE `creator` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` TEXT UNIQUE DEFAULT NULL
);
-- Handles genre
-- |_ id referenced by genrea2objects as foreign key
DROP TABLE IF EXISTS `genre`;
CREATE TABLE `genre` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` TEXT UNIQUE DEFAULT NULL
);
-- Handles images
-- |_ id referenced by images2objects as foreign key
DROP TABLE IF EXISTS `images`;
CREATE TABLE `images` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`path` TEXT DEFAULT NULL,
`description` TEXT DEFAULT NULL
);
-- Handles objects
DROP TABLE IF EXISTS `objects`;
CREATE TABLE `objects` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`objID` INTEGER
);
-- Handles many to many relations for dates to objects
DROP TABLE IF EXISTS `date2objects`;
CREATE TABLE `date2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`date` INTEGER,
`object` INTEGER,
FOREIGN KEY (`date`) REFERENCES `dates`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for origin to objects
DROP TABLE IF EXISTS `origin2objects`;
CREATE TABLE `origin2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`location` INTEGER,
`object` INTEGER,
FOREIGN KEY (`location`) REFERENCES `origin`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for language to objects
DROP TABLE IF EXISTS `language2objects`;
CREATE TABLE `language2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`language` INTEGER,
`object` INTEGER,
FOREIGN KEY (`language`) REFERENCES `languages`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for creator to objects
DROP TABLE IF EXISTS `creator2objects`;
CREATE TABLE `creator2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`name` INTEGER,
`object` INTEGER,
FOREIGN KEY (`name`) REFERENCES `creator`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for genre to objects
DROP TABLE IF EXISTS `genre2objects`;
CREATE TABLE `genre2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`genre` INTEGER,
`object` INTEGER,
FOREIGN KEY (`genre`) REFERENCES `genre`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for images to objects
DROP TABLE IF EXISTS `images2objects`;
CREATE TABLE `images2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`image` INTEGER,
`object` INTEGER,
FOREIGN KEY (`image`) REFERENCES `images`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
DROP VIEW IF EXISTS `laag`;
CREATE VIEW `laag` AS
SELECT
obj.objID AS Id,
d.date AS Date,
o.location AS Location,
l.language AS Language,
c.name AS Name,
g.subject AS Genre
FROM
objects obj,
dates d,
origin o,
languages l,
creator c,
genre g,
date2objects d2o,
origin2objects o2o,
language2objects l2o,
creator2objects c2o,
genre2objects g2o
WHERE
obj.objID = d2o.object AND d.id = d2o.date
AND
obj.objID = o2o.object AND o.id = o2o.location
AND
obj.objID = l2o.object AND l.id = l2o.language
AND
obj.objID = c2o.object AND c.id = c2o.name
AND
obj.objID = g2o.object AND g.id = g2o.genre
ORDER BY Id ASC;
-- Values for dates table
INSERT INTO `dates` (`id`, `date`) VALUES (1, 1966);
INSERT INTO `dates` (`id`, `date`) VALUES (2, 1971);
INSERT INTO `dates` (`id`, `date`) VALUES (3, 1974);
INSERT INTO `dates` (`id`, `date`) VALUES (4, 1975);
INSERT INTO `dates` (`id`, `date`) VALUES (5, 1976);
INSERT INTO `dates` (`id`, `date`) VALUES (6, 1977);
INSERT INTO `dates` (`id`, `date`) VALUES (7, 1978);
INSERT INTO `dates` (`id`, `date`) VALUES (8, 1979);
INSERT INTO `dates` (`id`, `date`) VALUES (9, 1980);
INSERT INTO `dates` (`id`, `date`) VALUES (10, 1981);
INSERT INTO `dates` (`id`, `date`) VALUES (11, 1982);
INSERT INTO `dates` (`id`, `date`) VALUES (12, 1984);
INSERT INTO `dates` (`id`, `date`) VALUES (13, 1987);
INSERT INTO `dates` (`id`, `date`) VALUES (14, 1988);
INSERT INTO `dates` (`id`, `date`) VALUES (15, 2004);
INSERT INTO `dates` (`id`, `date`) VALUES (16, 2007);
-- Values for origin table
INSERT INTO `origin` (`id`, `location`) VALUES (1, 'Argentina');
INSERT INTO `origin` (`id`, `location`) VALUES (2, 'Spain');
INSERT INTO `origin` (`id`, `location`) VALUES (3, 'Portugal');
INSERT INTO `origin` (`id`, `location`) VALUES (4, 'Brazil');
INSERT INTO `origin` (`id`, `location`) VALUES (5, 'Uruguay');
INSERT INTO `origin` (`id`, `location`) VALUES (6, 'Mexico');
INSERT INTO `origin` (`id`, `location`) VALUES (7, 'Cuba');
-- Values for languages table
INSERT INTO `languages` (`id`, `language`) VALUES (1, 'Spanish');
INSERT INTO `languages` (`id`, `language`) VALUES (2, 'Portugese');
INSERT INTO `languages` (`id`, `language`) VALUES (3, 'Catalan');
INSERT INTO `languages` (`id`, `language`) VALUES (4, 'English');
INSERT INTO `languages` (`id`, `language`) VALUES (5, 'French');
INSERT INTO `languages` (`id`, `language`) VALUES (6, 'Italian');
-- Values for creator table
INSERT INTO `creator` (`id`, `name`) VALUES (1, 'Barreto, Eduardo');
INSERT INTO `creator` (`id`, `name`) VALUES (2, 'Bofarul');
INSERT INTO `creator` (`id`, `name`) VALUES (3, 'Castro, Lourdes');
INSERT INTO `creator` (`id`, `name`) VALUES (4, 'Carlos, Joao');
INSERT INTO `creator` (`id`, `name`) VALUES (5, 'Clemente, Padin');
INSERT INTO `creator` (`id`, `name`) VALUES (6, 'Deniz, Gerardo');
INSERT INTO `creator` (`id`, `name`) VALUES (7, 'Goulart, Claudio');
INSERT INTO `creator` (`id`, `name`) VALUES (8, 'Gross, Camela');
INSERT INTO `creator` (`id`, `name`) VALUES (9, 'Gutierrez Marx, Graciela');
INSERT INTO `creator` (`id`, `name`) VALUES (10, 'Gutierrez, Juan Pedro');
INSERT INTO `creator` (`id`, `name`) VALUES (11, 'Hendrix, Jan');
INSERT INTO `creator` (`id`, `name`) VALUES (12, 'Hermann, Villari');
INSERT INTO `creator` (`id`, `name`) VALUES (13, 'Jungle, Ted');
INSERT INTO `creator` (`id`, `name`) VALUES (14, 'Lambrecht, Karin');
INSERT INTO `creator` (`id`, `name`) VALUES (15, 'Lara, Magali');
INSERT INTO `creator` (`id`, `name`) VALUES (16, 'Lara, Mario');
INSERT INTO `creator` (`id`, `name`) VALUES (17, 'Lisboa, Unhandeijara');
INSERT INTO `creator` (`id`, `name`) VALUES (18, 'Michael, Scott');
INSERT INTO `creator` (`id`, `name`) VALUES (19, 'Palou, Joan');
INSERT INTO `creator` (`id`, `name`) VALUES (20, 'Pazos, Luis');
INSERT INTO `creator` (`id`, `name`) VALUES (21, 'Piyama, Ana');
INSERT INTO `creator` (`id`, `name`) VALUES (22, 'Plaza, Julio');
INSERT INTO `creator` (`id`, `name`) VALUES (23, 'Sampaio, Carlos');
INSERT INTO `creator` (`id`, `name`) VALUES (24, 'Schraenen, Guy');
INSERT INTO `creator` (`id`, `name`) VALUES (25, 'Silveira, Regina');
INSERT INTO `creator` (`id`, `name`) VALUES (26, 'Ugalde, Juan');
INSERT INTO `creator` (`id`, `name`) VALUES (27, 'Varela, Dailor');
INSERT INTO `creator` (`id`, `name`) VALUES (28, 'Various');
INSERT INTO `creator` (`id`, `name`) VALUES (29, 'Zabala, Horacio');
-- Values for genre table
INSERT INTO `genre` (`id`, `subject`) VALUES (1, 'conceptual');
INSERT INTO `genre` (`id`, `subject`) VALUES (2, 'event documentation');
INSERT INTO `genre` (`id`, `subject`) VALUES (3, 'graphics');
INSERT INTO `genre` (`id`, `subject`) VALUES (4, 'mail art');
INSERT INTO `genre` (`id`, `subject`) VALUES (5, 'multiple works');
INSERT INTO `genre` (`id`, `subject`) VALUES (6, 'performance');
INSERT INTO `genre` (`id`, `subject`) VALUES (7, 'photography');
INSERT INTO `genre` (`id`, `subject`) VALUES (8, 'poetics');
INSERT INTO `genre` (`id`, `subject`) VALUES (9, 'politics');
-- Values for objects table
INSERT INTO `objects` (`objID`) VALUES (2);
INSERT INTO `objects` (`objID`) VALUES (3);
INSERT INTO `objects` (`objID`) VALUES (4);
INSERT INTO `objects` (`objID`) VALUES (5);
INSERT INTO `objects` (`objID`) VALUES (6);
INSERT INTO `objects` (`objID`) VALUES (7);
INSERT INTO `objects` (`objID`) VALUES (8);
INSERT INTO `objects` (`objID`) VALUES (9);
INSERT INTO `objects` (`objID`) VALUES (10);
INSERT INTO `objects` (`objID`) VALUES (11);
INSERT INTO `objects` (`objID`) VALUES (12);
INSERT INTO `objects` (`objID`) VALUES (13);
INSERT INTO `objects` (`objID`) VALUES (14);
INSERT INTO `objects` (`objID`) VALUES (16);
INSERT INTO `objects` (`objID`) VALUES (17);
INSERT INTO `objects` (`objID`) VALUES (18);
INSERT INTO `objects` (`objID`) VALUES (19);
INSERT INTO `objects` (`objID`) VALUES (20);
INSERT INTO `objects` (`objID`) VALUES (21);
INSERT INTO `objects` (`objID`) VALUES (22);
INSERT INTO `objects` (`objID`) VALUES (23);
INSERT INTO `objects` (`objID`) VALUES (24);
INSERT INTO `objects` (`objID`) VALUES (25);
INSERT INTO `objects` (`objID`) VALUES (26);
INSERT INTO `objects` (`objID`) VALUES (27);
INSERT INTO `objects` (`objID`) VALUES (28);
INSERT INTO `objects` (`objID`) VALUES (29);
INSERT INTO `objects` (`objID`) VALUES (30);
INSERT INTO `objects` (`objID`) VALUES (31);
INSERT INTO `objects` (`objID`) VALUES (32);
INSERT INTO `objects` (`objID`) VALUES (34);
INSERT INTO `objects` (`objID`) VALUES (36);
INSERT INTO `objects` (`objID`) VALUES (37);
INSERT INTO `objects` (`objID`) VALUES (38);
INSERT INTO `objects` (`objID`) VALUES (39);
INSERT INTO `objects` (`objID`) VALUES (40);
INSERT INTO `objects` (`objID`) VALUES (41);
-- Values for dates2objects table
INSERT INTO `date2objects` (`date`, `object`) VALUES (1, 2);
INSERT INTO `date2objects` (`date`, `object`) VALUES (2, 3);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 4);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 5);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 6);
INSERT INTO `date2objects` (`date`, `object`) VALUES (4, 7);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 8);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 9);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 10);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 11);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 12);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 13);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 14);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 15);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 16);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 17);
INSERT INTO `date2objects` (`date`, `object`) VALUES (7, 18);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 19);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 20);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 22);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 41);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 23);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 24);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 25);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 26);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 27);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 28);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 29);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 30);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 31);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 32);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 33);
INSERT INTO `date2objects` (`date`, `object`) VALUES (11, 34);
INSERT INTO `date2objects` (`date`, `object`) VALUES (12, 36);
INSERT INTO `date2objects` (`date`, `object`) VALUES (13, 37);
INSERT INTO `date2objects` (`date`, `object`) VALUES (14, 38);
INSERT INTO `date2objects` (`date`, `object`) VALUES (15, 39);
INSERT INTO `date2objects` (`date`, `object`) VALUES (16, 40);
-- Values for origin2objects table
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 3);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 16);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 34);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 40);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 19);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 29);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 30);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 36);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 2);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 4);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 14);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 20);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 6);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 7);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 8);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 11);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 12);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 13);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 15);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 18);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 22);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 24);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 26);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 31);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 38);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 41);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 5);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 9);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 10);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 23);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 25);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 27);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 28);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 32);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 39);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (7, 37);
-- Values for language2objects table
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 10);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 16);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 19);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 23);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 25);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 27);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 28);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 6);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 11);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 12);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 13);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 14);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 15);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 18);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 20);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 21);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 26);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 31);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 41);
INSERT INTO `language2objects` (`language`, `object`) VALUES (3, 30);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 24);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 2);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 8);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 9);
-- Values for creator2objects table
INSERT INTO `creator2objects` (`name`, `object`) VALUES (1, 12);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (2, 19);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (3, 2);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (3, 4);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (4, 7);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 5);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 9);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 10);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (6, 39);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (7, 8);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (7, 24);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (8, 18);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (9, 34);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (10, 37);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (11, 25);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (12, 22);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (13, 31);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (14, 26);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 23);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 27);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 28);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 32);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (16, NULL);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (17, 14);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (17, 20);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (18, 33);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (19, 29);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (20, 3);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (21, 30);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (22, 15);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (23, 6);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (24, 4);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (25, 38);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (26, 36);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (27, 11);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 13);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 17);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 22);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 41);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (29, 16);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (29, 40);
-- Values for creator2objects table
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 16);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 29);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 33);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 38);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 2);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 8);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 15);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 18);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 23);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 24);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 27);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 28);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 30);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 31);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 36);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 7);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 41);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 11);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 32);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 12);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 19);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 22);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 39);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 12);
-- Handles dates
-- |_ id referenced by dates2objects as foreign key
DROP TABLE IF EXISTS `dates`;
CREATE TABLE `dates` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`date` INT(4) UNIQUE DEFAULT NULL
);
-- Handles origin
-- |_ id referenced by origin2objects as foreign key
DROP TABLE IF EXISTS `origin`;
CREATE TABLE `origin` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`location` TEXT UNIQUE DEFAULT NULL
);
-- Handles languages
-- |_ id referenced by language2objects as foreign key
DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languages` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`language` TEXT UNIQUE DEFAULT NULL
);
-- Handles creator
-- |_ id referenced by creator2objects as foreign key
DROP TABLE IF EXISTS `creator`;
CREATE TABLE `creator` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` TEXT UNIQUE DEFAULT NULL
);
-- Handles genre
-- |_ id referenced by genrea2objects as foreign key
DROP TABLE IF EXISTS `genre`;
CREATE TABLE `genre` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` TEXT UNIQUE DEFAULT NULL
);
-- Handles images
-- |_ id referenced by images2objects as foreign key
DROP TABLE IF EXISTS `images`;
CREATE TABLE `images` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`path` TEXT DEFAULT NULL,
`description` TEXT DEFAULT NULL
);
-- Handles objects
DROP TABLE IF EXISTS `objects`;
CREATE TABLE `objects` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`callID` TEXT DEFAULT NULL
);
-- Handles many to many relations for dates to objects
DROP TABLE IF EXISTS `date2objects`;
CREATE TABLE `date2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`date` INTEGER,
`object` INTEGER,
FOREIGN KEY (`date`) REFERENCES `dates`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for origin to objects
DROP TABLE IF EXISTS `origin2objects`;
CREATE TABLE `origin2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`location` INTEGER,
`object` INTEGER,
FOREIGN KEY (`location`) REFERENCES `origin`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for language to objects
DROP TABLE IF EXISTS `language2objects`;
CREATE TABLE `language2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`language` INTEGER,
`object` INTEGER,
FOREIGN KEY (`language`) REFERENCES `languages`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for creator to objects
DROP TABLE IF EXISTS `creator2objects`;
CREATE TABLE `creator2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`name` INTEGER,
`object` INTEGER,
FOREIGN KEY (`name`) REFERENCES `creator`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for genre to objects
DROP TABLE IF EXISTS `genre2objects`;
CREATE TABLE `genre2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`genre` INTEGER,
`object` INTEGER,
FOREIGN KEY (`genre`) REFERENCES `genre`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for images to objects
DROP TABLE IF EXISTS `images2objects`;
CREATE TABLE `images2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`image` INTEGER,
`object` INTEGER,
FOREIGN KEY (`image`) REFERENCES `images`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
DROP VIEW IF EXISTS `laag`;
CREATE VIEW `laag` AS
SELECT
obj.id AS Id,
obj.callID AS CallID,
d.date AS Date,
o.location AS Location,
l.language AS Language,
c.name AS Name,
g.subject AS Genre
FROM
objects obj,
dates d,
origin o,
languages l,
creator c,
genre g,
date2objects d2o,
origin2objects o2o,
language2objects l2o,
creator2objects c2o,
genre2objects g2o
WHERE
obj.id = d2o.object AND d.id = d2o.date
AND
obj.id = o2o.object AND o.id = o2o.location
AND
obj.id = l2o.object AND l.id = l2o.language
AND
obj.id = c2o.object AND c.id = c2o.name
AND
obj.id = g2o.object AND g.id = g2o.genre
ORDER BY Id ASC;
-- Values for dates table
INSERT INTO `dates` (`id`, `date`) VALUES (1, 1966);
INSERT INTO `dates` (`id`, `date`) VALUES (2, 1971);
INSERT INTO `dates` (`id`, `date`) VALUES (3, 1974);
INSERT INTO `dates` (`id`, `date`) VALUES (4, 1975);
INSERT INTO `dates` (`id`, `date`) VALUES (5, 1976);
INSERT INTO `dates` (`id`, `date`) VALUES (6, 1977);
INSERT INTO `dates` (`id`, `date`) VALUES (7, 1978);
INSERT INTO `dates` (`id`, `date`) VALUES (8, 1979);
INSERT INTO `dates` (`id`, `date`) VALUES (9, 1980);
INSERT INTO `dates` (`id`, `date`) VALUES (10, 1981);
INSERT INTO `dates` (`id`, `date`) VALUES (11, 1982);
INSERT INTO `dates` (`id`, `date`) VALUES (12, 1984);
INSERT INTO `dates` (`id`, `date`) VALUES (13, 1987);
INSERT INTO `dates` (`id`, `date`) VALUES (14, 1988);
INSERT INTO `dates` (`id`, `date`) VALUES (15, 2004);
INSERT INTO `dates` (`id`, `date`) VALUES (16, 2007);
INSERT INTO `dates` (`id`, `date`) VALUES (17, 1995);
INSERT INTO `dates` (`id`, `date`) VALUES (18, 2000);
INSERT INTO `dates` (`id`, `date`) VALUES (19, 2001);
-- Values for origin table
INSERT INTO `origin` (`id`, `location`) VALUES (1, 'Argentina');
INSERT INTO `origin` (`id`, `location`) VALUES (2, 'Spain');
INSERT INTO `origin` (`id`, `location`) VALUES (3, 'Portugal');
INSERT INTO `origin` (`id`, `location`) VALUES (4, 'Brazil');
INSERT INTO `origin` (`id`, `location`) VALUES (5, 'Uruguay');
INSERT INTO `origin` (`id`, `location`) VALUES (6, 'Mexico');
INSERT INTO `origin` (`id`, `location`) VALUES (7, 'Cuba');
INSERT INTO `origin` (`id`, `location`) VALUES (8, 'United States');
INSERT INTO `origin` (`id`, `location`) VALUES (9, 'Netherlands');
-- Values for languages table
INSERT INTO `languages` (`id`, `language`) VALUES (1, 'Spanish');
INSERT INTO `languages` (`id`, `language`) VALUES (2, 'Portugese');
INSERT INTO `languages` (`id`, `language`) VALUES (3, 'Catalan');
INSERT INTO `languages` (`id`, `language`) VALUES (4, 'English');
INSERT INTO `languages` (`id`, `language`) VALUES (5, 'French');
INSERT INTO `languages` (`id`, `language`) VALUES (6, 'Italian');
-- Values for creator table
INSERT INTO `creator` (`id`, `name`) VALUES (1, 'Barreto, Eduardo');
INSERT INTO `creator` (`id`, `name`) VALUES (2, 'Bofarul');
INSERT INTO `creator` (`id`, `name`) VALUES (3, 'Castro, Lourdes');
INSERT INTO `creator` (`id`, `name`) VALUES (4, 'Carlos, Joao');
INSERT INTO `creator` (`id`, `name`) VALUES (5, 'Clemente, Padin');
INSERT INTO `creator` (`id`, `name`) VALUES (6, 'Deniz, Gerardo');
INSERT INTO `creator` (`id`, `name`) VALUES (7, 'Goulart, Claudio');
INSERT INTO `creator` (`id`, `name`) VALUES (8, 'Gross, Camela');
INSERT INTO `creator` (`id`, `name`) VALUES (9, 'Gutierrez Marx, Graciela');
INSERT INTO `creator` (`id`, `name`) VALUES (10, 'Gutierrez, Juan Pedro');
INSERT INTO `creator` (`id`, `name`) VALUES (11, 'Hendrix, Jan');
INSERT INTO `creator` (`id`, `name`) VALUES (12, 'Hermann, Villari');
INSERT INTO `creator` (`id`, `name`) VALUES (13, 'Jungle, Ted');
INSERT INTO `creator` (`id`, `name`) VALUES (14, 'Lambrecht, Karin');
INSERT INTO `creator` (`id`, `name`) VALUES (15, 'Lara, Magali');
INSERT INTO `creator` (`id`, `name`) VALUES (16, 'Lara, Mario');
INSERT INTO `creator` (`id`, `name`) VALUES (17, 'Lisboa, Unhandeijara');
INSERT INTO `creator` (`id`, `name`) VALUES (18, 'Michael, Scott');
INSERT INTO `creator` (`id`, `name`) VALUES (19, 'Palou, Joan');
INSERT INTO `creator` (`id`, `name`) VALUES (20, 'Pazos, Luis');
INSERT INTO `creator` (`id`, `name`) VALUES (21, 'Piyama, Ana');
INSERT INTO `creator` (`id`, `name`) VALUES (22, 'Plaza, Julio');
INSERT INTO `creator` (`id`, `name`) VALUES (23, 'Sampaio, Carlos');
INSERT INTO `creator` (`id`, `name`) VALUES (24, 'Schraenen, Guy');
INSERT INTO `creator` (`id`, `name`) VALUES (25, 'Silveira, Regina');
INSERT INTO `creator` (`id`, `name`) VALUES (26, 'Ugalde, Juan');
INSERT INTO `creator` (`id`, `name`) VALUES (27, 'Varela, Dailor');
INSERT INTO `creator` (`id`, `name`) VALUES (28, 'Various');
INSERT INTO `creator` (`id`, `name`) VALUES (29, 'Zabala, Horacio');
INSERT INTO `creator` (`id`, `name`) VALUES (30, 'Ediciones Vigía');
INSERT INTO `creator` (`id`, `name`) VALUES (31, 'Blanco, Reynaldo García');
INSERT INTO `creator` (`id`, `name`) VALUES (32, 'Febles, Rodríguez');
INSERT INTO `creator` (`id`, `name`) VALUES (33, 'Gómez, Yamil Díaz ');
INSERT INTO `creator` (`id`, `name`) VALUES (34, 'Jordán, Rolando Estévez');
INSERT INTO `creator` (`id`, `name`) VALUES (35, 'León, Gerardo Fulleda');
-- Values for genre table
INSERT INTO `genre` (`id`, `subject`) VALUES (1, 'conceptual');
INSERT INTO `genre` (`id`, `subject`) VALUES (2, 'event documentation');
INSERT INTO `genre` (`id`, `subject`) VALUES (3, 'graphics');
INSERT INTO `genre` (`id`, `subject`) VALUES (4, 'mail art');
INSERT INTO `genre` (`id`, `subject`) VALUES (5, 'multiple works');
INSERT INTO `genre` (`id`, `subject`) VALUES (6, 'performance');
INSERT INTO `genre` (`id`, `subject`) VALUES (7, 'photography');
INSERT INTO `genre` (`id`, `subject`) VALUES (8, 'poetics');
INSERT INTO `genre` (`id`, `subject`) VALUES (9, 'politics');
INSERT INTO `genre` (`id`, `subject`) VALUES (10, 'mixed media');
INSERT INTO `genre` (`id`, `subject`) VALUES (11, 'artist book');
INSERT INTO `genre` (`id`, `subject`) VALUES (12, 'drawings');
-- Values for objects table
INSERT INTO `objects` (`id`, `callID`) VALUES (2, 'N7433.4 .C386');
INSERT INTO `objects` (`id`, `callID`) VALUES (3, 'N7433.4 .P394');
INSERT INTO `objects` (`id`, `callID`) VALUES (4, 'N7433.4 .C386');
INSERT INTO `objects` (`id`, `callID`) VALUES (5, 'N7433.4 .P22');
INSERT INTO `objects` (`id`, `callID`) VALUES (6, 'N7433.3');
INSERT INTO `objects` (`id`, `callID`) VALUES (7, 'NE3001 .L37');
INSERT INTO `objects` (`id`, `callID`) VALUES (8, 'N7433.4 .G666');
INSERT INTO `objects` (`id`, `callID`) VALUES (9, 'N7433.4 .P22');
INSERT INTO `objects` (`id`, `callID`) VALUES (10, 'N7433.4 .P22');
INSERT INTO `objects` (`id`, `callID`) VALUES (11, 'N7433.4 .V374');
INSERT INTO `objects` (`id`, `callID`) VALUES (12, 'N7433.4 .B3676');
INSERT INTO `objects` (`id`, `callID`) VALUES (13, 'PQ9003');
INSERT INTO `objects` (`id`, `callID`) VALUES (14, 'N6494 .M35');
INSERT INTO `objects` (`id`, `callID`) VALUES (15, 'N7433.4 .P62');
INSERT INTO `objects` (`id`, `callID`) VALUES (16, 'N6639 .Z83');
INSERT INTO `objects` (`id`, `callID`) VALUES (17, 'NX456.5 .A8');
INSERT INTO `objects` (`id`, `callID`) VALUES (18, 'N7433.4 .G815');
INSERT INTO `objects` (`id`, `callID`) VALUES (19, 'N7108');
INSERT INTO `objects` (`id`, `callID`) VALUES (20, 'N6494 .M35');
INSERT INTO `objects` (`id`, `callID`) VALUES (21, '');
INSERT INTO `objects` (`id`, `callID`) VALUES (22, 'NX533 .S26');
INSERT INTO `objects` (`id`, `callID`) VALUES (23, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (24, 'N7433.4 .G666');
INSERT INTO `objects` (`id`, `callID`) VALUES (25, 'N6549 .H46');
INSERT INTO `objects` (`id`, `callID`) VALUES (26, 'N7433.4 .L353');
INSERT INTO `objects` (`id`, `callID`) VALUES (27, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (28, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (29, 'N7433.4 .P25');
INSERT INTO `objects` (`id`, `callID`) VALUES (30, 'N7433.4 .P59');
INSERT INTO `objects` (`id`, `callID`) VALUES (31, 'N7433.4 .J86');
INSERT INTO `objects` (`id`, `callID`) VALUES (32, 'N7433.4 .L363');
INSERT INTO `objects` (`id`, `callID`) VALUES (33, 'N6494 .M35');
INSERT INTO `objects` (`id`, `callID`) VALUES (34, 'N7433.4 .G87');
INSERT INTO `objects` (`id`, `callID`) VALUES (35, 'N7433.4 .L364');
INSERT INTO `objects` (`id`, `callID`) VALUES (36, 'N7433.4 .U47');
INSERT INTO `objects` (`id`, `callID`) VALUES (37, 'PQ7390 .G83');
INSERT INTO `objects` (`id`, `callID`) VALUES (38, 'N6659 .S49');
INSERT INTO `objects` (`id`, `callID`) VALUES (39, 'PQ7298.14 .E48');
INSERT INTO `objects` (`id`, `callID`) VALUES (40, 'N6639 .Z33');
INSERT INTO `objects` (`id`, `callID`) VALUES (41, 'N6658 .E63 1979');
INSERT INTO `objects` (`id`, `callID`) VALUES (42, 'N7433.35 .C83 R48 2000');
INSERT INTO `objects` (`id`, `callID`) VALUES (43, 'N7433.45 .C83 G37 1995');
INSERT INTO `objects` (`id`, `callID`) VALUES (44, 'N7433.35 .C83 R63 2001');
INSERT INTO `objects` (`id`, `callID`) VALUES (45, 'N7433.35 .C83 D52 2007');
INSERT INTO `objects` (`id`, `callID`) VALUES (46, 'N7433.35 .C83 E77');
INSERT INTO `objects` (`id`, `callID`) VALUES (47, 'N7433.35 .C83 F85 2007');
-- Values for dates2objects table
INSERT INTO `date2objects` (`date`, `object`) VALUES (1, 2);
INSERT INTO `date2objects` (`date`, `object`) VALUES (2, 3);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 4);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 5);
INSERT INTO `date2objects` (`date`, `object`) VALUES (3, 6);
INSERT INTO `date2objects` (`date`, `object`) VALUES (4, 7);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 8);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 9);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 10);
INSERT INTO `date2objects` (`date`, `object`) VALUES (5, 11);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 12);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 13);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 14);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 15);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 16);
INSERT INTO `date2objects` (`date`, `object`) VALUES (6, 17);
INSERT INTO `date2objects` (`date`, `object`) VALUES (7, 18);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 19);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 20);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 22);
INSERT INTO `date2objects` (`date`, `object`) VALUES (8, 41);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 23);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 24);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 25);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 26);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 27);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 28);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 29);
INSERT INTO `date2objects` (`date`, `object`) VALUES (9, 30);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 31);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 32);
INSERT INTO `date2objects` (`date`, `object`) VALUES (10, 33);
INSERT INTO `date2objects` (`date`, `object`) VALUES (11, 34);
INSERT INTO `date2objects` (`date`, `object`) VALUES (12, 36);
INSERT INTO `date2objects` (`date`, `object`) VALUES (13, 37);
INSERT INTO `date2objects` (`date`, `object`) VALUES (14, 38);
INSERT INTO `date2objects` (`date`, `object`) VALUES (15, 39);
INSERT INTO `date2objects` (`date`, `object`) VALUES (16, 40);
-- Values for origin2objects table
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 3);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 16);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 34);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 40);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 19);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 29);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 30);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 36);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 2);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 4);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 14);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 20);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 6);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 7);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 8);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 11);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 12);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 13);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 15);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 18);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 22);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 24);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 26);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 31);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 38);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 41);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 5);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 9);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 10);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 23);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 25);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 27);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 28);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 32);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 39);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (7, 37);
-- Values for language2objects table
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 10);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 16);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 19);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 23);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 25);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 27);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 28);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 6);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 11);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 12);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 13);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 14);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 15);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 18);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 20);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 21);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 26);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 31);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 41);
INSERT INTO `language2objects` (`language`, `object`) VALUES (3, 30);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 24);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 2);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 8);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 9);
-- Values for creator2objects table
INSERT INTO `creator2objects` (`name`, `object`) VALUES (1, 12);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (2, 19);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (3, 2);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (3, 4);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (4, 7);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 5);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 9);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (5, 10);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (6, 39);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (7, 8);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (7, 24);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (8, 18);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (9, 34);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (10, 37);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (11, 25);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (12, 22);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (13, 31);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (14, 26);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 23);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 27);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 28);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (15, 32);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (16, NULL);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (17, 14);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (17, 20);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (18, 33);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (19, 29);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (20, 3);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (21, 30);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (22, 15);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (23, 6);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (24, 4);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (25, 38);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (26, 36);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (27, 11);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 13);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 17);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 22);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (28, 41);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (29, 16);
INSERT INTO `creator2objects` (`name`, `object`) VALUES (29, 40);
-- Values for creator2objects table
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 16);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 29);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 33);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 38);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 2);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 8);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 15);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 18);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 23);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 24);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 27);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 28);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 30);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 31);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 36);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 7);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 41);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 11);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 32);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 12);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 19);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 22);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 39);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 12);
-- Handles origin
-- |_ id referenced by origin2objects as foreign key
DROP TABLE IF EXISTS `origin`;
CREATE TABLE `origin` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`location` TEXT UNIQUE DEFAULT NULL
);
-- Handles languages
-- |_ id referenced by language2objects as foreign key
DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languages` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`language` TEXT UNIQUE DEFAULT NULL
);
-- Handles genre
-- |_ id referenced by genrea2objects as foreign key
DROP TABLE IF EXISTS `genre`;
CREATE TABLE `genre` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` TEXT UNIQUE DEFAULT NULL
);
-- Handles images
-- |_ id referenced by images2objects as foreign key
DROP TABLE IF EXISTS `images`;
CREATE TABLE `images` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`path` TEXT DEFAULT NULL,
`description` TEXT DEFAULT NULL
);
-- Handles objects
DROP TABLE IF EXISTS `objects`;
CREATE TABLE `objects` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`callID` TEXT DEFAULT NULL,
`date` INT(4) DEFAULT NULL,
`author` TEXT DEFAULT NULL
);
-- Handles many to many relations for origin to objects
DROP TABLE IF EXISTS `origin2objects`;
CREATE TABLE `origin2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`location` INTEGER,
`object` INTEGER,
FOREIGN KEY (`location`) REFERENCES `origin`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for language to objects
DROP TABLE IF EXISTS `language2objects`;
CREATE TABLE `language2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`language` INTEGER,
`object` INTEGER,
FOREIGN KEY (`language`) REFERENCES `languages`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for genre to objects
DROP TABLE IF EXISTS `genre2objects`;
CREATE TABLE `genre2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`genre` INTEGER,
`object` INTEGER,
FOREIGN KEY (`genre`) REFERENCES `genre`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
-- Handles many to many relations for images to objects
DROP TABLE IF EXISTS `images2objects`;
CREATE TABLE `images2objects` (
`id` INTEGER PRIMARY KEY DEFAULT NULL,
`image` INTEGER,
`object` INTEGER,
FOREIGN KEY (`image`) REFERENCES `images`(`id`),
FOREIGN KEY (`object`) REFERENCES `objects`(`id`)
);
DROP VIEW IF EXISTS `laag`;
CREATE VIEW `laag` AS
SELECT
obj.id AS Id,
obj.callID AS CallID,
obj.date AS Date,
o.location AS Location,
l.language AS Language,
obj.author AS Name,
g.subject AS Genre
FROM
objects obj,
origin o,
languages l,
genre g,
origin2objects o2o,
language2objects l2o,
genre2objects g2o
WHERE
obj.id = o2o.object OR o.id = o2o.location
OR
obj.id = l2o.object OR l.id = l2o.language
OR
obj.id = g2o.object OR g.id = g2o.genre
ORDER BY Id ASC;
DROP VIEW IF EXISTS `laag2`;
CREATE VIEW `laag2` AS
SELECT
obj.id AS ID,
obj.callID AS CallID,
obj.date AS Date,
obj.author AS Author,
l.language AS Language,
o.location AS Origin,
g.subject AS Genre
FROM
objects obj,
language2objects l2o,
origin2objects o2o,
genre2objects g2o
JOIN languages l ON
l2o.language = l.id OR l2o.object = obj.id
JOIN origin o ON
o2o.location = o.id OR o2o.object = obj.id
JOIN genre g ON
g2o.genre = g.id OR g2o.object = obj.id
ORDER BY Id ASC;
DROP VIEW IF EXISTS `laag3`;
CREATE VIEW `laag3` AS
SELECT
obj.id AS ID,
obj.callID AS CallID,
obj.date AS Date,
obj.author AS Author,
l.language AS Language,
o.location AS Origin,
g.subject AS Genre
FROM
objects obj,
language2objects l2o,
origin2objects o2o,
genre2objects g2o
INNER JOIN languages l ON
l2o.language = l.id AND l2o.object = obj.id
INNER JOIN origin o ON
o2o.location = o.id AND o2o.object = obj.id
INNER JOIN genre g ON
g2o.genre = g.id AND g2o.object = obj.id;
DROP VIEW IF EXISTS `laag4`;
CREATE VIEW `laag4` AS
SELECT
obj.id AS ID,
obj.callID AS CallID,
obj.date AS Date,
obj.author AS Author,
l.language AS Language,
o.location AS Origin,
g.subject AS Genre
FROM
objects obj,
language2objects l2o,
origin2objects o2o,
genre2objects g2o
LEFT JOIN languages l ON
l2o.language = l.id AND l2o.object = obj.id
LEFT JOIN origin o ON
o2o.location = o.id AND o2o.object = obj.id
LEFT JOIN genre g ON
g2o.genre = g.id AND g2o.object = obj.id
WHERE
obj.id = o2o.object AND o.id = o2o.location
AND
obj.id = l2o.object AND l.id = l2o.language
AND
obj.id = g2o.object AND g.id = g2o.genre
ORDER BY Id ASC;
DROP VIEW IF EXISTS `laag5`;
CREATE VIEW `laag5` AS
SELECT
obj.id AS ID,
obj.callID AS CallID,
obj.date AS Date,
obj.author AS Author,
l.language AS Language,
o.location AS Origin,
g.subject AS Genre
FROM
objects obj,
language2objects l2o,
origin2objects o2o,
genre2objects g2o
JOIN languages l ON
l2o.language = l.id OR l2o.object = obj.id
JOIN origin o ON
o2o.location = o.id OR o2o.object = obj.id
JOIN genre g ON
g2o.genre = g.id OR g2o.object = obj.id
GROUP BY Id;
DROP VIEW IF EXISTS `laag6`;
CREATE VIEW `laag6` AS
SELECT
obj.id AS ID,
obj.callID AS CallID,
obj.Date AS Date,
obj.Author AS Author,
o.location AS Location,
l.language AS Language,
g.subject AS Genre
FROM
objects obj,
origin o,
languages l,
genre g,
origin2objects o2o,
language2objects l2o,
genre2objects g2o
WHERE
obj.id = o2o.object AND o.id = o2o.location
AND
obj.id = l2o.object AND l.id = l2o.language
AND
obj.id = g2o.object AND g.id = g2o.genre;
DROP VIEW IF EXISTS `laag7`;
CREATE VIEW `laag7` AS
SELECT
obj.id AS ID,
obj.callID AS CallID,
obj.date AS Date,
obj.author AS Author,
(SELECT GROUP_CONCAT(DISTINCT language) FROM languages WHERE l2o.language = languages.id) AS Language,
(SELECT GROUP_CONCAT(DISTINCT location) FROM origin WHERE o2o.location = origin.id) AS Origin,
(SELECT GROUP_CONCAT(DISTINCT subject) FROM genre WHERE g2o.genre = genre.id) AS Genre
FROM
objects obj,
origin o,
languages l,
genre g,
language2objects l2o,
origin2objects o2o,
genre2objects g2o
GROUP BY ID;
-- Values for origin table
INSERT INTO `origin` (`id`, `location`) VALUES (1, 'Argentina');
INSERT INTO `origin` (`id`, `location`) VALUES (2, 'Spain');
INSERT INTO `origin` (`id`, `location`) VALUES (3, 'Portugal');
INSERT INTO `origin` (`id`, `location`) VALUES (4, 'Brazil');
INSERT INTO `origin` (`id`, `location`) VALUES (5, 'Uruguay');
INSERT INTO `origin` (`id`, `location`) VALUES (6, 'Mexico');
INSERT INTO `origin` (`id`, `location`) VALUES (7, 'Cuba');
INSERT INTO `origin` (`id`, `location`) VALUES (8, 'United States');
INSERT INTO `origin` (`id`, `location`) VALUES (9, 'Netherlands');
INSERT INTO `origin` (`id`, `location`) VALUES (10, 'Belgium');
-- Values for languages table
INSERT INTO `languages` (`id`, `language`) VALUES (1, 'Spanish');
INSERT INTO `languages` (`id`, `language`) VALUES (2, 'Portugese');
INSERT INTO `languages` (`id`, `language`) VALUES (3, 'Catalan');
INSERT INTO `languages` (`id`, `language`) VALUES (4, 'English');
INSERT INTO `languages` (`id`, `language`) VALUES (5, 'French');
INSERT INTO `languages` (`id`, `language`) VALUES (6, 'Italian');
-- Values for genre table
INSERT INTO `genre` (`id`, `subject`) VALUES (1, 'conceptual');
INSERT INTO `genre` (`id`, `subject`) VALUES (2, 'event documentation');
INSERT INTO `genre` (`id`, `subject`) VALUES (3, 'graphics');
INSERT INTO `genre` (`id`, `subject`) VALUES (4, 'mail art');
INSERT INTO `genre` (`id`, `subject`) VALUES (5, 'multiple works');
INSERT INTO `genre` (`id`, `subject`) VALUES (6, 'performance');
INSERT INTO `genre` (`id`, `subject`) VALUES (7, 'photography');
INSERT INTO `genre` (`id`, `subject`) VALUES (8, 'poetics');
INSERT INTO `genre` (`id`, `subject`) VALUES (9, 'politics');
INSERT INTO `genre` (`id`, `subject`) VALUES (10, 'mixed media');
INSERT INTO `genre` (`id`, `subject`) VALUES (11, 'artist book');
INSERT INTO `genre` (`id`, `subject`) VALUES (12, 'drawings');
-- Values for objects table
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (2, 'N7433.4 .C386', 1966, 'Castro, Lourdes');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (3, 'N7433.4 .P394', 1971, 'Pazos, Luis');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (4, 'N7433.4 .C386', 1974, 'Castro, Lourdes');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (5, 'N7433.4 .P22', 1974, 'Padin, Clemente');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (6, 'N7433.3', 1974, 'Sampaio, Carlos');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (7, 'NE3001 .L37', 1978, 'Carlos, Joao.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (8, 'N7433.4 .G666', 1979, 'Goulart, Claudio,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (9, 'N7433.4 .P22', 1976, 'Padín, Clemente.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (10, 'N7433.4 .P22', 1976, 'Padin, Clemente.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (11, 'N7433.4 .V374', 1976, 'Varela, Dailor.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (12, 'N7433.4 .B3676', 1977, 'Barreto, Eduardo.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (13, 'PQ9003', 1977, 'Various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (14, 'N6494 .M35', 1977, 'Lisboa, Unhandeijara.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (15, 'N7433.4 .P62', 1977, 'Plaza, Julio.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (16, 'N6639 .Z83', 1977, 'Zabala, Horacio,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (17, 'NX456.5 .A8', 1977, 'Various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (18, 'N7433.4 .G815', 1978, 'Gross, Carmela.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (19, 'N7108', 1979, 'Bofarul.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (20, 'N6494 .M35', 1979, 'Lisboa, Unhandeijara.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (22, 'NX533 .S26', 1979, 'Various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (23, 'N7433.4 .L363', 1980, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (24, 'N7433.4 .G666', 1980, 'Goulart, Claudio,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (25, 'N6549 .H46', 1980, 'Hendrix, Jan,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (26, 'N7433.4 .L353', 1980, 'Lambrecht, Karin,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (27, 'N7433.4 .L363', 1980, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (28, 'N7433.4 .L363', 1980, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (29, 'N7433.4 .P25', 1980, 'Palou, Joan.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (30, 'N7433.4 .P59', 1980, 'Piyama, Ana.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (31, 'N7433.4 .J86', 1981, 'Jungle, Ted,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (32, 'N7433.4 .L363', 1981, 'Lara, Magali,');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (33, 'N6494 .M35', 1981, 'Scott, Michael.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (34, 'N7433.4 .G87', 1982, 'Gutiérrez Marx, Graciela.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (35, 'N7433.4 .L364', 1983, 'Lara, Mario.');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (36, 'N7433.4 .U47', 1984, 'Ugalde, Juan');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (37, 'PQ7390 .G83', 1987, 'Gutiérrez, Pedro Juan');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (38, 'N6659 .S49', 1988, 'Silveira, Regina');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (39, 'PQ7298.14 .E48', 2004, 'Deniz, Gerardo');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (40, 'N6639 .Z33', 2007, 'Zabala, Horacio');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (41, 'N6658 .E63 1979', 1979, 'various');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (42, 'N7433.35 .C83 R48 2000', 2000, 'Ediciones Vigía');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (43, 'N7433.45 .C83 G37 1995', 1995, 'Blanco, Reynaldo García');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (44, 'N7433.35 .C83 R63 2001', 2001, 'Febles, Rodríguez');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (45, 'N7433.35 .C83 D52 2007', 2007, 'Gómez, Yamil Díaz');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (46, 'N7433.35 .C83 E77', 2007, 'Jordán, Rolando Estévez');
INSERT INTO `objects` (`id`, `callID`, `date`, `author`) VALUES (47, 'N7433.35 .C83 F85 2007', 2007, 'León, Gerardo Fulleda');
-- Values for origin2objects table
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 3);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 3);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 16);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 34);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (1, 40);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 19);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 29);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 30);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (2, 36);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 10);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 4);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 14);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (3, 20);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 6);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 7);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 8);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 11);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 12);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 13);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 15);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 18);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 22);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 24);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 26);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 31);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 38);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (4, 41);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 5);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 9);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (5, 10);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 23);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 25);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 27);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 28);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 32);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (6, 39);
INSERT INTO `origin2objects` (`location`, `object`) VALUES (7, 37);
-- Values for language2objects table
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 10);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 16);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 19);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 23);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 25);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 27);
INSERT INTO `language2objects` (`language`, `object`) VALUES (1, 28);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 6);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 11);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 12);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 13);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 14);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 15);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 18);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 20);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 21);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 26);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 31);
INSERT INTO `language2objects` (`language`, `object`) VALUES (2, 41);
INSERT INTO `language2objects` (`language`, `object`) VALUES (3, 30);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 3);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (4, 24);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 2);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 8);
INSERT INTO `language2objects` (`language`, `object`) VALUES (5, 17);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 5);
INSERT INTO `language2objects` (`language`, `object`) VALUES (6, 9);
-- Values for creator2objects table
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 16);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 29);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (1, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 33);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 38);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (2, 40);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 2);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 8);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 15);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 18);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 23);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 24);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 27);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 28);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 30);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 31);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 36);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (3, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 14);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 20);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (4, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 7);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (5, 41);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 3);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 4);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (6, 34);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 11);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 25);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (7, 32);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 12);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 13);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 17);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 19);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 22);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 26);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 37);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (8, 39);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 5);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 6);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 9);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 10);
INSERT INTO `genre2objects` (`genre`, `object`) VALUES (9, 12);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment