Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 TransactionType

Author  Topic 

programer
Posting Yak Master

221 Posts

Posted - 2011-07-30 : 05:41:24
Hi,

I need your help.

DEPOSIT METHOD:

CREDIT CARD:

1 – Visa credit card

2 – Visa electron

3 – Mastercard

4 – Diners Club



E-WALLET:

5 – Moneybookers

6 – Neteller

7 – PayPal



PREPAID CARD

8 – Paysafecard



9…. 50







WITHDRAWALS METHOD:



BANK TRANSFER:

51 – Bank transfer



E-WALLET:

52 – Moneybookers

53 – Neteller

54 – PayPal



55 …… 100


In the table tbl_Transactions I have column TransactionType in which have values deposit method, withdrawals method.

TransactionType used because it would not like to use words (paypal, etc ...).

This means that the column stores TransactionType int number of words instead of payment methods.

So if the column TransactionType is enough number for this or do I create a new table in which are stored methods?


Column TransactionType specify the number you want to change the Gridview like this:
<% # "1." Equals (Convert.ToString (Eval ("TransactionType")))? "Deposit": "2." Equals (Convert.ToString (Eval ("TransactionType")))? "Withdraw": "3." Equals (Convert.ToString (Eval ("TransactionType")))? "Stake": "0"%>

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-30 : 06:21:34
it depends on your requirement. If you want analysis based on payment methods then you need to add it in a new column.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

programer
Posting Yak Master

221 Posts

Posted - 2011-07-30 : 07:14:27
quote:
Originally posted by visakh16

it depends on your requirement. If you want analysis based on payment methods then you need to add it in a new column.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





New column or new table?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-30 : 08:19:36
new table to store payment methods against transactiontype

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

programer
Posting Yak Master

221 Posts

Posted - 2011-07-30 : 10:29:02
quote:
Originally posted by visakh16

new table to store payment methods against transactiontype

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Ok,
Like this:

tbl_Methods
ID, NameMethod
1, paypal
2, stake


and then

tbl_transaciton
TransactionType
1
1
1
2
2
2

Please note that this is also provided for the word "stake"

Go to Top of Page
   

- Advertisement -