Premium Essay

Assignment 3: Oracle Table and Query

In:

Submitted By davidknowles1981
Words 491
Pages 2
Assignment 3: Oracle Table and Query
Arthur David Knowles
Professor Murnane
CIS 111
Strayer University

10, 29, 2012

Assignment 3: Oracle Table and Query Today we are going to learn how to do a couple basic things within Oracle. We are going to create a table with three columns and we are going to input five records into it. When we are all done you will be able to create a table, insert data and use a query to find the data. Now let us get started! First launch the putty application and open the one for our class that we created week one. Sign into Oracle until you reach the prompt that reads SQL>. For this example I am going to use NFL quarterbacks for our table creation. Once you have arrived at the SQL prompt type in the following command line, create table NFLQBS ( , then hit enter, you should see a 2 on the left side, on the following lines we will create the columns. On line 2 type in, Player_Team varchar(30), then hit enter. On line 3 type in Player_Name varchar(30), hit enter again. Then on line 4 type in Player_Number varchar(5); and hit enter. If done correctly it should read, “Table Created”. The picture above shows where we should be. I will now explain a few of the things we just did in detail. First command we used was Create Table, this is used to create the base table that forms the heart of our relational database. The number in parentheses is used to set how many character can be used in that column. Now we will move onto inserting the data into our table. To do this we will use the insert command which allows us to put new records into the table. I will show you how to input one record into the table then I want you to do it five times and five different records. We will use the following command line. At the SQL prompt type in, Insert into NFLQBS (Player_Team, Player_Name, Player_Number) Values (‘Dallas Cowboys’, ‘Tony

Similar Documents

Premium Essay

Cis 515 Assignment 2

...CIS 515 ASSIGNMENT 2 To purchase this visit following link: https://coursehomework.com/product/cis-515-assignment-2/ Contact us at: HELP@COURSEHOMEWORK.COM CIS 515 ASSIGNMENT 2 CIS515 Assignment 2: Database Systems and Database Models Instant Download Due Week 2 and worth 90 points The Strayer Oracle Server may be used to test and compile the SQL Queries developed for this assignment. Your instructor will provide you with login credentials to a Strayer University maintained Oracle server. Imagine that you have been hired as a consultant to assist in streamlining the data processing of an international based organization that sells high-end electronics. The organization has various departments such as payroll, human resources, finance, marketing, sales, and operations. The sales department is the only department where employees are paid a commission in addition to their yearly salary and benefits. All other departments compensate their employees with a yearly salary and benefits only. Commission is paid by multiplying the employee’s commission rate by the total amount of product units sold. You have access to the following data sets: • Employee (EmpNumber, EmpFirstName, EmpLastName, CommissionRate, YrlySalary, DepartmentID, JobID) • Invoice (InvNumber, InvDate, EmpNumber, InvAmount) • InvoiceLine (InvLineNumber, InvNumber, ProductNumber, Quantity) • Product (ProductNumber, ProductDescription, ProductCost) • Department (DepartmentID, DepartmentDescription) • Job...

Words: 494 - Pages: 2

Premium Essay

Assignment 5

...This assignment helps you understand what table columns deserve an index through a series of exercises on a database schema. You do not type SQL in this assignment, but rather identify which columns deserve indexes, the type of index it deserves, and why. Correct placement of indexes is absolutely critical to database performance. All but the smallest of databases would have terrible performance if no indexes were assigned to any of its table columns. An index is a physical construct that serves two purposes – speeding up data retrieval and enforcing uniqueness. Indexes are not modeled in logical entity-relationship diagrams, because indexes do not operate at the logical level of abstraction, as do tables and table columns. While the primary purpose of creating an index is to speed up data access, modern relational DBMS also support a type of index that additionally enforces a uniqueness constraint. A uniqueness constraint can be assigned to a table column directly, or is indirectly assigned to a table column when it is assigned a primary key constraint. While a uniqueness constraint is a logical construct, many modern relational DBMS physically implement this constraint through an index. You might reasonably ask the question, “Why not simply add indexes to every column in the schema?” After all, then we would not need to concern ourselves with index placement. The primary reason is that while indexes speed up reading from the database, indexes slow down writing to the database...

Words: 1460 - Pages: 6

Premium Essay

Databases: Identifying Index Placement

...This assignment helps you understand what table columns deserve an index through a series of exercises on a database schema. You do not type SQL in this assignment, but rather identify which columns deserve indexes, the type of index it deserves, and why. Correct placement of indexes is absolutely critical to database performance. All but the smallest of databases would have terrible performance if no indexes were assigned to any of its table columns. An index is a physical construct that serves two purposes – speeding up data retrieval and enforcing uniqueness. Indexes are not modeled in logical entity-relationship diagrams, because indexes do not operate at the logical level of abstraction, as do tables and table columns. While the primary purpose of creating an index is to speed up data access, modern relational DBMS also support a type of index that additionally enforces a uniqueness constraint. A uniqueness constraint can be assigned to a table column directly, or is indirectly assigned to a table column when it is assigned a primary key constraint. While a uniqueness constraint is a logical construct, many modern relational DBMS physically implement this constraint through an index. You might reasonably ask the question, “Why not simply add indexes to every column in the schema?” After all, then we would not need to concern ourselves with index placement. The primary reason is that while indexes speed up reading from the database, indexes slow down writing to the database...

Words: 2196 - Pages: 9

Premium Essay

Paper

...Copyright © Oracle Corporation, 2000, 2001. All rights reserved. This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: Restricted Rights Legend Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). This material or any portion of it may not be copied in any form or by any means without the express prior written permission of Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties. If this documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with “Restricted Rights,” as defined in FAR 52.227-14, Rights in Data-General, including Alternate III (June 1987). The information in this document is subject to change without notice. If you find any problems in the documentation, please report them in writing to Education Products, Oracle Corporation...

Words: 33172 - Pages: 133

Premium Essay

Sql Plus

...Introduction to Oracle9i: SQL Instructor Guide • Volume 1 40049GC11 Production 1.1 October 2001 D33993 Authors Copyright © Oracle Corporation, 2000, 2001. All rights reserved. Nancy Greenberg Priya Nathan This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: Technical Contributors and Reviewers Josephine Turner Martin Alvarez Anna Atkinson Don Bates Marco Berbeek Andrew Brannigan Restricted Rights Legend Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). This material or any portion of it may not be copied in any form or by any means without the express prior written permission of Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties. Laszlo Czinkoczki Michael Gerlach Sharon Gray Rosita Hanoman Mozhe Jalali Sarah Jones Charbel Khouri ...

