Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear all,

i'm designing one databse but i'm confused in one thing that how can i manage balance of perticular person.

which way is best for manage balance in database or in code and how can i do this?
Posted
Updated 26-Mar-14 22:50pm
v2
Comments
syed shanu 27-Mar-14 5:02am    
What is meaning of balance .improve your question and provide more details as what you need .If somthing balance means you want to store some user information as balance amount or etc you can create one details table for client where you can have client id and maintain balance for all clients
Ankur Ramanuj 27-Mar-14 5:11am    
actually i'm working on one sms solution and balance means the quata of sms.
as per your answer i'm finding best way to store it or manage it because i think store in database is dangerous for security reasons.

1 solution

The value of balance is usually derivable from such items like credit and debit. It should then be obtained through calculation using code dynamically. You only need to maintain credit and debit, not balance. In other words, do not store balance in the database.
 
Share this answer
 
v3
Comments
Ankur Ramanuj 27-Mar-14 5:00am    
after few months database having 2-3 lacs entry of one user so how can i do this?
Peter Leow 27-Mar-14 5:02am    
lacs?
Ankur Ramanuj 27-Mar-14 5:08am    
yup..its too much because its a sms solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900