Managing Database With Oracle Replacement for Ch10 COP 4708.

Slides:



Advertisements
Similar presentations
CC SQL Utilities.
Advertisements

Extended DISC Online System User Instruction: How to Generate Reports
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 David M. Kroenke’s Chapter Eight: Database Redesign Database Processing:
Fundamentals, Design, and Implementation, 9/e Chapter 8 Database Redesign.
Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
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.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 COS 346 Day 11.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Access Tutorial 1 Creating a Database
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 COS 346 Day 12.
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
Introduction To Form Builder
Introduction to Structured Query Language (SQL)
Introduction To Form Builder
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.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
Project Implementation for COSC 5050 Distributed Database Applications Lab1.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Managing Business Data Lecture 8. Summary of Previous Lecture File Systems  Purpose and Limitations Database systems  Definition, advantages over file.
CSCI 6962: Server-side Design and Programming
An INTRODUCTION to MICROSOFT ACESS 2000 By Dr. Ennis-Cole.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Project Implementation for COSC 5050 Distributed Database Applications Lab2.
Self Guided Tour for Query V8.4 Basic Features. 2 This Self Guided Tour is meant as a review only for Query V8.4 Basic Features and not as a substitute.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
1 Lesson 22 Getting Started with Access Essentials Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Creating a Web Site to Gather Data and Conduct Research.
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
PHP meets MySQL.
FireRMS NEMSIS (Part 2) Presented by Laura Small FireRMS Quality Assurance.
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.
Lesson 17 Getting Started with Access Essentials
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Microsoft Access You will need a pen/pencil.. What is Microsoft Access? Access is a database management system.  Create a database, add/change delete.
ISM 4212 Lab Creating DB Tables 02 copyright Lars Paul Linden 2007.
Key Applications Module Lesson 21 — Access Essentials
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
1 A Guide to SQL Chapter 2. 2 Introduction Mid-1970s: SQL developed under the name SEQUEL at IBM by San Jose research facilities to be the data manipulation.
CSC 240 (Blum)1 Forms and Importing Data in Access.
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.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
SQL for Database Construction and Application Processing
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
ITEC 3220A Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220a.htm
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, Many.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
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,
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.
Installation Oracle 11g Express 2 double click the "setup" button to install the Oracle.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
MYSQL AND MYSQL WORKBENCH MIS2502 Data Analytics.
COMPUTER SKILLS MS-ACCESS. Introduction Access is a piece of software known as a database management system. At its most basic level, it can be used to.
Copyright © 2014 Pearson Canada Inc. Ext. 5b-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5b Using Microsoft Access Part 2: Using Information.
3 A Guide to MySQL.
June 17, 2009 Office 2007 Tips & Tricks.
, MS-Access, QBE, Access/Oracle
SQL and SQL*Plus Interaction
Introduction to Web programming
mysql and mysql workbench
Database Processing: David M. Kroenke’s Chapter Seven:
Access: Access Basics Participation Project
Presentation transcript:

Managing Database With Oracle Replacement for Ch10 COP 4708

Introduction Oracle is the world’s most popular DBMS - It is a powerful and robust DBMS that runs on many different operating systems Oracle DBMS engine available in several versions:versions –The Personal Edition of Oracle (is available with this text and can also be downloaded from Oracle) –Express Edition (the one that we downloaded and installed) –Standard Edition –Professional Edition Example of Oracle products: –SQL*Plus: a utility for processing SQL and creating components like stored procedures and triggers: PL/SQL is a programming language that adds programming constructs to the SQL language –Oracle Developer (Forms & Reports Builder)

Starting With Oracle Click on Application Express to start working with Oracle

Starting with Oracle You will get a login screen where you enter your username (sys) and password (whatever the password that you used during installing Oracle)

Create User or Use Existing Once you login you can create a new user workspace or use existing workspace

Oracle User Interface

Creating Tables Click on SQL Workshop, Object Browser, and from the Create Object Menu select Table

Creating Table Once you click on the create table tab you will get this screen Fill in the name of the table as ARTIST from the View Ridge Gallery Database Fill in the different columns needed as indicated in the following slide

ARTIST Table Column NameColumn TypeSizeNULL ArtsitIDNumber(38,1)No NameChar25No NationalityVarchar230Yes BirthDateNumber(4,0)Yes DeceasedDateNumber(4,0)Yes

ARTIST Table Once you insert the column name, type size and the null constraint click next to choose a primary key for the table

Primary Key Select Not Populated since you will entering the values your self. Then select the primary key to be ArtistID and click Next twice to skip Foreign Key setup to constraints

Adding Constraint You can choose the type of constraint whether Check or Unique The name of the constraint will be created Automatically

Adding Constraints Check Constraints: –(Nationality In ('Canadian', 'English', 'French', 'German', 'Mexican', 'Russian', 'Spanish', 'US')) –(BirthDate < DeceasedDate) –(Birthdate > 1000) and (Birthdate < 2100) –(DeceasedDate > 1000) and (DeceasedDate < 2100) Unique Constraint: –Name

