473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Database schema ideas

My company sells widgets. In our 'shopping cart' that we're building,
we want to list out the price for each widget. The problem is that
the price varies depends upon which widget package (out of 10) as user
selects, as well as which website (out of 8) they visit. So, 80
different possible prices per widget (and there are lots of different
kinds of widgets).

Does anyone have any recommendations on how to build a database that
will help prevent a separate record for each of the 80 different
possible prices for each widget?

Nov 25 '05 #1
3 1785
effect1 wrote:
My company sells widgets. In our 'shopping cart' that we're building,
we want to list out the price for each widget. The problem is that
the price varies depends upon which widget package (out of 10) as user
selects, as well as which website (out of 8) they visit. So, 80
different possible prices per widget (and there are lots of different
kinds of widgets).

Does anyone have any recommendations on how to build a database that
will help prevent a separate record for each of the 80 different
possible prices for each widget?


You really don't want to do that. The reason is the maintenance
involved if you have to support additional packages and or
websites in the future. (Sure, I know that they swore on a
stack of bibles that would never happen, but ....)

The best solution is to have a price table where each row has
three columns; package, website, price.

HTH

Jerry
Nov 25 '05 #2
jerry gitomer wrote:
Does anyone have any recommendations on how to build a database that
will help prevent a separate record for each of the 80 different
possible prices for each widget?


The best solution is to have a price table where each row has three
columns; package, website, price.


I agree with Jerry, the best solution is to list the prices per
package/website combination. Actually, it'd be per
widget/package/website combination.

You might have a situation today where you can describe some formula in
each case ("website 31's prices are always .97 * retail price") so you'd
be tempted to store simply a percentage factor per website. But in my
experience, these sorts of things change constantly. Any formula you
might devise to simplify it will become inadequate.

The people who set the prices simply don't think in terms of automation
and conformance to simple rules and formulas. For instance, they'll
want a few individual widgets to have a lower price during a promotion.
Or one website will want their price to match another website's price,
or at a factor of .97, whichever is lower. And so on.

The possible "rules" for pricing are unpredictable and too complex to
make formulas for. So you're better off just storing them and providing
a nice web interface for an administrator to edit them quickly.

Include in this user interface some way to apply changes to multiple
packages or multiple websites, so you can do changes in groups (for
instance, show a list of widgets with checkboxes next to them. Add two
multi-select menus, one for packages and one for websites. The
combination of checkboxes by the widgets and the selected items in the
two select-menus defines to which rows to apply the changes). That will
reduce the potential maintenance burden of having so many records per
widget.

Regards,
Bill K.
Nov 25 '05 #3
Thank you both for your advice. :)
On Fri, 25 Nov 2005 09:10:53 -0500, effect1 <no*@telling.you> wrote:
My company sells widgets. In our 'shopping cart' that we're building,
we want to list out the price for each widget. The problem is that
the price varies depends upon which widget package (out of 10) as user
selects, as well as which website (out of 8) they visit. So, 80
different possible prices per widget (and there are lots of different
kinds of widgets).

Does anyone have any recommendations on how to build a database that
will help prevent a separate record for each of the 80 different
possible prices for each widget?

Nov 26 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike | last post by:
Hello, I'm trying to understand how to map hierarchical XML data to relational database tables, but I seem to be missing something. I'm not a database expert, but I know the basics. XML seems...
0
by: Pentti | last post by:
Can anyone help to understand why re-parsing occurs on a remote database (using database links), even though we are using a prepared statement on the local database: Scenario: ======== We...
1
by: Paul | last post by:
Hey all Appologies for cross posting, but this post covers a few areas in one. I'm fairly new to XML and my ideas are over reaching my grasp (as well as possibly not fully understanding...
4
by: John Coen | last post by:
Help, does anyone have a database I could use to record downtime on multiple systems, that will also show me availability percentages on a day to day basis worked against actual service hours. If...
1
by: Lee Harr | last post by:
Is there any way to forcibly disconnect all users from a database, or else force the drop of the database even though others are still connected? I have a report I run where I first drop the old...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
3
by: josh.kuo | last post by:
Sorry about the subject, I can't think of a better one. I recently wrote some PHP classes that I think might be of interest to this group. Since I have been reaping the benefits of reading news...
10
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the...
8
by: situ | last post by:
Hello all, i have Database1 and database2, is it possible to make database connection to database2 by running stored procedure on database1. Thanks and Regards Situ
1
by: John | last post by:
Hello, I am working on a project with a strongly typed dataset...I have to make alot of changes to it as I change the database schema. Its tedious, error prone and time consuming updating it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.