Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 The Yak Corral
 I just watched Jay Leno on TV

Author  Topic 

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 03:13:00
He had a segment named "Dealing with the public", where he played some actual emergency calls. Anyone seen this too?

What is going on with common sense with people today?


Peter Larsson
Helsingborg, Sweden

pootle_flump

1064 Posts

Posted - 2006-11-24 : 03:15:55
Common sense ain't so common. It never was either.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 03:17:39
I can understand here at SQLTeam, but he played 911 emergency calls and people just complained about how to get out of their car (the lock button was down) and how to remove ice from their windshields.
A lady even called to ask about cook time for her turkey!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-24 : 03:23:11
Do you get time to watch TV at all, Peter in addition to guiding lost yaks here?

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 03:26:45
Having a "day off" today.
The only task I have today is to design a database for "online time reporting system". The goal is to all our consultants to visit our web site and report their work online, with all vital data. This information is later used for invoicing to clients and salaries to the consultants.

There is no need to sit a head quarters for this. I demanded to do this at home, so here I am.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-24 : 03:35:16
Cool !!

So today you won't have to bear with your so smart (eh?) collegue.

How about your new house? Did you find one?

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 03:36:52
No, the last house we looked at had some severe flaws. It turned out that the contractor cut corners so the basement already had dew in it.

This is what I have come up with this far http://developerworkshop.net/diagram.pdf
Maybe you can give some input of improvements?

Template table is just what it says, a template of projects with parent-child structure becuase some projects depend on other projects.

For example:
Proj# 5000 - Implementation of MS Axapta
Proj# 5100 ------ Pre study
Proj# 5200 ------ Education
Proj# 5210 ----------- Order system
Proj# 5220 ----------- Inventory system
Proj# 5300 ------ Quality control
Proj# 5310 ----------- Acceptance test
And so on...

These templates can be copied in whole or parts of it to the projects table and connected to a particular client.

The categories and groups table are only for future statistics. You can group together proj# 5100, 6090 and proj# 7140 and name that group "Prestudy phases".

In Resources you connect consultants to a project.

In services you store a record for a consultant and specific date. The meaning og this is that you can relate work hours (table work) to a specified date. You can also relate transportations (such as driven mile compensation for a specific date). And keeping the relation in a specific table allows me to add more tables (than work and transportation) in the future, if there ever will be a need for such related tables. That could for example be a table with information about hiring tools and other equipment for doing a task. I don't know. Anyhow, I haven't cornered me with that desing.

The calendar table (thanks to MVJ) has dates from Jan 1, 2007 to Dec 31, 2034. The use of this table is statistics and date interval groupings.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-24 : 03:51:15
That sounds like good design. I have couple of questions:

1. Your PROJECTS table does not have Estimated completion time (deadline). I don't know about system there, but I have seen that in some cases, if the project overruns in terms of time (beyond certain limit), client charges you for that.

2. Minuetes column is required in WORK table? It can be computed from FromTime and ToTime, right?

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-24 : 03:54:20
that's some complex database

and here i thought you posted the pic of your house to be...



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 03:57:48
Rest assure I will when we found THE house!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 04:02:58
quote:
Originally posted by harsh_athalye

That sounds like good design. I have couple of questions:

1. Your PROJECTS table does not have Estimated completion time (deadline). I don't know about system there, but I have seen that in some cases, if the project overruns in terms of time (beyond certain limit), client charges you for that.

2. Minutes column is required in WORK table? It can be computed from FromTime and ToTime, right?
Good points!

1) Excellent. I will talk to project manager if he wants this in the database, or just on the contracts in plain paper.

2) For 85% of the time, it is not important to the client to know from and to times. Only for inhouse HR department (overtime and so on). They want to know how many hours has been invoiced. So FromTime and ToTime are nullable. Minutes are not. But it can be calculated in front-end (copyright 2006 madhivanan).

This design's primary goal is to keep invoicing and salaries. But every improvement beyond original function is good!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-24 : 04:34:54
One more thing that comes to my mind is how you are going to relate hours spent with actual pie of work done. I think in the Work table, you can also add column to know how much work is completed in terms of percentage (in direct relation with BudgetHours in Project table)

Also, if you want you can add Comments/Description field to have consultants fill in the brief description of what work they have done for specific date.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-24 : 04:58:27
"I have to design a database for "online time reporting system". The goal is to all our consultants to visit our web site and report their work online, with all vital data. This information is later used for invoicing to clients and salaries to the consultants."

"I demanded to do this at home, so here I am."

Sorry, we don't help with home-work here

Kristen
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 04:59:48
With emphasis on homework, right?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-24 : 05:07:18
I'm pedantic about these things. I would want all the PKs to be the first column (or Create/Update Date first, then PK)

Not sure I like [Date], [Year] as column names in Calendar (but for English names they do convey what they hold)

Archive tables for changes? Seems an opportunity for Fraud, or at the least a need to be able to Audit

Does Groups need a descriptive name? Projects too?

All tables names are plural, except Work and Calendar

Do you need a means of know what is Work-in-progress, what has been agreed for client billing (and what is on-hold for future billing), and what is actually billed (and therefore presumably cannot be edited further with the supervisor putting a key in the till!)

Should Transports have a key to a Price Lookup table? Presumably mileage is at Price-X which will increase at some point in the future, but needs to be fixed as-of the time that the work was completed? i.e. some sort of table that provides a price as-it-was on a given date.

I like time recording systems that allow multiple time pieces against a single "block". So I start work in the morning from 9:00 am until 9:14 when I get a 3 minute phone call (on something else) and then I resume my original task at 9:17 ... so recording both those (and subsequent) time chunks against a single block allows me to provide one descriptive comment - e.g. to appear on the invoice. (Up to you whether time-chunks are only allowed for the same day, or not; its nice if you work past midnight, but the client may object if 10 years work is lumped under one "doing stuff" heading!

Kristen
Go to Top of Page

Sitka
Aged Yak Warrior

571 Posts

Posted - 2006-11-24 : 15:18:40
So FromTime and ToTime are nullable. Minutes are not.

That sounds good,

A step more,
You may need a per user paytype as some
folks will have negotiated a shift premium and
some may not have and some get granted shift premium even though it would normally not be a shift premium time chunk. So if handled by the user he gets his choice of his rates that he can apply per chunk of time. If not handled by the user then it becomes a calculation after the fact which can get into a pushing and shoving match.

This shift premium can be dynamic as well so it may be that a guy gets off the plane at noon and in his ten hour day the shift premium kicks in after 5PM. So then you end up with a need for a per user calendar definition, to calculate his shift premium for hours for that pay period. Generally OT is aggregate accross a pay period but not always, Ex. Wednesday is a holiday but dosen't count against a weeks base payrate of 45 hours so once again there is an exception.
And of course, that holiday is easy to envision as non universal, so rather than a table containing day column and rate column it becomes a user's days rates. It's just one of those things with payroll, each individual seems to always have a little twist in their agreement that makes it a unique case. I think payroll is a very tough application domain. It's like that old trick "hey you got two 5's for a 10, Thanks, on second thought, give me my 10 back."

I've never seen payroll blended well with scheduling or planning or progress tracking. Maybe you can be the first to get a solid relational design to that.

"it's definitely useless and maybe harmful".
Go to Top of Page

Doug G
Constraint Violating Yak Guru

331 Posts

Posted - 2006-11-24 : 16:37:54
If Jay Leno had any sense of fairness, he'd play the other 87 gazillion 911 calls that were not funny.


======
Doug G
======
Go to Top of Page
   

- Advertisement -