October 23, 2001Database Management -- R. Larson SQL and Fourth Generation Languages (4GLs) University of California, Berkeley School of Information Management.

Slides:



Advertisements
Similar presentations
CIT 613: Relational Database Development using SQL Introduction to SQL.
Advertisements

Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Introduction to Structured Query Language (SQL)
9/30/1999SIMS 257: Database Management -- Ray Larson SQL Commands University of California, Berkeley School of Information Management and Systems SIMS.
SLIDE 1IS Fall 2002 Fourth Generation Languages and OR extensions to SQL University of California, Berkeley School of Information Management.
9/30/1999SIMS 257: Database Management -- Ray Larson Database Client Applications University of California, Berkeley School of Information Management and.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
SLIDE 1IS Fall 2002 ORACLE SQL and SQL_PLUS University of California, Berkeley School of Information Management and Systems SIMS 257:
Introduction to Structured Query Language (SQL)
Database Management: Getting Data Together Chapter 14.
SLIDE 1IS Fall 2002 PHP (and MySQL) University of California, Berkeley School of Information Management and Systems SIMS 257: Database.
10/28/1999Database Management -- R. Larson ORACLE SQLPlus Updating and Modifying Data In SQL University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Fall 2004 ORACLE and SQLPlus University of California, Berkeley School of Information Management and Systems SIMS 257: Database.
SLIDE 1IS 257 – Fall 2005 More on SQL (and MySQL) University of California, Berkeley School of Information Management and Systems SIMS 257:
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
October 24, 2000Database Management -- R. Larson Fourth Generation Languages (4GLs) University of California, Berkeley School of Information Management.
Concepts of Database Management Sixth Edition
SLIDE 1IS Fall 2002 Fourth Generation Languages and PHP University of California, Berkeley School of Information Management and Systems.
SLIDE 1IS 257 – Spring 2004 PHP (and MySQL) University of California, Berkeley School of Information Management and Systems SIMS 257: Database.
A Guide to MySQL 7. 2 Objectives Understand, define, and drop views Recognize the benefits of using views Use a view to update data Grant and revoke users’
Introduction to Structured Query Language (SQL)
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.
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
SLIDE 1IS Fall 2002 Fourth Generation Languages and OR extensions to SQL University of California, Berkeley School of Information Management.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
SQL Query Extras MIS 433. Rerunning the last Query n Type the forward slash “/” to rerun the last query that was entered.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
Chapter 1 Database Systems. Good decisions require good information derived from raw facts Data is managed most efficiently when stored in a database.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Programming Languages: Telling the Computers What to Do Chapter 16.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
ASP.NET Programming with C# and SQL Server First Edition
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
Databases and Statistical Databases Session 4 Mark Viney Australian Bureau of Statistics 5 June 2007.
11 Copyright © 2007, Oracle. All rights reserved. Creating Other Schema Objects.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
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,
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Oracle 11g: SQL Chapter 4 Constraints.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
ITEC 3220A Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220a.htm
CIT 613: Relational Database Development using SQL Introduction to SQL DeSiaMorePowered by DeSiaMore 1.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
Machine Machine language is PL in which program instructions are written in strings of 0s and 1s.The computer circuitry is wired in a manner that it can.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
A Guide to SQL, Sixth Edition 1 Chapter 7 Reports.
 CONACT UC:  Magnific training   
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
ORACLE SQL Developer & SQLPLUS Statements
Computer Programming.
ORACLE.
Contents Preface I Introduction Lesson Objectives I-2
IST 318 Database Administration
Presentation transcript:

October 23, 2001Database Management -- R. Larson SQL and Fourth Generation Languages (4GLs) University of California, Berkeley School of Information Management and Systems SIMS 257: Database Management

October 23, 2001Database Management -- R. Larson Review SQL and Oracle

October 23, 2001Database Management -- R. Larson SELECT Syntax: –SELECT [DISTINCT] attr1, attr2,…, attr3 as label, function(xxx), calculation, attr5, attr6 FROM relname1 r1, relname2 r2,… rel3 r3 WHERE condition1 {AND | OR} condition2 ORDER BY attr1 [DESC], attr3 [DESC]

