Add more publish
Add DB logic
Added more DB code