CPSC 3375 Final Project ER Diagram



Similar documents
Database Extension 1.5 ez Publish Extension Manual

CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design

DbSchema Tutorial with Introduction in SQL Databases

Connect to a SQL Database with Monitouch

Introduction to SQL ( )

Faculty of Engineering and Architecture. Computer Engineering Department DATABASE MANAGEMENT SYSTEMS POSTLAB #3 SOLUTION

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

Supplement IV.C: Tutorial for Oracle. For Introduction to Java Programming By Y. Daniel Liang

Free Medical Billing. Insurance Payment Posting: The following instructions will help guide you through Insurance Payment Posting Procedures.

SQL Programming. CS145 Lecture Notes #10. Motivation. Oracle PL/SQL. Basics. Example schema:

Using SQL Server Management Studio

SQL Server An Overview

IMS Users Group. The Right Change SQL-Based Middleware. Mike McKee CONNX Solutions.

A Rational Software Whitepaper

Oracle Database 10g Express

Add User to Administrators Group using SQL Lookup Table

Lab 2: PostgreSQL Tutorial II: Command Line

Developing Web Applications for Microsoft SQL Server Databases - What you need to know

Mini User's Guide for SQL*Plus T. J. Teorey

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

OLH: Oracle Loader for Hadoop OSCH: Oracle SQL Connector for Hadoop Distributed File System (HDFS)

INSTALLATION INSTRUCTIONS FOR THE STUDENT SAMPLE SCHEMA

SQL Tables, Keys, Views, Indexes

ITS410: Database Management

Tutorial: How to Use SQL Server Management Studio from Home

Web Application Development Using UML

Migrate Topaz databases from One Server to Another

Exercise Safe Commands and Audit Trail

A table is a collection of related data entries and it consists of columns and rows.

Setting up SQL Translation Framework OBE for Database 12cR1

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

CSC 443 Data Base Management Systems. Basic SQL

EECS 647: Introduction to Database Systems

Application note: Connecting the to a Database

MIGRATING TO AVALANCHE 5.0 WITH MS SQL SERVER

New York University Computer Science Department Courant Institute of Mathematical Sciences

Specops Command. Installation Guide

Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.

Object-Based Databases

Uploads from client PC's to mercury are not enabled for security reasons.

ISQL Reference Manual

StreamServe Persuasion SP5 Oracle Database

Using Temporary Tables to Improve Performance for SQL Data Services

Chapter 1: Introduction. Database Management System (DBMS)

Tutorial on Operations on Database using JDeveloper

LICENSE4J LICENSE ACTIVATION AND VALIDATION PROXY SERVER USER GUIDE

Database Assistant. Once Database Assistant is installed you must login to gain access to the database. Copyright 2009

SQL Server Instance-Level Benchmarks with DVDStore

OQ Analyst Web Service Interface Specifications. Version 2.0

types, but key declarations and constraints Similar CREATE X commands for other schema ëdrop X name" deletes the created element of beer VARCHARè20è,

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25)

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

MYOB EXO Business White Paper Aurora to EXO Business Migration Utility

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

Oracle Data Miner (Extension of SQL Developer 4.0)

SQL Injection January 23, 2013

Exposed Database( SQL Server) Error messages Delicious food for Hackers

Oracle Tutorial. Outline: Login to oracle server Create account Use SQL*PLUS Use SQL Developer (recommended)

MySQL Manager. User Guide. July 2012

Proficy* HMI/SCADA - ifix U SING SQL

Microsoft SQL connection to Sysmac NJ Quick Start Guide

Tutorial Database Testing using SQL

Create a Database Driven Application

PL/SQL Programming for.net Developers: Tips, Tricks, and Debugging

5 Simple Steps to Secure Database Development

4 Logical Design : RDM Schema Definition with SQL / DDL

PassMark Software BurnInTest Management Console. Quick start guide

EDI Process Specification

Acunetix Web Vulnerability Scanner. Getting Started. By Acunetix Ltd.

Tutorial on Relational Database Design