October 23, 2001Database Management -- R. Larson CREATE SYNONYM CREATE SYNONYM newname FOR oldname; CREATE SYNONYM BIOLIFE for ray.BIOLIFE;

October 23, 2001Database Management -- R. Larson Create Table CREATE TABLE table-name (attr1 attr-type CONSTRAINT constr1 PRIMARY KEY, attr2 attr-type CONSTRAINT constr2 NOT NULL,…, attrM attr-type CONSTRAINT constref REFERENCES owner.tablename(attrname), attrN attr-type CONSTRAINT constrN CHECK (attrN = UPPER(attrN)); Adds a new table with the specified attributes (and types) to the database.

October 23, 2001Database Management -- R. Larson Alter Table ALTER TABLE table-name ADD COLUMN attr1 attr-type; ALTER TABLE table-name ADD COLUMN attr1 CONSTRAINT xxx constrainvalue; ALTER TABLE table-name MODIFY COLUMN attr1 optiontochange; … DROP COLUMN attr1; Adds a new column to an existing database table.

October 23, 2001Database Management -- R. Larson INSERT INSERT INTO table-name (attr1, attr4, attr5,…, attrK) VALUES (“val1”, val4, val5,…, “valK”); OR INSERT INTO table-name SELECT col1, col2, col3 as newcol2, col4 FROM xx, yy WHERE where-clause; Adds a new row(s) to a table.

October 23, 2001Database Management -- R. Larson DELETE DELETE FROM table-name WHERE ; Removes rows from a table.

October 23, 2001Database Management -- R. Larson UPDATE UPDATE tablename SET attr1=newval, attr2 = newval2 WHERE ; changes values in existing rows in a table (those that match the WHERE clause).

October 23, 2001Database Management -- R. Larson DROP Table DROP TABLE tablename; Removes a table from the database.

October 23, 2001Database Management -- R. Larson CREATE INDEX CREATE [ UNIQUE ] INDEX indexname ON tablename (attr1 [ASC|DESC][, attr2 [ASC|DESC],...]) Adds an index on the specified attributes to a table

October 23, 2001Database Management -- R. Larson Today More on ORACLE Fourth Generation Languages Use of 4GLs in application development

October 23, 2001Database Management -- R. Larson System Information In ORACLE Find all of the tables for a user –SELECT * FROM ALL_CATALOG WHERE OWNER = ‘userid’; –SELECT * FROM USER_CATALOG; (or CAT) Show the attributes and types of data for a particular table –DESCRIBE tablename;

October 23, 2001Database Management -- R. Larson Running commands Create file with SQL and SQLPlus commands in it. –Use a plain text editor and NOT a word processor (or save as text only) Give the file the extension.sql From inside SQLPlus type –START filename

October 23, 2001Database Management -- R. Larson Simple formatting in SQLPlus SET PAGESIZE 500 SET LINESIZE 79 PROMPT stuff to put out to screen TTITLE “title to put at top of results” COLUMN col_name HEADING “New Name”

October 23, 2001Database Management -- R. Larson Outputting results as a file… SPOOL filename Commands SPOOL STOP –File will be created with everything between the SPOOL commands

October 23, 2001Database Management -- R. Larson Fourth Generation Languages 1st Generation -- Machine Language 2nd Generation -- Assembly Languages 3rd Generation -- High-Level Languages 4th Generation -- Non-Procedural Languages 5th Generation -- ?? Knowledge-based ?? Natural Language ?? Where do Object-Oriented Languages fit??

October 23, 2001Database Management -- R. Larson Chauffeurs In the early days of the US car industry, production volumes were growing fast, and a well- known sociologist was asked to predict the total number of automobiles that would ever be manufactured. After a great deal of study, the sociologist reported that no more than 2 million would be manufactured in the life cycle of the car. If the car lasted ten years on average, the maximum annual production would never exceed 200,000. This conclusion was based on the much- researched figure that no more than 2 million people would be willing to serve as chauffeurs. From James Martin - Fourth Generation Languages

October 23, 2001Database Management -- R. Larson Fourth Generation Languages In the database environment these are used for creation of database applications To speed up the application building process To make applications easy and quick to change To minimize debugging problems To generate bug-free code from high-level expressions of requirement To make languages user-friendly so that “end-users” can solve their own problems and put computers to work.

October 23, 2001Database Management -- R. Larson Basic Principles of 4GLs The Principle of Minimum Work The Principle of Minimum Skill The Principle of avoiding alien syntax and mnemonics The Principle of Minimum Time The Principle of Minimum errors The Principle of Minumum Maintenance The Principle of Maximum Results From James Martin - Fourth Generation Languages

October 23, 2001Database Management -- R. Larson Properties of 4GLs User Friendly A nonprofessional programmer can obtain results with it It employs the database management system directly Programs for most applications can be created with 10 times fewer instructions than in a Third Generation Language

October 23, 2001Database Management -- R. Larson More Properties of 4GLs Non procedural code is used wherever possible It make intelligent default assumptions about what the user wants wherever possible It is designed for online operation It enforces or encourages structured code It makes it easy to understand and maintain another person’s code

October 23, 2001Database Management -- R. Larson More Properties of 4GLs Non-DP users can learn a subset of the language in a short course It is designed for easy debugging Prototypes can be created and modified quickly Results can be obtained in an order of magnitude less time than with a 3GL for most applications

October 23, 2001Database Management -- R. Larson Selection Criteria for 4GLs Is it intended for routine computing of ad hoc decision making Is it intended for end users or DP professionals? (many 4GLs are appropriate for both) Does it require the skills of a programmer, or can an analyst who does not program in a 3GL use it.

October 23, 2001Database Management -- R. Larson Selection Criteria for 4GLs Which of the following features does it provide? –Simple queries –Simple queries and updates –Complex queries –Complex queries and updates –The ability to create a database quickly –Intelligent database operations, where the change of one value in the database causes other operations to occur automatically, such as validity checks, cross references, and the updating of related values.

October 23, 2001Database Management -- R. Larson Selection Criteria for 4GLs Which of the following features does it provide?(cont) –Generation of data-entry screens for key-entry operators (with validity checks) –Generation of data-update screens for key-entry operators (with validity checks) –A procedural language giving full programming capability –Graphics techniques for application design –Spreadsheet manipulation –Multidimensional matrix manipulation –Report generation –Graphics generation

October 23, 2001Database Management -- R. Larson Selection Criteria for 4GLs Which of the following features does it provide?(cont) –Graphics manipulation –Decision support for what-if questions –Mathematical analysis tools –Financial analysis tools –Other decision-support tools –Text manipulation –Electronic Mailbox Is it on-line or off-line? Does it run on mainframes, minicomputers or personal computers? Can it access mainframe or remote databases Is it genuinely easy to use Can results be obtained with it very quickly?

October 23, 2001Database Management -- R. Larson Components of a 4GL for building routine applications Application Parameters Testing tools/debugger Interpreter Optimizing compiler Rules Specification Data Specification Report Specification Screen Specification Procedural facility Feedback

October 23, 2001Database Management -- R. Larson 5GLs -- Natural Language Possibilities Problems

October 23, 2001Database Management -- R. Larson Natural Language Advantages of using NL –It encourages untrained users to start –It encourages upper-management use of computers –It reduces the time taken learning complex syntax –It lessens the frustration, bewilderment and anger caused by BAD COMMAND responses –It is likely to extend greatly the usage of computers James Martin, Fourth Generation Languages, 1985

October 23, 2001Database Management -- R. Larson Natural Language It lacks precision It is not good for expressing precise and complex logic It is not good for expressing neat structures It encourages semantic overshoot It should be combined with other dialogue contructs that aid in the representation of precise logic and structures James Martin, Fourth Generation Languages, 1985 Disadvantages of using NL Appropriate response to the disadvantage

October 23, 2001Database Management -- R. Larson Natural Language It takes substantial time to key in sentences Ambiguities are possible Substantial processing is needed Sentences and words can be abbreviated Speech input as well as typed input will be used The computer should detect and resolve ambiguities The processing should be on PC workstations. Processing is dropping rapidly in cost. James Martin, Fourth Generation Languages, 1985 Disadvantages of using NL Appropriate response to the disadvantage

October 23, 2001Database Management -- R. Larson Next Time Database Administration