Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Should I de-normalise?
Message
 
To
06/10/2016 09:39:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01641691
Message ID:
01641692
Views:
72
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform