Engineering Project Management Database

Slides:



Advertisements
Similar presentations
NMED 3850 A Advanced Online Design February 25, 2010 V. Mahadevan.
Advertisements

SQL Overview Defining a Schema CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 3 Slides adapted from those used by Jeffrey Ullman, via Jennifer.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
1 Working with MS SQL Server II. 2 The sqlcmd Utility Command line utility for MS SQL Server databases. Previous version called osql Available on classroom.
Oracle Data Definition Language (DDL)
MySql In Action Step by step method to create your own database.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Slides adapted from those used by Jeffrey Ullman, via Jennifer Welch Via Yoonsuck Choe.
1 Working with MS SQL Server. 2 Objectives You will be able to Use Visual Studio for GUI based interactive access to a Microsoft SQL Server database.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Introduction to SQL Steve Perry
Chapter 15: Using LINQ to Access Data in C# Programs.
Dbwebsites 2.1 Making Database backed Websites Session 2 The SQL… Where do we put the data?
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Triggers and Stored Procedures in DB 1. Objectives Learn what triggers and stored procedures are Learn the benefits of using them Learn how DB2 implements.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Structured Query Language (SQL) IST2101. Structured Query Language – Acronym: SQL – Pronounced as “S-Q-L” [“Ess-Que-El”] – Originally developed by IBM.
M1G Introduction to Database Development 2. Creating a Database.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
Stored Procedure. Objective At the end of the session you will be able to know :  What are Stored Procedures?  Create a Stored Procedure  Execute a.
Application Data and Database Activities Auditing Dr. Gabriel.
SCUHolliday - coen 1788–1 Schedule Today u Modifications, Schemas, Views. u Read Sections (except and 6.6.6) Next u Constraints. u Read.
Oracle & SQL Introduction. Database Concepts Revision DB? DBMS? DB Application? Application Programs? DBS? Examples of DBS? Examples of DBMS? 2Oracle.
Week 8-9 SQL-1. SQL Components: DDL, DCL, & DML SQL is a very large and powerful language, but every type of SQL statement falls within one of three main.
Basics of JDBC Session 14.
CS 111 – Nov. 8 Databases Database Management Systems (DBMS) Structured Query Language (SQL) Commitment –Please review sections 9.1 – 9.2.
Engineering Project Management Database David H. Williams CS 610.
1 A Very Brief Introduction to Relational Databases.
Constraints and Views Chap. 3-5 continued (7 th ed. 5-7)
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Databases and SQL CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
1 Designing Tables for a Database System. 2 Where we were, and where we’re going The Entity-Relationship model: Used to model the world The Relational.
Introduction to Database Programming with Python Gary Stewart
Marketing Analytics: Database Query with MySQL Disclaimer: All logos, photos, etc. used in this presentation are the property of their respective copyright.
1. 2 Design of databases. E/R model (entity-relationship model) Relational model (tables) UML (unified modeling language) Database programming. SQL, Relational.
SQL Introduction SQL stands for “Structured Query Language” and can be pronounced as “SQL” or “sequel – (Structured English.
Logical DB Design: ER to Relational
Introduction to Entity Framework
CS320 Web and Internet Programming SQL and MySQL
SQL: Schema Definition and Constraints Chapter 6 week 6
Oracle & SQL Introduction
Chapter 6 - Database Implementation and Use
Principles of Software Development
CSIS 115 Database Design and Applications for Business
Created by Kamila zhakupova
Designing Tables for a Database System
Database Models Relational Model
CS 174: Server-Side Web Programming February 12 Class Meeting
From ER to Relational Model
Database Fundamentals
Relational Databases The Relational Model.
Relational Databases The Relational Model.
CS4222 Principles of Database System
Teaching slides Chapter 8.
SQL OVERVIEW DEFINING A SCHEMA
The Relational Model Textbook /7/2018.
Creating Tables & Inserting Values Using SQL
PL/SQL week10.
SQL-1 Week 8-9.
Session - 6 Sequence - 1 SQL: The Structured Query Language:
Introduction to Databases & SQL
CS3220 Web and Internet Programming SQL and MySQL
Chapter 11 Managing Databases with SQL Server 2000
CS3220 Web and Internet Programming SQL and MySQL
Session - 6 Sequence - 1 SQL: The Structured Query Language:
Presentation transcript:

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.

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.

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.

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.

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

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

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’)

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

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

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.

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.

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.

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.

Here’s a screen capture of the actual program.

Presentation Available at: www.arms-a-flailing.com/cs610/610Proj.zip 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.