How can add custom field save into database?

You should add the custom field from Studio, not from code, and it will take care of everything for you.