Adding Constraints This is a snapshot of all the constraints that have been added. You will have 4 check and one unique Click Finish then confirm the table creation by clicking on Create

Table Manipulation The table has been created You can Drop (Delete) the table by clicking on Drop, or You can rename the table by clicking on Rename You can Add a new column You can modify an existing column You can rename a column You can drop a column

Table Manipulation Exercise Add a column called MyColumn with a data type char (20) Rename that column to ArtistAge Modify the data type to be Number (5,0) Drop that column

Inserting Data Into Table To insert data into table click on the Data tab then click Insert Row

ArtistIDNameNationalityBirthDateDeceasedDate 3MiroSpanish KandinskyRussian FringsUS1950Null 6KleeGerman1900Null 8MoosUSNull 14TobeyUSNull 15MattFrenchNull 16ChagallFrenchNull Insert Data into table then click Create and Create Another Use the information provided here After the last entry click Create tab

Table Including Data You should be able to have the table with all data inserted as shown in the figure You can count the number of rows in the table or you can insert more records (rows of data) Click on SQL

SQL Code For Artist Table CREATE TABLE "ARTIST" ( "ARTISTID" NUMBER(38,1) NOT NULL, "NAME" CHAR(25) NOT NULL, "NATIONALITY" VARCHAR2(30), "BIRTHDATE" NUMBER(4,0), "DECEASEDDATE" NUMBER(4,0), CONSTRAINT "ARTIST_PK" PRIMARY KEY ("ARTISTID"), CONSTRAINT "ARTIST_CK1" CHECK ((Nationality In ('Canadian', 'English', 'French', 'German', 'Mexican', 'Russian', 'Spanish', 'US')), CONSTRAINT "ARTIST_CK2" CHECK ((BirthDate < DeceasedDate)), CONSTRAINT "ARTIST_CK3" CHECK ((Birthdate > 1000) and (Birthdate < 2100)), CONSTRAINT "ARTIST_CK4" CHECK ((DeceasedDate > 1000) and (DeceasedDate < 2100) ), CONSTRAINT "ARTIST_UK1" UNIQUE ("NAME") ) This is the automated code that has been created by the system

Exercise Create WORK table using the following Information Column NameColumn TypeSizeNULL WorkIDNumber(38,1)No TitleVarchar225No DescriptionVarchar21000Yes CopyVarchar28Yes ArtistIDNumberNo

Exercise (Cont.) Assign a primary key Assign a foreign key remember to add the reference table as ARTIST and the reference column Add the following constraints: –Title, copy as unique

Exercise (Cont.) Then insert the following information: WorkIDTitleDescriptionCopyArtistID 505Mystic FabricOpposite meaning99/ Mi VidaDark background7/ Slow EmbersFrom the artist’s originalsHC14 525Mystic FabricSome water damage105/ Northwest By NightWonderful, moody37/5016

Work Table Created with Data You should be able to get the table shown in the figure with populated rows Click on Model

Database Model Oracle screen that shows the conceptual model of the database and the relation between the ARTIST table and the WORK table

Table Dependencies When you click on Dependencies the system will list the tables that the WORK table depends on Now click on Create to create a View

Creating View In the view name enter ArtistNameView Then write the SQL code to create the view in the query box

Viewing and Manipulating the View The view will be created To look at the view or the query that you created click on Data and you will see this table with artists’ names CREATE OR REPLACE FORCE VIEW "ARTISTNAMEVIEW" "ARTISTNAME") AS Select Name as ArtistName From ARTIST When click on SQL you will get the code for creating the view including the query You can click on Drop to delete the view

Utilities So we used the Administration tab, the object browser tab, the SQL tab, how about utilities? Click on utilities then select Data Load/Unload then select load

Utilities Select Load Spreadsheet Data and you will get this screen Select New Table Select Upload File

Spreadsheet file Before you upload the file to Oracle open your Excel sheet that has the table Click save as Keep the file under the same name in our case will be (Customer Table) Select Save as type (Text (Tab delimited)(*.text) then save

Uploading Data from Spreadsheet Browse to the txt file that you just saved then set separator \t for tab Click Next

Creating Table In The Database Name the table as CUSTOMER All columns been loaded and data type been recognized

Creating Customer Table To setup the primary key select use an existing column and choose Customer_ID Then select Not generated Then Click Load Data

Creating Customer Table Table has been imported To make sure of that go to the home page click Object Browser, browse for tables, you will see the customer table been created and if you click on Data you will see the table populated with data

Customer Table with Populated Rows

Generating Object Reports Also under Utilities tab you can generate Object Reports that provides different reports about the objects included in the database, such as a report about the different columns, their type and their size

Restoring Deleted Objects Also You can retrieve or restore object that has been deleted by mistake by going to the Recycle Bin and choosing Dropped Objects Then select from the list the object that you would like to restore

Click on Restore Object Restoring Deleted Objects