DP Updated

Limiting on db query added
getting records from db is based on attributes (hard coding removed)