In business applications it is generally a bad idea to delete records of purchases, sales, etc.
At the same time you want indexes to include records of active things, such as active customers. A simple way to manage this requirement is to use an is_active boolean field. Then in your index function your query includes is_active==True. Additionally you would have a function called "trash" where is_active==False. My problem is I want to use smartgrid and smartgrid doesn't accept queries. One solution is to have, for example, a "customers" table and an "inactive_customers" table and move record from table to table. Surely someone can suggest a better way. Any and all suggestions gratefully accepted. Thanks, Cliff Kachinske