Indexer first Iteration (write only). Refactoring:common datatypes are moved to Database.