ISD3 Chris Wallace www.cems.uwe.ac.uk/~cjwallac. Next 6 Weeks Extended Relational Model Object Orientation Matching systems 3 tier architecture Technology.

Slides:



Advertisements
Similar presentations
Data Definition and Integrity Constraints
Advertisements

Chapter 10: Designing Databases
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
SQL Objects and PL/SQL. Who am I ?  Gary Myers  Oracle developer since 1994  Database Consultant with SMS M&T  Blogger since 2004 Now at blog.sydoracle.com.
Fall 2005 ICS184/EECS116 – Notes 08 1 ICS 184/EECS116: Introduction to Data Management Lecture Note 8 SQL: Structured Query Language -- DDL.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
ISD3 Lecture 4 - Databases, SQL and MySQL. dept deptno dname location emp empno ename not null job not null hiredate sal comm manager The EMP DEPT database.
UQI107S3 Object Orientation lecture 2. Plan Review Tutorial 1 Testing Mayday development –latlong type, boat type, boats table –procedures 3 Tier application.
Chapter 11 Data Management Layer Design
Object orientation - 3 Review of Tutorial 2 Encapsulation Reusable Types Inheritance.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Database Systems Lecture 5 Natasha Alechina
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos OO and OR DBMSs.
DBMS 3. course. Reminder Data independence: logical and physical Concurrent processing – Transaction – Deadlock – Rollback – Logging ER Diagrams.
IST Databases and DBMSs Todd S. Bacastow January 2005.
10. Creating and Maintaining Geographic Databases.
Data at the Core of the Enterprise. Objectives  Define of database systems.  Introduce data modeling and SQL.  Discuss emerging requirements of database.
CSE314 Database Systems Lecture 4 Basic SQL Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Module Title? DBMS Introduction to Database Management System.
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden Date:
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 11 Introduction to Dynamic SQL and Object Technology.
RDB/1 An introduction to RDBMS Objectives –To learn about the history and future direction of the SQL standard –To get an overall appreciation of a modern.
Database Technical Session By: Prof. Adarsh Patel.
V. Megalooikonomou Object-Oriented and Object-Relational DBMSs (based on notes by Silberchatz,Korth, and Sudarshan and notes by C. Faloutsos at CMU) Temple.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Computer Science 101 Database Concepts. Database Collection of related data Models real world “universe” Reflects changes Specific purposes and audience.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
CSc-340 3b1 Intermediate SQL Chapter 4 [2 of 2] Phase 1 of Student Projects SQL Data Types & Schemas Authorization.
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
Relational Data Model Ch. 7.1 – 7.3 John Ortiz Lecture 3Relational Data Model2 Why Study Relational Model?  Most widely used model.  Vendors: IBM,
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Chapter 12: Designing Databases
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Relational Database. Database Management System (DBMS)
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Creating and Maintaining Geographic Databases. Outline Definitions Characteristics of DBMS Types of database Relational model SQL Spatial databases.
Guofeng Cao CyberInfrastructure and Geospatial Information Laboratory Department of Geography National Center for Supercomputing Applications (NCSA) University.
Visual Programing SQL Overview Section 1.
Object Oriented Database By Ashish Kaul References from Professor Lee’s presentations and the Web.
CS 338The Relational Model2-1 The Relational Model Lecture Topics Overview of SQL Underlying relational model Relational database structure SQL DDL and.
INTRODUCTION lecture1 1. Data base concept Data is a meaningless static value. What does 3421 means? Information is the data you process in a manner that.
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4.
©Silberschatz, Korth and Sudarshan1 Structured Query Language (SQL) Data Definition Language Domains Integrity Constraints.
Week 4 Lecture Part 2 of 3 Structured Query Language (SQL) Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
1 CS 430 Database Theory Winter 2005 Lecture 10: Introduction to SQL.
DBMS 3. course. Reminder Data independence: logical and physical Concurrent processing – Transaction – Deadlock – Rollback – Logging ER Diagrams.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Oracle & SQL. Oracle Data Types Character Data Types: Char(2) Varchar (20) Clob: large character string as long as 4GB Bolb and bfile: large amount of.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
1 A Very Brief Introduction to Relational Databases.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Physical Model Lecture 11. Physical Data Model The last step is the physical design phase, In this phase data is – Store – Organized and – Access.
Introduction to Database Programming with Python Gary Stewart
CS320 Web and Internet Programming SQL and MySQL
Tools for Memory: Database Management Systems
ORACLE SQL Developer & SQLPLUS Statements
DATABASE MANAGEMENT SYSTEM
Database systems Lecture 3 – SQL + CRUD
CS3220 Web and Internet Programming SQL and MySQL
CS3220 Web and Internet Programming SQL and MySQL
Presentation transcript:

