Basics on DB access Elke A. Rundensteiner.

Slides:



Advertisements
Similar presentations
Oracle 10g Express. Download Oracle 10g Express Oracle 10g Express Edition: – edition/overview/index.htmlhttp://
Advertisements

UIC Data Conversion and Submission via CDX Node Client UIC Database V2 6/16/
What is MySQL? MySQL is a relational database management system (A relational database stores data in separate tables rather than putting all the data.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
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.
Internet Applications: Telnet, Ping and Traceroute.
Manipulating MySQL Databases with PHP. PHP and mySQL2 Objectives Connect to MySQL from PHP Learn how to handle MySQL errors Execute SQL statements with.
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.
1 Table Alteration. 2 Altering Tables Table definition can be altered after its creation Adding columns Changing columns’ definition Dropping columns.
CS34311 CS3431 – Database Systems I Project Overview Murali Mani.
7/2/2015Murali Mani -- CS5421 Database Management Systems DB Application Development Project Statement + Introduction to Oracle.
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:
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
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.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
Introduction to MySQL Lab no. 10 Advance Database Management System.
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
Most information comes from Chapter 3, MySQL Tutorial: 1 MySQL: Part.
A Brief Documentation.  Provides basic information about connection, server, and client.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting MySQL – Inserting Data.
Introduction to MySQL MySQL Overview by Ray Williams CS 320/565 Marymount University.
DATABASE TOOLS CS 260 Database Systems. Overview  Database accounts  Oracle SQL Developer  MySQL Workbench.
1 More basics on DB access Elke A. Rundensteiner.
1 Very basics on DB access Elke A. Rundensteiner.
Introduction to Taverna Online and Interaction service Aleksandra Pawlik University of Manchester.
SQL has several parts: Major ones: DDL – Data Definition Language {Defining, Deleting, Modifying relation schemas} DML – Data Manipulation Language {Inserting,
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
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.
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
2nd year Computer Science & Engineer
3 A Guide to MySQL.
Fundamental of Databases
Welcome POS Synchronize Concept 08 Sept 2015.
CS1010: Intro Workshop.
CS320 Web and Internet Programming SQL and MySQL
SQL and SQL*Plus Interaction
Using SQL*Plus.
Chapter 1 Introduction.
Introduction to MySQL.
SQL in Oracle.
Bomgar Remote support software
Using SQL*Plus.
FTP and UNIX TOPICS Exploring your Web Hosting Site FTP UNIX
ORACLE SQL Developer & SQLPLUS Statements
IS 220 Databases Fundamentals
Chapter 8 Working with Databases and MySQL
Chapter 1 Introduction.
CS1222 Using Relational Databases and SQL
CSE 491/891 Lecture 21 (Pig).
Radoslaw Jedynak, PhD Poland, Technical University of Radom
Chapter 1 Introduction.
CPAN 260 Relational Database Design and SQL
Tutorial 6 PHP & MySQL Li Xu
Using SQL*Plus.
CS3220 Web and Internet Programming SQL and MySQL
Yung-Hsiang Lu Purdue University
CS3220 Web and Internet Programming SQL and MySQL
Turn on spool and save to file a.txt
Presentation transcript:

Basics on DB access Elke A. Rundensteiner

DBMS? Oracle mySQL: Many other DBMS engines out there Accounts already created Documentation: http://www.oracle.com mySQL: You would need to create an account via CCC Documentation: http://www.mysql.com Many other DBMS engines out there

Oracle Your accounts on Oracle are ready : Upper case user names cannot have a “.” in them. Must log into CCC to ccc.wpi.edu source /cs/bin/oracle-setup

Oracle Version at WPI Version: 12.1.0.2.0 The oracle server SID is ORCL Version: 12.1.0.2.0  host name is oracle.wpi.edu port is #1521

Problems while setting up Oracle you may run into problems, typically due to typos or minor setup issues If you get really stuck, please send a message to CANVAS to show a screen-dump of what happens.

Oracle introduction Connecting sqlplus <userName>/<PASSWORD> sqlplus rundenst@cs Change passwd using password command You may end up submitting your passwd; Therefore don’t use password that you use for other purposes.

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 <tableName>; -- 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

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: ORCL Download oracle client for windows. Connect using sqlplus client or other tools: sqlplus rundenst/rundenst@//oracle.wpi.edu:1521/cs.wpi.edu

Working with the Data Server

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

Running scripts in SQLPlus To enter OS environment, use sqlplus command: Host Now you can execute OS commands, like : cd.. , exit, etc.

Running scripts in SQLPlus Create a file in your file system in the current directory called : createTable.sql @createTable -- executes the script start createTable -- also executes the script If you want to save your output to a file (similar to script in Unix): spool <fileName> <executeCmds...> spool off;

Loading data from a text file Create a table : CREATE TABLE myTable1 (a int, b int); Create data file, say: sample.dat Put data into the file : 1,11 2,22 3,33

Loading from text file (Contd) Create control file, say load.ctl LOAD DATA INFILE sample.dat INTO TABLE myTable1 FIELDS TERMINATED BY ‘,’ (a,b) Invoke SQL Loader (from your UNIX shell): $ sqlldr <user/password> control=load.ctl

Connecting to Oracle DBMS from SQL Developer Install Juniper Networks - > Network Connect(WPI VPN) Download Oracle SQL Developer from oracl;e Configure SQL Developer Connection