database er diagram desgin user credit equal 0 after expiry date
Posted on 2012-12-24
i have a table user contain member details and each member have a credit
this credit has a expiration date can anyone help me or give me an idea how i can implement the ER diagram
the credit maybe will be for two or three month and some user don't have expiration date for him credits
if any exerts can help me on desgin or ..
create table usres
field : userid p.k , username , password
create table usercredits
field creditid , userid , fromdate , todate , creditnumber,status
where todate is expirydate..
fromdate todate maybe it will be for one month or ...
i can run a trigger on the table usercredit to check if getdate > todate status is expired
than he can user the available credits.
hope anyone can help me in implementation :)