-- Insert MovieURI into Movies ; MovieID is auto incremental
INSERT INTO  Movies (MovieURI) VALUES (?);

-- Get MovieID where MovieURI equal given value
SELECT MovieID FROM Movies WHERE MovieURI = ?;

-- SetPageId
INSERT INTO  WikiPageIDs (MovieID, PageID) VALUES (?,?);

-- Get MovieId by PageID ... ( to create WikipediaAbstract)
SELECT MovieID FROM WikiPageIDs WHERE PageID = ?;

-- SetAbstract ...

INSERT INTO  WikipediaAbstracts (MovieID, Abstract) VALUES (?,?);


-- SetOrigin
---
INSERT INTO  Origins (OriginName) VALUES ("dataset.csv"),("reverse.csv");

-- GetOrigin
SELECT OriginID FROM Origins WHERE OriginName = ?;

-- Subject, Relationship, Object, RDF
INSERT INTO  Subjects (SubjectURI, OriginID) VALUES (?,?);
INSERT INTO  Relationships (RelationshipURI) VALUES (?);
INSERT INTO  Objects (ObjectURI, OriginID) VALUES (?,?);

SELECT SubjectID FROM Subjects WHERE SubjectURI = ?;
SELECT RelationshipID FROM Relationships WHERE RelationshipURI = ?;
SELECT ObjectID FROM Objects WHERE ObjectURI = ?;


INSERT INTO  RDFs (MovieID, SubjectID, RelationshipID, ObjectID) VALUES (?,?,?,?);
