Solved

design promo code dataabse

Posted on 2014-09-23
6
574 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

696 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