Solved

design promo code dataabse

Posted on 2014-09-23
6
456 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now