1 Very basics on DB access Elke A. Rundensteiner.

Slides:



Advertisements
Similar presentations
What is MySQL? MySQL is a relational database management system (A relational database stores data in separate tables rather than putting all the data.
Advertisements

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.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
CS34311 CS3431 – Database Systems I Project Overview Elke A. Rundensteiner.
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Laboratory 1: Introduction to Relational.
CS34311 CS3431 – Database Systems I Project Overview Murali Mani.
SQL - Intro Pepper. Tools Terminal Emulator for telnet: –Panther.ssh here –Tera Term
7/2/2015Murali Mani -- CS5421 Database Management Systems DB Application Development Project Statement + Introduction to Oracle.
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.
Oracle SQL*plus John Ortiz. Lecture 10SQL: Overview2 Overview  SQL: Structured Query Language, pronounced S. Q. L. or sequel.  A standard language for.
Oracle Tutorial (CS4347) TA Information –Name: Lidong Wu – –Office Hour:Tu. 3pm-4pm & Fr.
DB Audit Expert v1.1 for Oracle Copyright © SoftTree Technologies, Inc. This presentation is for DB Audit Expert for Oracle version 1.1 which.
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.
INTERNET APPLICATION DEVELOPMENT For More visit:
ASP.NET Programming with C# and SQL Server First Edition
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
CS450 HW2Page 1 Homework #2  Due the midnight of April 15th.  100 Points  In this homework, you create an SQL script to build the MOVIES database according.
Information Systems Today (©2006 Prentice Hall) MySQL 1CS3754 Class Note #8, Is an open-source relational database management system 2.Is fast and.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
© 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.
Introduction to MySQL Lab no. 10 Advance Database Management System.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Chapter 5 MYSQL Database. Introduction to MYSQL MySQL is the world's most popular open-source database. Open source means that the source code, the programming.
A Brief Documentation.  Provides basic information about connection, server, and client.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
DATABASE TOOLS CS 260 Database Systems. Overview  Database accounts  Oracle SQL Developer  MySQL Workbench.
1 More basics on DB access Elke A. Rundensteiner.
Introduction to Taverna Online and Interaction service Aleksandra Pawlik University of Manchester.
Chapter 8 Manipulating MySQL Databases with PHP PHP Programming with MySQL 2 nd Edition.
© 2007 by Prentice Hall2-1 Introduction to Oracle 10g Chapter 2 Overview of SQL and SQL*Plus James Perry and Gerald Post.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
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.
1 Very basics on DB access CS Nov DBMS? Oracle Accounts already created Documentation: mySQL: To create an account,
Intro To Oracle :part 1 1.Save your Memory Usage & Performance. 2.Oracle Login ways. 3.Adding Database to DB Trees. 4.How to Create your own user(schema).
Settings MySQL Database and JDBC configuration Instructor: Sergey Goldman.
Oracle Query VBA Tool (OQVT)
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
Introduction to Oracle  Oracle Database XE, APEX and Oracle SQL Developer.
Software-Projekt 2008 Seminarvortrag“Short tutorial of MySql“ Wei Chen Verena Honsel.
D Copyright © 2009, Oracle. All rights reserved. Using SQL*Plus.
Dept. of Computer & Information Sciences
3 A Guide to MySQL.
Fundamental of Databases
Welcome POS Synchronize Concept 08 Sept 2015.
, MS-Access, QBE, Access/Oracle
CS320 Web and Internet Programming SQL and MySQL
SQL and SQL*Plus Interaction
Using SQL*Plus.
Andy Wang Object Oriented Programming in C++ COP 3330
Chapter 1 Introduction.
Introduction to MySQL.
Basics on DB access Elke A. Rundensteiner.
Database application MySQL Database and PhpMyAdmin
Using SQL Server through Command Prompt
MySQL Working on Turing.
Using SQL*Plus.
ORACLE SQL Developer & SQLPLUS Statements
Chapter 8 Working with Databases and MySQL
Chapter 1 Introduction.
CS1222 Using Relational Databases and SQL
Chapter 1 Introduction.
Tutorial 6 PHP & MySQL Li Xu
Using SQL*Plus.
CS3220 Web and Internet Programming SQL and MySQL
CS3220 Web and Internet Programming SQL and MySQL
Presentation transcript:

1 Very basics on DB access Elke A. Rundensteiner

2 DBMS? Oracle Accounts already created Documentation: mySQL: To create an account, visit Documentation: Many other DBMS engines out there

3 Oracle Version at WPI The oracle server SID is WPI11GR2 (or, CS) Version: 11g (64 bit version) System name is oracle.wpi.edu port is #1521 Problems: user names cannot have a “.” in them.

How to set up path for Oracle If you use CCC linux systems, then you need to source /usr/local/bin/csoraenv file to setup your shell to use oracle On CCC, if your shell is set to /bin/tcsh, then run : source /usr/local/bin/csoraenv On CCC, if your shell is set to /bin/bash, then run : source /usr/local/bin/oraenv To figure out what the type of shell that you use, type: echo $SHELL From your shell prompt, type : echo $PATH 4

5 How to set up Oracle Or, set environment variables by adding the needed settings into your.cshrc file on the ccc.wpi.edu machine (which gets sourced automatically when you log on). setenv ORACLE_BASE /usr/local/oracle11gr203 setenv ORACLE_HOME /usr/local/oracle11gr203/product/11.2.0/db_1 setenv PATH ${PATH}:${ORACLE_HOME}/bin setenv ORACLE_SID WPI11GR2 setenv TWO_TASK ${ORACLE_SID}

6 How to set up Oracle Or, set environment variables by adding the needed settings into your.cshrc file on the ccc.wpi.edu machine (which gets sourced automatically when you log on). setenv ORACLE_BASE /usr/local/oracle11gr203 setenv ORACLE_HOME /usr/local/oracle11gr203/product/11.2.0/db_1 setenv PATH ${PATH}:${ORACLE_HOME}/bin setenv ORACLE_SID WPI11GR2 setenv TWO_TASK ${ORACLE_SID}

7 How to set up Oracle If in tcsh or csh shell, your.cshrc file would be: setenv ORACLE_BASE /usr/local/oracle11gr203 setenv ORACLE_HOME ${ORACLE_BASE}/product/11.2.0/db_1 setenv PATH ${PATH}:${ORACLE_HOME}/bin setenv ORACLE_SID WPI11GR2 setenv TWO_TASK WPI11GR2 setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib

8 How to set up Oracle If in bash shell, your.cshrc file would be: setenv ORACLE_BASE=/usr/local/oracle11gr203 setenv ORACLE_HOME=${ORACLE_BASE}/product/11.2.0/db_1 setenv PATH=${PATH}:${ORACLE_HOME}/bin setenv ORACLE_SID=WPI11GR2 setenv TWO_TASK=WPI11GR2 setenv LD_LIBRARY_PATH=${ORACLE_HOME}/lib

9 How to set up Oracle (contd…) If your path is empty, then add one additional line, as below, on top of your.cshrc file : setenv PATH. The rest is as on previous slide

10 How to set up Oracle After editing the file “.cshrc “ Please run below: or log out and back in: source.cshrc Or, log out and back in.

11 Problems while setting up Oracle Important – Set up Oracle immediately and see that it is working you may run into problems, typically due to simple typos or minor setup issues If you have identified a project partner, start working with him/her on this to help each other If you get really stuck, please send a message to mywpi to show a screen-dump of what happens.

12 Oracle introduction Connecting sqlplus / Change passwd using password command You will end up submitting your passwd; therefore don’t use password that you use for other purposes.

13 Oracle useful commands These commands can be executed from SQL shell SELECT * FROM cat; -- lists tables you have created SELECT table_name FROM user_tables; -- as above. DESCRIBE ; -- describes schema for table with name tableName help index; -- shows list of help topics; help start; -- illustrates how to use command start exit; -- exit from SQL shell

14 Using Oracle from Windows Multiple ways: Use aquastudio software from aquafold.com. connect to -- server: oracle.wpi.edu port: 1521 (this is the default) SID: WPI11GR2 Download oracle client for windows. Connect using sqlplus client or other tools: sqlplus

15 Working with the Data Server

16 Basic SQL Commands CREATE TABLE student(sNum INTEGER,sName VARCHAR (30)); -- creates table student with two columns INSERT INTO student VALUES (1, ‘Joe’); -- insert one row into the student table SELECT * FROM student; -- select all rows from student table DELETE FROM student; -- delete all rows in the student table DROP TABLE student; -- drop student table Purge recyclebin; -- purge recyclebin tables that get created. -- Only works if you are logged onto CCC1

17 Saving your Interactive Session in SQLPlus If you want to save your output to a file (for homework) spool spool off;