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
 Referrer Database system

Author  Topic 

mkkb917
Starting Member

14 Posts

Posted - 2013-08-25 : 06:21:36
hi
i am developing a system that will save the data about referred account
the scenario is
A already registered user can refer maximum 2 user per month and if it refer more then 2 users in month then the only 2 will be taken and reamining will be used in next coming month.
now in my database diagram (E-R Diagram ) i create a ACCOUNT table that save the data about new account also create a REFER table that will save the reference of new users. I am using a month column in REFER table and it will save the month of the user in which a user is referred and also another column REFERRED_BY which will be a username of already registered id (the user which refer the new user to us)
now also there is another table STATUS where i store the status of each account on monthly basis
if user is continuously paying the status will be active and it can also be deactivated by the admin. this table also contain the Month column. and then this table is integrated with the BILLING table.
The referrer system will reduce the user bill. for example if a user refer 2 new users in this month the predefined percentage of amount will be deducted from his current bill. and the user get benefit.

now HERE
i have created 3 tables after ACCOUNT table and each table have a column Month
my question is
can i move the Month column into the ACCOUNT table so that it can only be created once in the database
   

- Advertisement -