Video Administration Backup and Restore Procedures

Technology Foundations. Conan C. Albrecht, Ph.D.

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Published. Technical Bulletin: Use and Configuration of Quanterix Database Backup Scripts 1. PURPOSE 2. REFERENCES 3.

Backup/Restore MySQL Server

24 ottobre 2013.openerp.it XML-RPC vs Psycopg2 Dr. Piero Cecchi. OpenERP Analisi Prestazionale Python script XML-RPC vs Psycopg2

CREATE TABLE FUNCAO ( idfuncao INTEGER NOT NULL, DESCRICAO VARCHAR NULL, PRIMARY KEY(idFUNCAO) );

SQL. Short introduction

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded

MySQL Quick Start Guide

Using SQL Developer. Copyright 2008, Oracle. All rights reserved.

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7

Implementing the Shop with EJB

WEB BASED Access Control/Time Attendance Software Manual V 1.0

Using ODBC with MDaemon 6.5

Supplement IV.D: Tutorial for MS Access. For Introduction to Java Programming By Y. Daniel Liang


Backing up and restoring HP Systems Insight Manager 6.0 or greater data files in a Windows environment

Database Migration : An In Depth look!!

AUTHENTICATION... 2 Step 1:Set up your LDAP server... 2 Step 2: Set up your username... 4 WRITEBACK REPORT... 8 Step 1: Table structures...

Note: The where clause of the SUBSET statement is sent "as is" to Oracle, so it must contain correct Oracle syntax.

Spryng Making Business Mobile (0) Spryng Headquarters: Herengracht BW Amsterdam - The Netherlands

Using a Remote SQL Server Best Practices

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

CS346: Database Programming.

Uni Sales Analysis CRM Extension for Sage Accpac ERP 5.5

Oracle 10g PL/SQL Training

Transcription:

Relationship Diagram for Final Project: Name UserName Password Phone PortfolioID Portfolios 1,1) Maintain 0,M) Customers Address 0,M) Maintained by CustomerID Name QuantityTraded CostPerShare Are Contained In PurchaseDate TransactionID Location 0,M) OpenTime Stocks 1,1) 1,M) Trade Markets CompanyName Symbol 0,M) Traded On CloseTime MarketName Review Quarter Earnings Revenue 1,M) Name Analysts Phone AnalystID

Table Design: Functional Dependencies: Analyst.AnalystID, Analysis.Symbol, Analysis.Quarter Analysis.Earnings, Analysis.Revenue StockHistory.Symbol, StockHistory.Date, StockHistory.Time StockHistory.CostPerShare Market.MarketName Market.OpenTime, Market.CloseTime Customer.Name Customer.Phone Analyst.Name Analyst.PhoneNumber

SQL for Project Implementation: CONTENTS of Project Script # ------------ # -- # -- Final Project # -- November 28, 2005 # -- CPSC3375 - Database Concepts I # -- Sean J. Geoghegan, Ph.D. # -- Batch file for Table Setup & Data Load of Online Stock Management System # ------------ # Create Tables in SQLPLUS # Requires user/pass $1) information as a command line parameter: sqlplus $1 < /home/cpsc337505/project/sql/load.sql # ------------ # Load data into each individual table: sqlldr $1 control=/home/cpsc337505/project/ctl/markets.ctl sqlldr $1 control=/home/cpsc337505/project/ctl/stocks.ctl sqlldr $1 control=/home/cpsc337505/project/ctl/customers.ctl sqlldr $1 control=/home/cpsc337505/project/ctl/portfolio.ctl sqlldr $1 control=/home/cpsc337505/project/ctl/analyst.ctl sqlldr $1 control=/home/cpsc337505/project/ctl/analysis.ctl sqlldr $1 control=/home/cpsc337505/project/ctl/stock_history.ctl sqlldr $1 control=/home/cpsc337505/project/ctl/portfolio_contents.ctl # ------------ # Run Pre-Defined Queries sqlplus $1 < /home/cpsc337505/project/sql/query.sql # ------------ CONTENTS of load.sql set echo on spool /home/cpsc337505/project/log/load.log -- -- Final Project -- November 28, 2005 -- CPSC3375 - Database Concepts I -- Sean J. Geoghegan, Ph.D. -- Setup Online Stock Management System Tables -- Drop All Tables drop table PORTFOLIO_CONTENTS; drop table STOCKHISTORY; drop table ANALYSIS; drop table PORTFOLIO; drop table STOCKS; drop table MARKETS; drop table ANALYST; drop table CUSTOMERS; -- Create MARKETS Table create table MARKETS Market_Name varchar210), Street varchar250), City varchar230), State char2), Zip_Code char5),

