Advertisement

12.12.2007 at 10:59PM PST, ID: 23020493
[x]
Attachment Details

Create a SQL 2005 DB Schema Optimized for Charting Data

Asked by daniellmb in SQL Server 2005, MS SQL Server

Tags: SQL

I have a client that wants to create an admin dashboard with lots of charting options. I'm not a sql guru so I'm wondering if some one out there is that can help me :-)

here's an example of the data we'll have, it's all based around tracking their sales from the stores they run.

we'll have an order, the number of items purchased, and info about each item:

[LOCATION] - this is the location of the store
[ORDER SALE DATE TIME] - date time the order was placed
[TOTAL ITEM COUNT] - total number of items in the order
[ITEM COUNT] - count of this item in the order (could have bought 2 shovels)
[ITEM PRICE PER] - this is the sale price of the item
[ITEM TOTAL PRICE] - this is the total sale price of the items based on the item count (see above)
[TOTAL ITEM PROFIT] - this is how much they made of the item so "ITEM TOTAL PRICE" - "TOTAL ITEM PROFIT" = the price they paid for it.
[ITEM NAME] - item name
[ITEM SIZE]  - item size (optional - nullable)
[ITEM COLOR]  - item color (optional - nullable)

some of the charts requested

popular items (weekly best selling products)
popular stores
items sold in the last day / week / year
profit in the late day / week / year
charts showing how they are tracking toward a given goal ($500 in sales this week /  month / year etc)
product trends over a given time period (what's selling)

So I know about database normalization and I can write selects, but this needs to be fast and I'm not afraid to admit I think it's a bit over my head.Start Free Trial
[+][-]12.13.2007 at 11:31AM PST, ID: 20466846

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 11:39AM PST, ID: 20466928

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, MS SQL Server
Tags: SQL
Sign Up Now!
Solution Provided By: ShogunWade
Participating Experts: 1
Solution Grade: A
 
 
[+][-]12.13.2007 at 11:47AM PST, ID: 20466996

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628