Reading references from database