473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Architecture billable-hour tracking

I work for an architecture firm, and am setting up a
database to track hours worked on various projects.

The three first tables are fairly simple. Each
project has many employees, and each employee works on
many projects. So I'll have these three tables:

tblProjects
tblEmployees
tblProjectEmployeeBridge

But when I get to the hours worked I get confused. I
will need to replicate reports from a 15-year-old
database which has crashed. Those reports tracked
hours worked (projected and actual) by month, then
week. A typical line from these reports showed
something like this.

They way we want to track the hours is as follows:

Month 1 (the current month), by week (1 to 5 weeks), projected and
actual hours for each week);
Month 2 (the month after the current month) first week projected, then
total projected for month;
Month 3 (projected total for the month only)

The reports are run every monday, and the information will be new each
month. In other words this is really just used for forecasting the
weeks in the current and next two months.

Any ideas on how to set up the tables for this, and how they should be
related to the Employee and Projects tables?
thanks
Nov 13 '05 #1
5 1575
Almost directly out of Elmasri's book on databases...

Employee---(1,M)----WorksOn---(M,1)----Project

CREATE TABLE Employee(
EmployeeID Long Integer PRIMARY KEY,
FirstName Text(25) NOT NULL,
LastName Text(25) NOT NULL,
.....
);

CREATE TABLE Project(
ProjectID Long Integer PRIMARY KEY,
ProjectName Text(25) NOT NULL,
.....
UNIQUE (ProjectName)
);

CREATE TABLE WorksOn(
EmployeeID Long Integer NOT NULL,
ProjectID Long Integer NOT NULL,
HoursWorked Number
FOREIGN KEY (EmployeeID) REFERENCES Employee.EmployeeID,
(ProjectID) REFERENCES Project.ProjectID)
):

All the HoursWorked info goes into the WorksOn table. It's just WHO
worked on WHAT for HOW LONG? (Or you could put in start time/stop time
stuff...)

Presumably, your projected hours would go into a field somewhere.
Your actuals would be sums of HoursWorked. If you use actual
dates/times, just use DateDiff() to get the difference in minutes and
then use integer division to deal with hours and all that.

Looks like your reports are just filtering for current and future
months... so you'd just filter your reports when you open them.
Nov 13 '05 #2
Hey,

thanks for the tips. I'm reviewing your advice now, but actually I was
able to come up with a rough logical schema and ERD while at work
today. They can be viewed at:

http://www.geocities.com/gene2152

Please feel free to take a look and let me know if you see any glaring
mistakes. The funny parts that gave me problems in planning were how
to track the projected AND actual hours (I settled on a HourStatus
entity). I also settled on using the Month attribute, which is a
Month/Year figure, and the Period entity instead of week (we have 4-5
weeks per month plus a weird Projected Total figure we need to track).

thanks
Nov 13 '05 #3
You should know about and review the many data models available
at Database Answers [1] which seems to be a one of a kind resource.
--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

[1] http://www.databaseanswers.com/

"gene2152" <ge******@yahoo.com> wrote in message
news:7e*************************@posting.google.co m...
Hey,

thanks for the tips. I'm reviewing your advice now, but actually I was
able to come up with a rough logical schema and ERD while at work
today. They can be viewed at:

http://www.geocities.com/gene2152

Please feel free to take a look and let me know if you see any glaring
mistakes. The funny parts that gave me problems in planning were how
to track the projected AND actual hours (I settled on a HourStatus
entity). I also settled on using the Month attribute, which is a
Month/Year figure, and the Period entity instead of week (we have 4-5
weeks per month plus a weird Projected Total figure we need to track).

thanks

Nov 13 '05 #4
I definitely agree that you should look around for schemas... this is
a pretty common problem.... a few other thoughts:

CREATE TABLE Employee(
EmployeeID Long Integer PRIMARY KEY,
FirstName Text(25) NOT NULL,
LastName Text(25) NOT NULL,
HrlyRate Currency
.....
);

CREATE TABLE Project(
ProjectID Long Integer PRIMARY KEY,
ProjectName Text(25) NOT NULL,
EstBudget Currency,
.....
UNIQUE (ProjectName)
);

CREATE TABLE WorksOn(
EmployeeID Long Integer NOT NULL,
ProjectID Long Integer NOT NULL,
HoursWorked Number
FOREIGN KEY (EmployeeID) REFERENCES Employee.EmployeeID,
(ProjectID) REFERENCES Project.ProjectID)
):

Then you could just do the projected vs the actuals by grouping by
project and totaling HoursWorked*Rate for each employee on the
project...
Nov 13 '05 #5
I definitely agree that you should look around for schemas... this is
a pretty common problem.... a few other thoughts:

CREATE TABLE Employee(
EmployeeID Long Integer PRIMARY KEY,
FirstName Text(25) NOT NULL,
LastName Text(25) NOT NULL,
HrlyRate Currency
.....
);

CREATE TABLE Project(
ProjectID Long Integer PRIMARY KEY,
ProjectName Text(25) NOT NULL,
EstBudget Currency,
.....
UNIQUE (ProjectName)
);

CREATE TABLE WorksOn(
EmployeeID Long Integer NOT NULL,
ProjectID Long Integer NOT NULL,
HoursWorked Number
FOREIGN KEY (EmployeeID) REFERENCES Employee.EmployeeID,
(ProjectID) REFERENCES Project.ProjectID)
):

Then you could just do the projected vs the actuals by grouping by
project and totaling HoursWorked*Rate for each employee on the
project...
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: David Noble | last post by:
We've been developing a web site using 3-tier architecture for 18 months now. There is a common layer that defines the classes - using XML schemas. The data layer acts as a wrapper to 3 databases...
0
by: Vin | last post by:
Hi, I've got a VB.Net + ASP.Net message board application which has already been customized. There are two solutions in this application. 1. The front end aspx, aspx.vb files, User controls...
4
by: apngss | last post by:
what's the differences between collocated architecture and distributed architecture?? My understanding is that collocated architecture has everything in a single machine? i.e. There is only 1...
2
by: hans | last post by:
Hi! I am new to .NET (coming from Java). We have to implement a desktop application which extracts data from a database, does some analysis, filtering etc. and displays the results. I have...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
3
by: RAJESH | last post by:
I am working with c# and asp.net in developing web applications, iam using ..netframework 1.1 ,i want to know what is the need of 3-tier or 4-tier architecture in our application development.what...
1
by: benmorganpowell | last post by:
I have a small windows service which connects to a POP3 server at defined intervals, scans the available messages, extracts the required information and inserts the data into a SQL database. I am...
6
by: carsonbj | last post by:
I have an issue where the below operation works on a little-endian architecture but not on a big-endian architecture. I was under the impression that pointer arithmetic is architecture independant...
13
by: rrs.matrix | last post by:
hi i have to detect the type of CPU. whether it is 32-bit or 64-bit.. how can this be done.. can anyone please help me.. thanks.
0
by: srikar | last post by:
Hi all, I am having a problem, when I am compiling the code in 32 bit option on a 64 bit machine using the macro CPPFLAGS= -m32 I am getting the following warnings from the linker . ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.