there is not a tutorial for database driven coupons. there is an old tutorial for static coupons here:
it was written for eCart 4, but the concept is the same. I have forwarded this to the documentation team to have them convert it to eCart 6.
there is a forum post here:
that has details on converting the coupon codes to be database driven.