+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 38

Thread: Design help-can this be done?

  1. #1
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Design help-can this be done?

    Hi All,

    Ok, I have something new to tackle and I'm not sure if / how it can be done so I wanted to some feedback.

    Currently an excel spreadsheet is used and sent out to many different locations, they enter their forecast numbers for 9 mos. out and still the last month so a comparison can be done to display the difference. Once its sent back its combined into one spreadsheet that can be filtered by each individual location or by Region or ALL. On the spreadsheet 3mos. actuals numbers are displayed, so each month that has just past gets updated with actual numbers. so an example looks similar to below:

    Description - jun09act- jul09act - aug09act - sep09fct - octfct - novfct - etc..9mos out.
    desc names - 100 - 101 - 103 - 110 - 111 - 111 - 111 ...etc.

    some other fields that will be calculated here where I will sum some items/description and divide by another value...etc.

    One of my questions, do you suggest I sent up 2 tables, one for actuals and one for forecast because one person will want to dump actual numbers each month as they pass but forecast will be entered on the web interface by multiple users for their location?

    Next question, should my table look like this? or should I just have a DateID field that holds mm/dd/yyyy?
    RegionID
    LocID
    MonthID
    YearID
    Value

    Next question, if my table is setup to hold a value for each month/year...how can i do this dynamically to where I can get the results displayed as needed? stored procedure? Also, would I be able to have a search screen to search by location and default to current month for forecasted part but have something to where if the user wanted to go back in time they can put in a different start forecast mo/yr?

    Goodness....trying not to get overwhelmed with this.

    Thanks for any answers here...
    Attached Images
    Last edited by Rebelle; September 17th, 2009 at 09:17 AM. Reason: adding attachment for better visual

  2. #2
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    I would probably go with something like below....assuming that there are multiple locations per region.

    Code:
    Regions
    RegionID | Region
     
     
    Locations
    LocationID | Location
     
     
    LocationsInRegions
    RegionID | LocationID
     
     
    ForecastsAndActuals (not sure what exactly you're forecasting and putting actual values for, so a different table name would probably be used)
    ForecastActualID | LocationID | EntryDate | Value | IsForecast
    
    IsForecast would be a bit field which represents if the entry is a forecast or if it is an actual value.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  3. #3
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Hey JMH,

    Ok, yup multiple locations per region.

    I was going to pre-populate the table with the values and of course all the forecast values would be null to start until the users enter them. so I would be able to add multiple records for each month? it would be a form with about 100 fields that would need to get add into its own mo/yr record. so if 10 mos are null and then enter values and next month data shifts over they can still modify the 9 mos they entered previously so I wouldnt add those records only update but the new mo. value will need to be added. this is why I thought I would pre-populate data in the actual/forecast table with nulls. Also, as for the actuals the power user still wants to crunch numbers in excel to get final actual number so then I'll just update this table each month.

    I added a screenshot to post #1 maybe before you read my thread to help visually.

  4. #4
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Yes, with my design you could put as many values for each month as you need. There is no need to create a mo/yr record...just put the date in for the forecast/actual day. I wouldn't prepopulate the table with NULLs....simply populate the table when they are ready to enter the data.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  5. #5
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Hey JMH,

    Ok trying to understand and take this in...

    so are you saying to have a different entry screen by month? or can you what suggest be done how the display screen looks with all 10 mos.?

    I'll start getting the tables set up...I'll have category and group tables for the description items listed in display. I think I'll separate the actual from the forecast since the power user will hand those values over to make to populate after each month that has passed and force a date :ex: 10/1/2009...is this ok?

  6. #6
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    No, I'm not saying that at all...it's a possibility, but how you do the UI design is irrelevant. I was saying that there's no reason to pre-populate the database with NULL when data hasn't been entered into the form.

    Not sure what you mean by, "I think I'll separate the actual from the forecast since the power user will hand those values over..."
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  7. #7
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    I did something like this a few employers ago. In my case, I split the Forecast and Actual data into two separate tables -- it just made working with them easier and (a) allowed me to display the report as of any month (historical reporting) and (b) allows for different authorization on the Forecast and Actual entries.

    While visually it makes sense to think of the month/year data as columns in a spreadsheet, in relational database design it make more sense for the Forecast and Actual data to be records. Remember, it's really easy to add a new column each month in Excel, but its not something you want to do in a database -- there should never be a good reason to add columns as part of routine usage. Also, don't add lots of NULL values into a table unless there is a GOOD REASON for them -- a NULL should have some semantic meaning in the design.

    JMH is right -- separate the UI from the database design -- how the data is physically stored in the database and how it is present to the user are too separate concept. Since this is a new project, concentrate on the DB design and not so much on the UI.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  8. #8
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Quote Originally Posted by jmurrayhead View Post
    No, I'm not saying that at all...it's a possibility, but how you do the UI design is irrelevant. I was saying that there's no reason to pre-populate the database with NULL when data hasn't been entered into the form.

    Not sure what you mean by, "I think I'll separate the actual from the forecast since the power user will hand those values over..."
    JMH,
    The project person gets a file from someone else and then has to several takes in excel to calculate/sum totals etc. to get the actual for each location. She still wants to do that ... so I need an easy way to upload these actual values each month to load to the database...I wouldn't want her to do all the calculations in excel then still have to use a web interface to hand enter all the values for all the locations...(lots of values).

    Quote Originally Posted by Wolffy View Post
    I did something like this a few employers ago. In my case, I split the Forecast and Actual data into two separate tables -- it just made working with them easier and (a) allowed me to display the report as of any month (historical reporting) and (b) allows for different authorization on the Forecast and Actual entries.

    While visually it makes sense to think of the month/year data as columns in a spreadsheet, in relational database design it make more sense for the Forecast and Actual data to be records. Remember, it's really easy to add a new column each month in Excel, but its not something you want to do in a database -- there should never be a good reason to add columns as part of routine usage. Also, don't add lots of NULL values into a table unless there is a GOOD REASON for them -- a NULL should have some semantic meaning in the design.

    JMH is right -- separate the UI from the database design -- how the data is physically stored in the database and how it is present to the user are too separate concept. Since this is a new project, concentrate on the DB design and not so much on the UI.
    Thanks w0lffy...Ok, trying to absorb all of this...I get the table layout JMH suggested guess I'm just worried or trying to jump ahead and think how/can I make this look like I need in the end. Also, if I don't prepopulate table how will I be able to select a location then display empty results/then move to form to edit/enter value.

    I'll take small steps and just start setting up the tables and then expect more threads from me....

  9. #9
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Quote Originally Posted by Rebelle View Post
    Also, if I don't prepopulate table how will I be able to select a location then display empty results/then move to form to edit/enter value.
    The 'empty' results would come from doing a LEFT JOIN from the location table to the forecast table. If there is no record for a given (Location,Month,Year) then a NULL result would be generated.

    When it comes time them to start generating results for your UI, then consider using Views over the data tables to return the results in a form that is easily manipulated by your code. Views are a good way to denormalize the data for reporting purposes.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  10. #10
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Hey w0lffy,

    Okie dokie...

    one more question....do you remember how long it took you when you did your similar project?

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast

Similar Threads

  1. Design/Logic Help
    By Rebelle in forum Database Design Help
    Replies: 5
    Last Post: March 24th, 2009, 02:05 PM
  2. Database Design
    By dtz in forum Database Design Help
    Replies: 15
    Last Post: March 13th, 2009, 08:55 AM
  3. help with form design
    By Ziggy in forum Microsoft Access
    Replies: 12
    Last Post: February 16th, 2009, 02:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO