Following are the rules for Accounting Entries. Hope it is helpful.
1) Real Account:
Debit what comes in
Credit what goes out
2) Personal Account:
Debit the receiver (of benefit)
Credit the giver (of benefit)
3) Nominal Account:
Debit all expenses and losses
Credit all incomes and gains