Download presentation
Presentation is loading. Please wait.
1
Engineering Project Management Database
David H. Williams CS 610 Hello... David Williams... Solo project based on some needs at my place of employment for a project management database. You may remember Daisy referring to a database with 1300 attributes in one table... All of the test date for this project are fictional. Nonetheless, they are a near direct reflection of typical projects in my workplace – only somewhat simplified.
2
Departmental Needs Employee Information Contractor Information
Account Balance Tracking Project Information & Tracking et al Here’s a list of needs that were addressed by my project. It is an abbreviated list compared to what will actually be implemented over the next couple of years at my workplace.
3
E/R Diagram. Projects incorporate few engineers and many contractors... When converting these into relations, there were 5 relations produced: An account relation An employee relation A project relation, which incorporated the manager, planner and safety engineer A contractor relation And a relation created from the relationship PC_Table. BCNF was kept in mind from the first conception of the schema. All attributes in each relation are implied by the key.
4
Employee Table CREATE TABLE employee( emp# CHAR(5) PRIMARY KEY,
lname VARCHAR(20) NOT NULL, fname VARCHAR(30), mi CHAR(1), title VARCHAR(20), hire_date DATETIME NOT NULL ); Employee Table Employee number is the primary key. Last name and hire date NOT NULL.
5
Account Table CREATE TABLE account( acct# CHAR(8) PRIMARY KEY,
amount MONEY NOT NULL, update_stamp DATETIME, ); Account Table account number is the PRIMARY KEY amount NOT NULL update_stamp is not longer a real time stamp
6
Project Table CREATE TABLE project(
proj# CHAR(6) PRIMARY KEY,proj_name VARCHAR(50), proj_mang# CHAR(5) REFERENCES employee(emp#) , planner# CHAR(5) REFERENCES employee(emp#) , safety_eng# CHAR(5) REFERENCES employee(emp#) , acct# CHAR(8) REFERENCES account(acct#), est_start DATETIME, est_end DATETIME, act_start DATETIME, act_end DATETIME, proj_descript VARCHAR(255) ); Project Table Project Number is PRIMARY KEY Project manager, planner, and safety engineer reference the employee table. Account number references the account table. ON DELETE NO ACTION ON UPDATE CASCADE
7
Contractor Table CREATE TABLE contractor(
cont_code CHAR(5) PRIMARY KEY, co_name VARCHAR(20) NOT NULL, address VARCHAR(100), city VARCHAR(30), state CHAR(2), zip CHAR(5), phone VARCHAR(12), contact_lname VARCHAR(20), contact_fname VARCHAR(30), minor_own char(1) CHECK(minor_own IN('y','n')), ); Contractor Table Contractor Code is PRIMARY KEY Company name NOT NULL Minority Ownership is IN (‘y’,’n’)
8
Project – Contractor Table
CREATE TABLE pc_table( proj# CHAR(6) REFERENCES project(proj#) , cont_code CHAR(5) REFERENCES contractor(cont_code) , emps_on_proj INT, PRIMARY KEY (proj#,cont_code) ); PC_TABLE Project number and contractor code are PRIMARY KEY Project number references project table. Contractor code references contractor table. Also has the number of employees on the job. ON DELETE NO ACTION ON UPDATE CASCADE
9
Reference Flow Employee Table Account Table Project Table PC Table
First you need employees... Then you need money... This can be the whole project while just doing research. Next, contractors... and the PC table to tie them all together. PC Table Contractor Table
10
Microsoft Visual Studio .NET
Used Microsoft Visual Studio .NET to create the database access program. VB.NET is the language. First time I ever used it. I fully expected it to be awful, but it was fairly easy to pick up the syntax. The real-time parser was good at identify problems. Occasionally it repaired the problem for me.
11
SQL Query Analyzer Query analyzer was great! Very helpful in compiling complex queries. This came with Microsoft’s SQL Server package. This thing was great. I used to bulk load my “build and fill” SQL. Highlight and run feature helped a lot when making difficult SQL statements.
12
SQL Server Desktop Engine
Used Microsoft’s SQL Server Desktop Engine for my database so that I wouldn’t have bogus information floating around on the sequel server. Used this for a couple of reasons: didn’t want to always have an external connection to use database, and didn’t want bogus information on our Sequel server.
13
Connecting to the Desktop Server
The code to access the desktop engine is similar to the code used in Java for Oracle, except for the fact that I used Windows Integrated Security instead of a username and password, so this long string is used here. Declare a connection as a new sql connection and pass it the access string... Open the connection... Declare a command as a new sql command and associate it with the open connection (not command is defined yet)... Declare a sql data reader... Define the sql command text as whatever your query needs to be... Fill the data reader with the results of the command... While there are rows to be read in the data reader, write out columns 0 through 5.
14
Here’s a screen capture of the actual program.
15
Presentation Available at:
I know that Dr. Wong sent out a not saying all the project presentations could be included in the scope of the final. In the event you’d like to look back over mine, I’ve posted this slide show on the web. Feel free to go and look at it. I’d be happy to take questions now.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.