After you delete an item or document from a list or library, and then the recycle bin and secondary recycle bin, does the data remain in the database for a certain amount of time? .. or forever unless you do something else to delete it?
The recycle bin automatic deletion is set for 30 days from the date of deletion.
If an item is deleted from the site recycle bin it go s to the site collection recycle bin.
If you remove a file from site recycle bin say after 15 days it will only be available in the site collection recycle bin for a further 15 days.
You can configure the number of days settings via central administration.