Command-line Oracle Logon to your ORACLE account using the instructions contained in this slideshow. Create the tables with your last name in place of.

Slides:



Advertisements
Similar presentations
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
Advertisements

Microsoft Word Basics. Introduction to Microsoft Word Microsoft Word is a word processor designed by Microsoft. A word processor is a computer application.
Access Lesson 2 Creating a Database
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
SQL components In Oracle. SQL in Oracle SQL is made up of 4 components: –DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE. Creates / Alters.
1 Chapter 2: Creating and Modifying Database Tables.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
1 Computing for Todays Lecture 16 Yumei Huo Fall 2006.
Creating Tables in a Web Site Using an External Style Sheet HTML5 & CSS 7 th Edition.
Customizing Forms and Writing QuickBooks Letters Lesson 15.
Using ER/Studio.
SQL Query Extras MIS 433. Rerunning the last Query n Type the forward slash “/” to rerun the last query that was entered.
1 Access Lesson 1 Microsoft Access Basics Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 ETSU Banner Schedule Building Executive Aide Banner Schedule Building Training By Laine Howard Associate Registrar.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
XP New Perspectives on Microsoft Access 2002 Tutorial 41 Microsoft Access 2002 Tutorial 4 – Creating Forms and Reports.
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.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
1 Access Lesson 1 Microsoft Access Basics Microsoft Office 2010 Introductory.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
Blackboard Connect 5 Training Session Presented by: Rebecca Castañeda, Director for Federal Programs August 13, 2015.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
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.
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.
Teacher’s Assessment Assistant Worksheet Builder Starting the Program
 Enter username and password into Novell screen.  Click “ok” and wait for desktop to load.  When desktop loads, open Microsoft Word using the icon.
Relationships and Advanced Query Concepts Using Multiple Tables Please use speaker notes for additional information!
Concepts of Database Management Seventh Edition
1 Creating and Modifying Database Objects. 2 An Oracle database consists of multiple user accounts Each user account owns database objects Tables Views.
Quick review of SQL And conversion to Oracle SQL.
Intro to SQL| MIS 2502  Spacing not relevant › BUT… no spaces in an attribute name or table name  Oracle commands keywords, table names, and attribute.
Personal Oracle8i Create a new user Create a new table Enter data into a new table Export & import data Start and exit SQL Plus SQL Plus Syntax.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
There are seven main components of a database in Access 2000: Tables. Use tables to store database information. Forms Use forms to enter or edit the information.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Lesson 10 - Mail Merge and Reviewing Documents Advanced Microsoft Word.
 The ribbon is the primary form of navigation in the Microsoft Office 2007 system.  There are seven Tabs on the Ribbon, more (contextual) tabs will.
