Adding database integration