Solved

design promo code dataabse

Posted on 2014-09-23
6
529 Views
Last Modified: 2014-10-13
I want to design a database to include the promo code. The rule that I want to use are the following. The promo code can be used by referring someone to sign up, it can apply to the entire product, or to the specific session or by geographic location.

Please advise
0
Comment
Question by:erikTsomik
6 Comments
 
LVL 1

Expert Comment

by:Richard Francis
ID: 40340826
Hi Erik,

I'm not totally clear what your promo code actually does, could you flesh that out a bit? For example does it reduce the price of your product/service, or entitle the user to extra features?

Richard.
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 40342055
it will reduce the price of the product
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 40348528
Be as concrete descirbing what the promo code can do, as you can.

Promocodes reducing the price of a product would need the following simple table:

promocode, productid, discount

That would be all there is to it in regard of database schema. On top of that you of course need a page or form element to accept the promo code, code to check whether the promo code can be applied to a current order and delete it, if it's valid once only. OR you need a validthru date, if it's a promotion with a deadline. You can't expect a database design going into such details if you have no concrete idea about what you want.

You also talked about the validity for a certain session only or a geographic region. It's not self explanatory just to chunk out the key words. Tell more.

Bye, Olaf.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 19

Author Comment

by:erikTsomik
ID: 40348731
I wan to have a promo code to give discounts (% or $) and incorporate the referral discount (where both parties will get a creadit. I Need a mechanism to track it who is using it and from who is came from)
0
 
LVL 29

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 250 total points
ID: 40348777
Then your promocode table will just need some more fields:

promocode, originatoruserid, productid, discountpercent (nullable), discountabsolute (nullable)

some (new) user entering the promocode then gets the discount and you know which originator user also gets a discount. This still doesn't cover any geographical dependency.

Bye, Olaf.
0
 
LVL 51

Accepted Solution

by:
Mark Wills earned 250 total points
ID: 40348858
I would be inclined to break it up a little more (normalise).

Promo Master (describes what it is and where is applies - code, description, discount value, discount type, start & expiry dates)
Promo Detail (describes how it is used - code, referrer, consumer, date)

If promo's are going to be allocated to referrers, or referrers have some kind of constraint, then you may need a "Promo Referrer" table to set up those relationships as well.

You might also consider a "Promo Reimbursement" where you can track each claim and claim type as the promo's are being paid / realised.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question