Fall 2003Sylnovie Merchant, Ph.D. ACCESS Tutorial Note: The purpose of this tutorial is to provide an introduction to some of the functions of ACCESS in.
DataSet Your Database student test score Database Connection Your program needs to establish a connection to the database. Click on “Add New Data Source.”
IS 380 Introduction to SQL This lectures covers material from: database textbook chapter 3 Oracle chapter: 3,14,17.
How to Create an Address How to Create a Free Account, Read and Answer your s. Yahoo! provides FREE . To create a free .
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
1 Chapter 2: Creating and Modifying Database Objects.
Personal Oracle8i Create a new user Create a new table Enter data into a new table Export & import data Start and exit SQL Plus SQL Plus Syntax.
What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, Many.
Managing Database With Oracle Replacement for Ch10 COP 4708.
There are two types of MySQL instructions (Data Definition Language) DDL: Create database, create table, alter table,,,. (Data Manipulation Language) DML.
More Oracle SQL Scripts. Highlight (but don’t open) authors table, got o External data Excel, and make an external spreadsheet with the data.
Quick Introduction to HTML DB. Accessing HTML DB There are two ways to access HTML DB 1.In the ilearning curriculum, select the red boxed arrow that appears.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
CREATE TABLE ARTIST ( ArtistID int NOT NULL IDENTITY (1,1), Namechar(25) NOT NULL, TEXT ERROR Nationality char (30) NULL, Birthdate numeric (4,0) NULL,
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Installation Oracle 11g Express 2 double click the "setup" button to install the Oracle.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
CSC 240 (Blum)1 Introduction to Oracle. CSC 240 (Blum)2 Start/Programs/Oracle – OraHome 90/ Application Development/SQL Plus.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 4 1 Microsoft Office Access 2003 Tutorial 4 – Creating Forms and Reports.
3 A Guide to MySQL.
, MS-Access, QBE, Access/Oracle
Using SQL*Plus.
Chapter 7 Working with Databases and MySQL
FormTrap Design Tutorial
Chapter 2: Creating And Modifying Database Tables
Presentation transcript:

Command-line Oracle Logon to your ORACLE account using the instructions contained in this slideshow. Create the tables with your last name in place of Smith (no spaces in table names)

Click on Start and enter cmd into search and hit Enter.

Click on the menu at the top and choose Properties from the drop-down list

Under the Colors tab, change the background color to white.

Under the Colors tab, change the screen text color to black.

Under the Layout tab, make the widths 120. Click OK.

Use the title command, to give your Command Window a title.

Enter the sqlplus command sqlplus In the example above scott is the username. Your username should be your usual La Salle username. In the example above tiger is the password. Your password should be the first three letters of your username followed by an underscore followed by your La Salle id number (e.g. smi_ )

Result so far.

Start Notepad by entering notepad into the start search box

Enter the SQL DDL (Data Definition Language) code for creating a table

DDL Reminder CREATE TABLE is the SQL for making a new table, it should have a unique name CHAR(6) means that the ArtistID must be 6 characters long NOT NULL means that each record must have an ArtistID VARCHAR(30) means that the ArtFName can be up to 30 characters long

Copy the code written in Notepad and use the command prompt’s Edit/Paste to enter the code into SQLPLUS

Recommendation I recommend making a txt file with examples of all of the different types of SQL commands including the log on. You will be able to use it on any test we have involving Oracle. It will speed things up.

Code to get rid of table if you made a mistake

You can also change your table structure using the ALTER TABLE SQL command

The command describe table_name shows the fields and their and types.

Use the SQL command INSERT to add a new record.

Use SQL SELECT command to see record in table

Use SQL’s set linesize and set pagesize

SQL Display commands SET LINESIZE 300 makes the width of the line displaying the results of an SQL command 300 characters long SET PAGESIZE 0 makes the height of a page displaying the results of an SQL command “infinitely long”.

Insert another record

Create another table.

CREATE TABLE Smith_WorkOfArt( WorkID CHAR(6) NOT NULL, WorkTitle VARCHAR(60), WorkMedium VARCHAR(30), ArtistID CHAR(6), PRIMARY KEY (WorkID), FOREIGN KEY (ArtistID) REFERENCES Smith_Artist);

SQL DDL to establish foreign key The last line FOREIGN KEY (ArtistID) REFERENCES Smith_Artist); establishes that the field ArtistID in the SmithWorkOrArt table is a foreign key that comes from the table Smith_Artist.

Enter data into WorkOfArt table

Query to show art works

Query joining artworks and artists SELECT Smith_WorkOfArt.WorkTitle, Smith_Artist.ArtFName, Smith_Artist.ArtLName FROM Smith_WorkOfArt INNER JOIN Smith_Artist ON Smith_WorkOfArt.ArtistID = Smith_Artist.ArtistID;

A variation on the query joining artworks and artists SELECT Smith_WorkOfArt.WorkTitle, Smith_Artist.ArtFName, Smith_Artist.ArtLName FROM Smith_WorkOfArt, Smith_Artist WHERE Smith_WorkOfArt.ArtistID = Smith_Artist.ArtistID; Instead of INNER JOIN between table names and ON before condition, one can use a comma between table names and a WHERE before condition

Exit for SQL

The SELECT * FROM TAB shows the user’s tables

Insert another record of artist data and Close (Not Exit)

Get back in and query the artist table, where’s Paul Gauguin?

INSERT again, then COMMIT, then close

This time Paul Gauguin survives

INSERT a new artist, then ROLLBACK, then query artists table

INSERT two artists, ROLLBACK, then query artist table Both new rows disappear, rollback gets rid of things up to the last commit.

Create a table, rollback, do a select query on the tab table FAKE appears despite rollback, creates cannot be rolled back.

Redo ArtWork-Artist join query as RIGHT JOIN Recall a RIGHT JOIN is a type of OUTER JOIN and will keep records that don’t have a math in the other table – in this case we have no art work by Paul Gauguin but he appears in the query results above.

Second version of outer join In this version you place (+) next to the field that you may not have. We may not have the ArtistID in the WorkOfArt table, but we still want to keep the artist.