>Hi,
>
>I have a VFP system (front and back end are both VFP) where my client enters time worked for a few hundred employees on a weekly basis.
>
>My TimeWorked table to capture this is:
>
>EmployeeID
>LocationID
>Date
>Time Start
>Time End
>
>and a few extra fields irrelevant to this discussion.
>
>They want to change the data entry screen to make it easier for them.
>
>The screen will allow entering all times for all employees at a particular location for an entire week in one go.
>
>So they'll select the Location and the date of the Monday of the week, all the employees scheduled to work at this location for this week will be displayed in a grid with the following columns:
>
>Employee, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday and some other columns again not that relevant. In each of the day columns they want to be able to enter the start and end time.
>
>So this is a sort of pivot table view of the data from my TimeWorked table.
>
>Displaying it in this new format and then massaging it back to save in my existing table will take some major fiddling/programming, so I am considering de-normalising my table to something like this:
>
>EmployeeID
>LocationID
>Date
>MondayStart
>MondayEnd
>TuesdayStart
>TuesdayEnd
>
>and so on.
>
>What do you all think? Is this a good enough reason to de-normalise?
Use denormalized cursor to show data and the user enter information in it.
Then when Save is pressed normalize it again :-)
BTW I have one question what happens if some employee work on one location Monday and other in Thursday?
:-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.