SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Referrer Database system
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mkkb917
Starting Member

Pakistan
14 Posts

Posted - 08/25/2013 :  06:21:36  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000