?
Solved

design promo code dataabse

Posted on 2014-09-23
6
Medium Priority
?
650 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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 1000 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 1000 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Suggested Courses

770 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