Added Document, Alias and RelationOccurrence tables

And also some basic tests.