Save to database.