ISD3 Chris Wallace

Next 6 Weeks Extended Relational Model Object Orientation Matching systems 3 tier architecture Technology - Oracle 9i

Week 1 –Review Relational Model –Tricky applications –Advances in Extended Relational DBs –Review Standard Data types –User defined types in Oracle 9i –The Mayday System

Relations There is only one data structure in the relational data model - the relation: Every relation in a database must have a distinct name. Every column in a relation must have a distinct name within the relation. All entries in a column must be of the same kind. The ordering of columns in a relation is not significant. Each row in a relation must be distinct. The ordering of rows is not significant. Each cell or column/row intersection in a relation should contain only a so-called atomic value.

Additional features Third Normal Form (3NF) Relations are non-redundant - ‘say it once in one place’ Operations using DML (insert, update, delete) Unique primary key ensures unique rows Supplied column types (String, Integer, Date.. ) Relationships created dynamically through join operation: –SELECT ENAME, DNAME –FROM DEPT, EMP –WHERE EMP.DEPTNO = DEPT.DEPTNO

Common applications Core business processing –Accounting systems –Order processing –Stock control Administrative systems –student records –admissions –bookings

Tricky application domains Design systems - CAD, CAM, CASE Text searching - search engine Multi-media, hyper-media systems - images, video, audio, complex networks Spatial data - Geographic Information Systems Decision support systems - analysis of large body of ‘static’ data Real-time active systems - air-traffic control

Challenges Complex entities –application specific datatypes –poorly mapped to multiple relations –Entities not defined by data alone –Complex relationships Specialised processing –searching - text, images, maps –handling aggregated data –long transactions, terabytes of data, rapid response –automated response to conditions in DB –deduction of information

Responses Develop application specific data management system-but all DBMS share common problems –handling transactions –backup and recovery –indexing, query processing Object oriented database - general purpose but better matched to problem structures Extend Relational model Hybrid systems

Extended Relational Model Procedural extensions: –Stored Procedures –Triggers Object-oriented features: –User-defined data types –Types as records in a table –Generalisation/Specialisation –Aggregations –Object-references

User-defined types Codd’s relational model has ‘domains’ – commercial RDBMS provide only standard types with standard functions Applications require –restrictions on standard types e.g. restricted values - can sometimes use Constraints to enforce –types defined by several values bound together eg international currency requires amount and currency code –functions which operate on these types eg to convert between 2 international currencies

Oracle Datatypes Oracle Built-in Datatypes are directly supported by the Oracle DB Compatibility with other DBs is also provided e.g. ANSI standard types These can be mixed (as in my applications!)

Summary of Oracle Datatypes Strings –VARCHAR2(n) - variable length string –CHAR(n) - fixed length string Numbers –NUMBER(p,s) - number having precision p and scale s e.g. NUMBER(4,2) allows –NUMBER - as ANSI REAL Dates –DATE –TIMESTAMP –INTERVAL BLOB up to 4 GB

User defined Datatypes Applications require their own types which must be built from these basic types In the Mayday Application, we need to record the position of a boat Positions given in Latitude and Longitude, and each of these is recorded as Degrees and Minutes e.g Bristol is at –latitude N 51degrees 28 minutes –longitude W 2 degrees 35 minutes

Mayday types We need two data types: –dm for degrees and minutes comprises integer for degrees, real for minutes sign of degree indicates N/S or W/E functions to convert to minutes only, to a string –latlong for the latitude/longitude comprises one dm for the latitude, one for the longitude functions to convert to string, to find distance between two latlongs

dm in Rational Rose

Defining the dm type create or replace type dm as object ( degrees number(3), minutes real, member function asMin return real, member function asRad return real, member function asString return varchar ) Attributes Functions

Defining the dm Functions member function asMin return real is begin return degrees*60+sign(degrees)*minutes; end; member function asRad return real is begin return (degrees+sign(degrees)* (minutes/60)*( /180); end; member function asString return varchar is begin return degrees || ':' || minutes; end;

Template for defining a new type -- comment to describe the type create or replace type as object ( :,.. member function ( : ) return,.. ) / -- to execute this definition create or replace type body as member function ( : ) return is -- declarations begin -- PL/SQL statements end; /

Using the dm type select dm(180,0 ) from dual; select dm(-180,0) from dual; select dm(30,30).asMin() from dual; select dm(-30,30).asMin()from dual; select dm(30,30).asRad() from dual; select dm(-30,30).asRad() from dual; Constructor Function call Navigation

Tutorial Find my web page – Find the section for the module Find the first tutorial –read through the Mayday application - before the tutorial –create the dm type in your own Oracle DB –test it –modify it

Next Week Lecture : –Lat/long data type –Objects, Generalisation/Specialisation –3 tier architecure Tutorial –install the Mayday application