Words: 33197 - Pages: 133

Premium Essay

Database

...principles to fully utilize the organizational role of information technology. This course provides core skills of data management for the relational database management systems. This course will review the theoretical concepts and applications of a modern relational database management system. In addition to a basic theoretical presentation of the database design concepts, students will be required to design and develop a database application using a modern fourth generation language system. This course teaches students data modeling and design techniques and how to transform data models into database designs. Another basic component of this course is the use of SQL – Structured Query Language. Students will also learn how to create databases, modify databases, and develop queries using SQL. In addition, this course also teaches the management of database resources in an organization. Course Learning...

Words: 1374 - Pages: 6

Free Essay

Essay

...Oracle Assignment – with Solution Images Query 1: List all fields, all rows of data from the Position table Query 2: List all Detroit Red Wings players who have scored more than 10 points this season. Display the player’s name, points and assists. Sort the data in descending order by points. Query 3: Who are the top team players in the Metro division? To answer that question, list all players in the Metro Division who have 7 or more assists. Display the player’s name, the player’s team id, the team name, assists, goals and points. Order the data in descending sequence by assists and then by team name. Query 4: What is the total weekly payroll of the NHL and what is the estimated total payroll of the season (assuming an 80 game season)? Use the PayPerGame field from the player table. Display totals as currency. Notice currency format Query 5: What is the total weekly payroll of Chicago, Dallas, Detroit and Columbus? Display the team name, team id, and total weekly payroll and the estimated total payroll of the season (assuming an 80 game season). Order the results by team name. Hint: Use the IN operator to select the teams. Display totals as currency. Notice currency format Query 6: Display the number (count) of players by division and position. Only display those rows with a count of players > 50. Query 7: Display all teams with a team Shot percentage > 10%. Even though each player has a stat for their shotPct (#goals / #shots), it is, mathematically...

Words: 466 - Pages: 2

Free Essay

Information Flow of Standard Bank Ltd.

...TERM PAPER ON Information System of Standard Bank Limited [pic] Submitted To: Dr. Md. Mosharraf Hossain Professor Department of Management University of Dhaka Submitted By: Sabbir Ahmed 3-11-21-065 Department of Management University of Dhaka Date of Submission 09.11.2014 Preface Theoretical knowledge, what we learn through our academic activities, is not sufficient to prepare ourselves for the life battle. Academic knowing is needed to be backed up by practical experience. In business studies, besides their usual theoretical course works, students are required to fulfill some practical assignments which are set by the course teachers to examine the depth of knowledge learned by the students. Most of the time, the students are required to study a practical working environment of any organization or industry to critically examine ‘what is actually going on’ in the real world.    This document is prepared as a result of an assignment set by the honorable course teacher of the course “Fundamental of MIS”. .My duty was to describe “Information System of My Organization.” and report what I found. This is how this assignment paper titled “Information System of Standard Bank Limited.” was emerged. I believe this paper is a reflection of accumulation of my effort, learning and dedication. Letter of Transmittal November 8, 2014 Dr. Mosharraf Hossain Professor MBA (Evening) Program Department...

Words: 1837 - Pages: 8

Premium Essay

Oracle Sql Tutorial

...Oracle/SQL Tutorial1 Michael Gertz Database and Information Systems Group Department of Computer Science University of California, Davis gertz@cs.ucdavis.edu http://www.db.cs.ucdavis.edu This Oracle/SQL tutorial provides a detailed introduction to the SQL query language and the Oracle Relational Database Management System. Further information about Oracle and SQL can be found on the web site www.db.cs.ucdavis.edu/dbs. Comments, corrections, or additions to these notes are welcome. Many thanks to Christina Chung for comments on the previous version. Recommended Literature George Koch and Kevin Loney: Oracle8 The Complete Reference (The Single Most Comprehensive Sourcebook for Oracle Server, Includes CD with electronic version of the book), 1299 pages, McGraw-Hill/Osborne, 1997. Michael Abbey and Michael Corey: Oracle8 : A Beginner’s Guide [A Thorough Introduction for First-time Users], 767 pages, McGraw-Hill/Osborne, 1997. Steven Feuerstein, Bill Pribyl, Debby Russell: Oracle PL/SQL Programming (2nd Edition), O’Reilly & Associates, 1028 pages, 1997. C.J. Date and Hugh Darwen: A Guide to the SQL Standard (4th Edition), Addison-Wesley, 1997. Jim Melton and Alan R. Simon: Understanding the New SQL: A Complete Guide (2nd Edition, Dec 2000), The Morgan Kaufmann Series in Data Management Systems, 2000. 1 revised Version 1.01, January 2000, Michael Gertz, Copyright 2000. Contents 1. SQL – Structured Query Language 1.1. Tables 1.2. Queries (Part I) 1.3. Data Definition...

Words: 21631 - Pages: 87

Premium Essay

Asignment

...Oracle® Database Concepts 10g Release 2 (10.2) B14220-02 October 2005 Oracle Database Concepts, 10g Release 2 (10.2) B14220-02 Copyright © 1993, 2005, Oracle. All rights reserved. Primary Author: Michele Cyran Contributing Author: Paul Lane, JP Polk Contributor: Omar Alonso, Penny Avril, Hermann Baer, Sandeepan Banerjee, Mark Bauer, Bill Bridge, Sandra Cheevers, Carol Colrain, Vira Goorah, Mike Hartstein, John Haydu, Wei Hu, Ramkumar Krishnan, Vasudha Krishnaswamy, Bill Lee, Bryn Llewellyn, Rich Long, Diana Lorentz, Paul Manning, Valarie Moore, Mughees Minhas, Gopal Mulagund, Muthu Olagappan, Jennifer Polk, Kathy Rich, John Russell, Viv Schupmann, Bob Thome, Randy Urbano, Michael Verheij, Ron Weiss, Steve Wertheimer The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement...

Words: 199783 - Pages: 800

Premium Essay

Mr. 893723974

...CHAPTER 6 Introduction to SQL LEARNING OBJECTIVES After studying this chapter, you should be able to: ■ Concisely define each of the following key terms: relational DBMS (RDBMS), catalog, schema, data definition language (DDL), data manipulation language (DML), data control language (DCL), scalar aggregate, vector aggregate, base table, virtual table, dynamic view, and materialized view. ■ ■ ■ ■ ■ Visit www.pearsonhighered.com/ hoffer to view the accompanying video for this chapter. Interpret the history and role of SQL in database development. Define a database using the SQL data definition language. Write single-table queries using SQL commands. Establish referential integrity using SQL. Discuss the SQL:1999 and SQL:2008 standards. INTRODUCTION Pronounced “S-Q-L” by some and “sequel” by others, SQL has become the de facto standard language for creating and querying relational databases. (Can the next standard be the sequel to SQL?) The primary purpose of this chapter is to introduce SQL, the most common language for relational systems. It has been accepted as a U.S. standard by the American National Standards Institute (ANSI) and is a Federal Information Processing Standard (FIPS). It is also an international standard recognized by the International Organization for Standardization (ISO). ANSI has accredited the International Committee for Information Technology Standards (INCITS) as a standards development organization; INCITS is working on the next version...

Words: 22483 - Pages: 90

Premium Essay

Study Guide

...® OCA Oracle Database 11g: SQL Fundamentals I Exam Guide (Exam 1Z0-051) ABOUT THE AUTHORS John Watson (Oxford, UK) works for BPLC Management Consultants, teaching and consulting throughout Europe and Africa. He was with Oracle University for several years in South Africa, and before that worked for a number of companies, government departments, and NGOs in England and Europe. He is OCP qualified in both database and Application Server administration. John is the author of several books and numerous articles on technology and has 25 years of experience in IT. Roopesh Ramklass (South Africa), OCP, is an independent Oracle specialist with over 10 years of experience in a wide variety of IT environments. These include software design and development, systems analysis, courseware development, and lecturing. He has worked for Oracle Support and taught at Oracle University in South Africa for several years. Roopesh is experienced in managing and executing IT development projects, including infrastructure systems provisioning, software development, and systems integration. About the Technical Editor Bruce Swart (South Africa) works for 2Cana Solutions and has over 14 years of experience in IT. Whilst maintaining a keen interest for teaching others, he has performed several roles including developer, analyst, team leader, administrator, project manager, consultant, and lecturer. He is OCP qualified in both database and developer roles. He has taught at Oracle University...

Words: 150089 - Pages: 601

Premium Essay

Computer Hardware

...Introduction to Structured Query Language This page is a introductory tutorial of the Structured Query Language (also known as SQL) and is a pioneering effort on the World Wide Web, as this is the first comprehensive SQL tutorial available on the Internet. SQL allows users to access data in relational database management systems, such as Oracle, Sybase, Informix, Microsoft SQL Server, Access, and others, by allowing users to describe the data the user wishes to see. SQL also allows users to define the data in a database, and manipulate that data. This page will describe how to use SQL, and give examples. The SQL used in this document is "ANSI", or standard SQL, and no SQL features of specific database management systems will be discussed until the "Nonstandard SQL" section. It is recommended that you print this page, so that you can easily refer back to previous examples. Also, you may be interested in joining the new SQL Club on Yahoo!, where you can read or enter messages in a SQL forum. Table of Contents Basics of the SELECT Statement Conditional Selection Relational Operators Compound Conditions IN & BETWEEN Using LIKE Joins Keys Performing a Join Eliminating Duplicates Aliases & In/Subqueries Aggregate Functions Views Creating New Tables Altering Tables Adding Data Deleting Data Updating Data Indexes GROUP BY & HAVING More Subqueries EXISTS & ALL UNION & Outer Joins Embedded SQL Common SQL Questions Nonstandard SQL Syntax Summary Exercises Important Links Basics...

Words: 11641 - Pages: 47

Premium Essay

Sql Lab 4

... While this lab shows you how to create and use  these constructs in SQL, the lab does not explain in full the theory behind the  constructs, as does the lecture and textbook.    The second section in this lab builds on Lab 3. It is best to complete Lab 3 first before  completing the second section in this lab.  Required Software  The examples in this lab will execute in modern versions of Oracle and Microsoft SQL  Server as is. Note that the first section in this lab has syntax specific to each DBMS,  and you will need to complete the version for the DBMS you are using. If you are  using a different RDBMS, you may need to modify the SQL for successful execution.  Saving Your Data  If you choose to perform portions of the assignment in different sittings, it is  important to commit your data at the end of each session. This way, you will be sure  to make permanent any data changes you have made in your curent session, so that  you can resume working without issue in your next session. To do so, simply issue  this command:    COMMIT; Data changes in one session will only be visible only in that session, unless they are  committed, at which time the changes are made permanent in the database.  Lab Completion  Use the submission template provided in the assignment inbox to complete this lab.  Page 1 of 25  Copyright 2013‐2016 Boston University. All Rights Reserved.    Lab Overview    Modern relational DBMS natively support a procedural...

Words: 6758 - Pages: 28

Premium Essay

Google Adsense

...TASK 3 Group 3 Asfand Nouman 60009140 Tuyet Nhung Duong 60007520 Kawther N S A S M Al Housaini 60011762 Van NhoTran 60008381 Harpreet Singh Brar 60010771 Week 4: Chapter 5 Lab & Assignment Task 3 (Due Week 7) As we now know, Reginald Phyne runs a restaurant. Reginald is a good businessman, but he wants to know more about how he can run his business more efficiently. He understands how to keep records and make reports, but with his current manual systems record-keeping and reporting take too long. He wants some advice on how a DBMS can improve the running of his business. A. Reginald has been using spreadsheets to manage his business data and records. Compare the advantages and disadvantages of using a DBMS compared with using spreadsheets. Is a DBMS better than spreadsheets? Why? DBMS is a data base management system used to store large some of data and to update them as you go. It also enable the user to create different queries, generate reports and to make graphs(Kroenke et al, 2013). DBMS have many advantages for businesses such as: ·         DBMS is more user friendly as compared to spreadsheet it gave the user more readymade tools. ·         User can create relationships between different tables and can extract information from them more easily. ·         It ask the user for input and can extract data as the user want from the database user don’t have to explore the whole database. DBMS is being used in air flight reservation, automated teller machines...

Words: 1588 - Pages: 7