Designed sampling from large databases for controlled trials