Open_Time char5), Close_Time char5), primary keymarket_name) -- Create STOCKS Table create table STOCKS Symbol varchar25), Company_Name varchar230), Market_Name varchar210) references MARKETSMarket_Name) primary keysymbol) -- Create STOCKHISTORY Table create table STOCKHISTORY TransactionID integer, Symbol varchar25) references STOCKSSymbol) Epoch date, Cost_Per_Share float constraint costck checkcost_per_share > 0.0), Quantity_Traded integer constraint qtyck checkquantity_traded > 0), primary keytransactionid) -- Create CUSTOMERS Table create table CUSTOMERS CustomerID integer, Customer_Name varchar230), Street varchar250), City varchar230), State char2), Zip_Code char5), Phone char12), UserName varchar230), Password varchar216), primary keycustomerid) -- Create PORTFOLIO Table create table PORTFOLIO PortfolioID integer, Portfolio_Name varchar230), CustomerID integer references CUSTOMERSCustomerID) primary keyportfolioid)

-- Create PORTFOLIO_CONTENTS Table create table PORTFOLIO_CONTENTS PortfolioID integer references PORTFOLIOPortfolioID) TransactionID integer references STOCKHISTORYTransactionID) primary keytransactionid) -- Create ANALYST Table create table ANALYST AnalystID integer, Analyst_Name varchar230), Phone char12), primary keyanalystid) -- Create ANALYSIS Table create table ANALYSIS AnalystID integer references ANALYSTAnalystID) Symbol varchar25) references STOCKSSymbol) Quarter char6), Earnings float default 0.0, Revenue float default 0.0, primary keyanalystid, Symbol, Quarter) spool off set echo off CONTENTS of CTL Files -- MARKETS Table INFILE '/home/cpsc337505/project/data/markets.csv' INTO TABLE MARKETS Market_Name, Street, City, State, Zip_Code, Open_Time, Close_Time) -- STOCKS Table INFILE '/home/cpsc337505/project/data/stocks.csv' INTO TABLE STOCKS

Symbol, Company_Name, Market_Name) -- CUSTOMERS Table INFILE '/home/cpsc337505/project/data/customers.csv' INTO TABLE CUSTOMERS CustomerID, Customer_Name, Street, City, State, Zip_Code, Phone, UserName, Password) -- PORTFOLIO Table INFILE '/home/cpsc337505/project/data/portfolio.csv' INTO TABLE PORTFOLIO PortfolioID, Portfolio_Name, CustomerID) -- ANALYST Table INFILE '/home/cpsc337505/project/data/analyst.csv' INTO TABLE ANALYST AnalystID, Analyst_Name, Phone) -- ANALYSIS Table INFILE '/home/cpsc337505/project/data/analysis.csv' INTO TABLE ANALYSIS AnalystID, Symbol, Earnings, Revenue, Quarter) -- STOCK HISTORY Table INFILE '/home/cpsc337505/project/data/stockhistory.csv' INTO TABLE STOCKHISTORY TransactionID, Symbol, Epoch DATE "MM/DD/YYYY HH24:MI:SS", Cost_Per_Share, Quantity_Traded) -- PORTFOLIO CONTENT Table INFILE '/home/cpsc337505/project/data/port_content.csv' INTO TABLE PORTFOLIO_CONTENTS PortfolioID, TransactionID)