Topic 3 Object Relational Database
|
|
- Stella Maxwell
- 5 years ago
- Views:
Transcription
1 Topic 3 Object Relational Database
2 Limitation of Relational Data Model Uniformity Large number of similarly structure data Record orientation Basic data consists of fixed length records Small data items Each record is short Atomic fields No structure with a field. First normal form holds
3 Need for Complex Data Types Complex data types have grown more important in recent years E.g. Addresses can be viewed as a Single string, or Separate attributes for each part, or Composite attributes (which are not in first normal form) E.g. it is often convenient to store multivalued attributes as-is, without creating a separate relation to store the values in first normal form
4 Requirements of New application CAD, CASE,, Multimedia databases Office information systems Hypertext databases
5 OO Data Model Review Object, complex object Set of variables, messages, methods Object Identity, Value, Name, Built-in as OID Object Class,. relationship, complex attributes,. Inheritance, Class hierarchy Multiple inheritance Encapsulation,
6
7
8 Object-Oriented Languages Object-oriented concepts can be used in different ways Object-orientation can be used as a design tool, and be encoded into, for example, a relational database analogous to modeling data with E-R diagram and then converting to a set of relations), like UML The concepts of object orientation can be incorporated into a programming language that is used to manipulate the database. Object-relational systems add complex types and object-orientation to relational language. Persistent programming languages extend object-oriented programming language to deal with databases by adding concepts such as persistence and collections.
9 Persistent Programming Languages Persistent Programming languages allow objects to be created and stored in a database, and used directly from a programming language allow data to be manipulated directly from the programming language No need to go through SQL. No need for explicit format (type) changes format changes are carried out transparently by system Without a persistent programming language, format changes becomes a burden on the programmer More code to be written More chance of bugs allow objects to be manipulated in-memory no need to explicitly load from or store to the database Saved code, and saved overhead of loading/storing large amounts of data
10 Persistent Prog. Languages (Cont.) In the past, database system developers proposed persistent versions of programming languages such as: Pascal C++, Java, Smalltalk Drawbacks of persistent programming languages Due to power of most programming languages, it is easy to make programming errors that damage the database. Complexity of languages makes automatic high-level optimization more difficult. Do not support declarative querying as well as relational databases
11 ORDB Features ORDB advocates evolutionary extensions to relational database so it is compatible with existing relational database technology while incorporating features in OO data model. Pioneering work started with Postgres in late 80 s (the commercial version of Postgres was known as Illustra, which was sold to Informix). Several ORDB systems: Oracle 8, Informix, UniSQL/X,...
12 ORDB Features (2) SQL-99 is the first SQL standard to support ORDB. The standard has not been fully implemented by commercial DBMSs. Oracle 8 and Informix have their own syntax for ORDB features currently.
13 Some ORDB Extensions allow composite attributes allow multi-valued attributes allow table attributes (nested tables) allow inheritance (not yet for Oracle) allow the creation of methods Support Object Identifiers (OIDs) Encapsulation is compromised!
14 Composite Attribute (1) Create an object type (user-defined type) SQL> create type name_type as object 2 (fname varchar(30), mi char(1), 3 lname varchar(30)); 4 / /* / is needed */ Now name_type can be used as any system provided types when defining an attribute. create table professors (id number(5), name name_type, office varchar(10));
15 Composite Attribute:Example id Name (fname, mi, lname) (Xiaofeng, null, Meng) (Philippe, L, Bonnet) office CS4 IS2
16 Composite Attribute (2) Create a tuple for the Professors table insert into professors values (12345, name_type( Xiaofeng, null, Meng ), IS4 ); name_type( ) serves as an object constructor. Query the table select * from professors; ID NAME(FNAME, MI, LNAME) OFFICE NAME_TYPE( Xiaofeng, NULL, Meng ) IS4
17 Composite Attribute (3) Dot notation for referring to composite attri More queries select p.name.lname from professors p; The alias p must be used. Dot notation (.) is used to qualify nested attributes and such expressions are called path expressions. Path expression can also be used in where clause. select p.office from professors p where p.name.lname = Meng ;
18 Composite Attribute (4) Create more complex types from existing ones. create type advisor_type as object (name name_type, rank varchar(20), phone# varchar(15)); Type dependency: type advisor_type depends on type name_type. name_type must be dropped first before advisor_type can be dropped. Example: drop type name_type; drop type advisor_type;
19 Composite Attribute (5) Create another table create table students (id number(5), name name_type, status varchar(10), advisor advisor_type); Insert a tuple insert into students values (23456, name_type( Mike, K, Allen ), Freshman, advisor_type(name_type( Lisa, S, Gauch ), Professor, ));
20 Composite Attribute (6) Create an object table create table advisors of advisor_type; Each advisor will be a row object and each advisor name will be a column object. All row objects are associated with a unique object identifier (oid) and this value can be accessed using ref( ) but the value is in hexadecimal format. select ref(a) from advisors a;
21 Composite Attribute (6):Example advisors oid 123A4B ((fname,mi, lname), rank, phone) (Lisa, S, Gray), A/Prof, (Xiaof, null, Meng), Prof,
22 Composite Attribute (7) One motivation for using object tables is that oid values of row objects can be used to navigate from an object in one table to a referenced object in another table. Such navigation may allow certain joins be avoided and as a result some queries can become more efficient.
23 Composite Attribute (8) Example: create type dept_type as object (dept# number(3), name varchar(30), location varchar(30)); create table departments of dept_type (primary key (dept#)); insert into departments values (123, CS, EB ); insert into departments values (234, Biology, S2 );
24 Composite Attribute (9) create type employee_type as object (emp# number(5), name name_type, age number(2), deptno number(5), dept ref dept_type); dept is an attribute whose values will be oids of department objects. create table employees of employee_type (primary key (emp#), foreign key deptno references departments (dept#), scope for (dept) is departments); dept will only reference department objects.
25 Composite Attribute (10) When load data to employees table, load all non-ref attributes first while let the ref attribute to have null values. Then use an update statement to load oids. insert into employees values (12345, name_type( Weiyi, null, Meng, 55, 123, null); insert into employees values (23456, name_type( Susan, J, Wilson, 45, 234, null); update employees e set dept = (select ref(d) from depatments d where d.dept# = e.deptno);
26 Composite Attribute (9):Example department oid Dept# name location O d1 123 CS EB O d2 234 Biology S2 employees oid Emp# name age deptno dept O e (Weiyi,null,Meng) null O e (Susan,J,Wilson) null
27 Composite Attribute (9):Example department oid Dept# name location O d1 123 CS EB O d2 234 Biology S2 employees oid Emp# name age deptno dept O e (Susan,J,Wilson) 123 (Weiyi,null,Meng) {O d1} O e {O d2 }
28 Composite Attribute (11) A query: Find the location of the department Prof. Meng works in. select e.dept.location from employees e where e.name.lname = Meng ; e.dept.location allows one to navigate from an employee object to a department object. The above is equivalent to the following query but more efficient: select d.location from departments d, employees e where e.name.lname = Meng and e.dept = ref(d);
29 Multi-valued Attribute (1) Two ways to create such an attribute in Oracle: Use table type (nested table) Use varray type (varying-length array) Example: create type advisee_type as table of name_type; create table faculty (id number(5) primary key, name name_type, rank varchar(30), advisees advisee_type ) nested table advisees store as advisees_table;
30 Multi-valued Attribute (2) Two tables are created in one statement: faculty, advisees_table advisees_table contains the names of all advisees of all faculty members; advisees_table can only be accessed via the faculty table. In general, a table may have multiple nested table attributes, each must have its own nested table clause separated by,.
31 id name rank advisees X Meng Prof fname mi lname Rui null Ding Daofeng null Luo P Bonnet Prof faculty id name X Meng P Bonne rank Prof Prof adv {o1,o2} {03} advisees oid fname o1 o2 Rui Daofe o3 mi null null lname Ding Luo
32 Multi-valued Attribute (3) Insert tuple insert into faculty values (12345, name_type( Xiaofeng, null, Meng ), Professor, advisee_type(name_type( Rui, null, Ding ), name_type( Daofeng, null, Luo ))); Query the table Find the ids of faculty members who have more than one advisee. select f.id from faculty f where 1 < (select count(*) from table(f.advisees));
33 Multi-valued Attribute (4) Function table( ) a value consisting of multiple elements under a nested table attribute into a table of these elements. table( ) cannot be used in the select clause. For a given faculty f with advisees, f.advisees is displayed as a single scalar value, i.e., count(f.advisees) yields 1 even when f has multiple advisees. Function table( ) unnests the single value into multiple elements.
34 Multi-valued Attribute (5) Example: Find the last names of all advisees of all faculty members. This query asks to retrieve a table of tables (note that each advisees value is a table). Oracle provides two special ways to do this: (1) Cartesian product select a.lname from faculty f, table(f.advisees) a (2) Nested cursor
35 Multi-valued Attribute (6) (2) Nested cursor select f.id, cursor(select a.lname advisee_names from table(f.advisees) a) advisee_tab from faculty f; * cursor(subquery) simulates the inner loop. Output: ID ADVISEE_TAB CURSOR STATEMENT: 2 CURSOR STATEMENT: 2 ADVISEE_NAMES Ding Luo
36 Multi-valued Attribute (7) varray type elements of varray are ordered; elements of varray are usually not stored in a separate table. xample: create type hobby_type as varray (3) of varchar(20); varray(n): at most n elements are allowed per varray value.
37 Multi-valued Attribute (8) create table members (id number(5) primary key, name varchar(20), hobbies hobby_type); insert into members values (12345, John, hobby_type( Golf, Tennis )); Even though varray elements are ordered, they cannot be accessed individually in SQL. Function table( ) can also be applied to a varray value.
38 Multi-valued Attribute (9) count and in can be applied to a varray value to recognize individual values. ind the number of hobbies of member select count(*) from members m, table(m.hobbies) where m.id = 12345; ind all members who like to play golf. select m.name from members m where Golf in (select * from table(m.hobbies));
39 Methods (1) In object-oriented model, methods defined on objects determine how the values of the objects can be accessed/modified. The feature that objects can be accessed or modified through their methods is known as encapsulation. Oracle supports the creation of methods for objects when object types are created. In Oracle, objects may be accessed/modified without the use of methods.
40 Methods (2) In Oracle, methods are created in two steps. Step 1: Define method signature: name, parameters, etc. Step 2: Create method body: PL/SQL code. xample: create type employees_type as object (id number(5), name varchar(20), birthdate date, salary number, member function age return int);
41 Methods (3) member function are the key words for defining a method. create or replace type body employees_type as member function age return int is begin return floor((sysdate self.birthdate)/365.25); end; end; self represents the object to which the method is applied.
42 Methods (4) create table employees_n of employees_type (primary key (id)); insert into employees_n values (12345, James, 15-DEC-60, 50000); insert into employees_n values (12345, Baker, 22-MAY-58, 60000); select e.name, e.age( ) from employees_n e where e.age( ) > 40; The alias e must be used in the above query.
43 Inheritance (1) Inheritance can be at the level of types, or at the level of tables create type person (name MyString, SSN integer) create type student (degree MyString, dept MyString) under person create type teacher (salary int, dept MyString ) under person
44 Inheritance (2) Multiple inheritance create type TA under student, teacher What s the problem here? create type TA under student with (dept as student-dept), teacher with (dept as teacher-dept)
45 Summary Complex types such as nested relations, are useful for modeling complex data in many application The relational model is extended beyond 1NF, to allow nonatomic types. Object-relational systems combine complex data based on an extended relational model with object-oriented concepts such as object identity and inheritance SQL have been extended to deal with complex types and object orientation.
46 Comparison of O-O and O-R Databases Summary of strengths of various database systems: Relational systems simple data types, powerful query languages, high protection. Persistent-programming-language-based OODBs complex data types, integration with programming language, high performance. Object-relational systems complex data types, powerful query languages, high protection. Note: Many real systems blur these boundaries E.g. persistent programming language built as a wrapper on a relational database offers first two benefits, but may have poor performance.
47 DBMS DBMS
48 DBMS DBMS DBMS DBMS DBMS DBMS DBMS DBMS
49 Agreeeeeeeeee??
3. Object-Oriented Databases
3. Object-Oriented Databases Weaknesses of Relational DBMSs Poor representation of 'real world' entities Poor support for integrity and business rules Homogenous data structure Limited operations Difficulty
More informationChapter 9: Object-Based Databases
Chapter 9: Object-Based Databases Chapter 9: Object-Based Databases Complex Data Types and Object Orientation Structured Data Types and Inheritance in SQL Table Inheritance Array and Multiset Types in
More informationChapter 9: Object-Relational Databases
Chapter 9: Object-Relational Databases! Nested Relations! Complex Types and Object Orientation! Querying with Complex Types! Creation of Complex Values and Objects! Comparison of Object-Oriented and Object-Relational
More informationObject-Relational Data Models. Chapter 9: Object-Relational Databases. Example of a Nested Relation. Nested Relations
Chapter 9: Object-Relational Databases Object-Relational Data Models! Nested Relations! Complex Types and Object Orientation! Querying with Complex Types! Creation of Complex Values and Objects! Comparison
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database Extensions to SQL ODMG Object Model and the Object Definition Language ODL Object Database Conceptual
More informationChapter 11 Object and Object- Relational Databases
Chapter 11 Object and Object- Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Outline Overview of Object Database Concepts Object-Relational
More informationConcepts for Object-Oriented Databases
Concepts for Object-Oriented Databases Chapter 20 March 24, 2008 ADBS: OODB 1 Chapter Outline Overview of O-O Concepts O-O Identity, Object Structure and Type Constructors Encapsulation of Operations,
More informationConstructs in Oracle
11. Object-Relational Constructs in Oracle 11-1 Part 11: Object-Relational References: Constructs in Oracle Jeffrey D. Ullman: Object-Relational Features of Oracle [http://infolab.stanford.edu/ ullman/fcdb/oracle/or-objects.html]
More informationChapter 12 Object and Object Relational Databases
Chapter 12 Object and Object Relational Databases - Relational Data Model - Object data model (OODBs) - Object-relational data models Traditional data models -network - hierarchical - relational They lack
More informationCh. 21: Object Oriented Databases
Ch. 21: Object Oriented Databases Learning Goals: * Learn about object data model * Learn about o.o. query languages, transactions Topics: * 21.1 * 21.2 * 21.3 * 21.4 * 21.5 Source: Ch#21, Bertino93, Kim
More informationPhysical Design. Elena Baralis, Silvia Chiusano Politecnico di Torino. Phases of database design D B M G. Database Management Systems. Pag.
Physical Design D B M G 1 Phases of database design Application requirements Conceptual design Conceptual schema Logical design ER or UML Relational tables Logical schema Physical design Physical schema
More information1 ODBMS vs RDBMS 1. 3 Resources 16
Table of Contents Spis treści 1 ODBMS vs RDBMS 1 2 Object-Relational Model 3 2.1 Object Types.................................. 4 2.2 Using Objects.................................. 9 2.3 Inheritance...................................
More informationSample Question Paper
Sample Question Paper Marks : 70 Time:3 Hour Q.1) Attempt any FIVE of the following. a) List any four applications of DBMS. b) State the four database users. c) Define normalization. Enlist its type. d)
More informationCMPT 354: Database System I. Lecture 2. Relational Model
CMPT 354: Database System I Lecture 2. Relational Model 1 Outline An overview of data models Basics of the Relational Model Define a relational schema in SQL 2 Outline An overview of data models Basics
More informationCOSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1
COSC344 Database Theory and Applications Lecture 5 SQL - Data Definition Language COSC344 Lecture 5 1 Overview Last Lecture Relational algebra This Lecture Relational algebra (continued) SQL - DDL CREATE
More informationInterview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]
Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept] 1. What is DBMS? A Database Management System (DBMS) is a program that controls creation, maintenance and use
More informationChapter 1: Introduction
Chapter 1: Introduction Chapter 2: Intro. To the Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Database Management System (DBMS) DBMS is Collection of
More informationTables From Existing Tables
Creating Tables From Existing Tables After completing this module, you will be able to: Create a clone of an existing table. Create a new table from many tables using a SQL SELECT. Define your own table
More informationContents I Introduction 1 Introduction to PL/SQL iii
Contents I Introduction Lesson Objectives I-2 Course Objectives I-3 Human Resources (HR) Schema for This Course I-4 Course Agenda I-5 Class Account Information I-6 Appendixes Used in This Course I-7 PL/SQL
More informationSample Test #1 Questions
Sample Test #1 Questions 1. Fibonacci numbers & Iteration Structures/using elsif a. Another program to generate Fibonacci numbers b. Makes use of the elsif selection structure c. It saves us of repeated
More informationCS143: Relational Model
CS143: Relational Model Book Chapters (4th) Chapters 1.3-5, 3.1, 4.11 (5th) Chapters 1.3-7, 2.1, 3.1-2, 4.1 (6th) Chapters 1.3-6, 2.105, 3.1-2, 4.5 Things to Learn Data model Relational model Database
More informationCS275 Intro to Databases
CS275 Intro to Databases The Relational Data Model Chap. 3 How Is Data Retrieved and Manipulated? Queries Data manipulation language (DML) Retrieval Add Delete Update An Example UNIVERSITY database Information
More informationThe functions performed by a typical DBMS are the following:
MODULE NAME: Database Management TOPIC: Introduction to Basic Database Concepts LECTURE 2 Functions of a DBMS The functions performed by a typical DBMS are the following: Data Definition The DBMS provides
More informationTable of Contents. PDF created with FinePrint pdffactory Pro trial version
Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.
More informationAuthor's Prepublication Version
OBJECT DATA MODELS Susan D. Urban Arizona State University http://www.public.asu.edu/~surban Suzanne W. Dietrich Arizona State University http://www.public.asu.edu/~dietrich SYNONYMS ODB (Object Database),
More informationDatabase design process
Database technology Lecture 2: Relational databases and SQL Jose M. Peña jose.m.pena@liu.se Database design process 1 Relational model concepts... Attributes... EMPLOYEE FNAME M LNAME SSN BDATE ADDRESS
More informationKing Fahd University of Petroleum and Minerals
1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 334: Database Systems Semester 041 Major Exam 1 18% ID: Name: Section: Grades Section Max Scored A 5 B 25
More informationIntroduction to Oracle Objects
This lab describes the advantages and key features of the Oracle object-relational model. The lab contains these topics: About Oracle Objects Advantages of Objects About Oracle Objects Oracle object types
More informationRelational Algebra Part I. CS 377: Database Systems
Relational Algebra Part I CS 377: Database Systems Recap of Last Week ER Model: Design good conceptual models to store information Relational Model: Table representation with structures and constraints
More informationCS2300: File Structures and Introduction to Database Systems
CS2300: File Structures and Introduction to Database Systems Lecture 14: SQL Doug McGeehan From Theory to Practice The Entity-Relationship Model: a convenient way of representing the world. The Relational
More informationIntroduction to Database Management Systems
Relational Data Model Relational Data Model 1 o Relations o Attributes o Tuples o Relations o Primary Keys o Objectives o Comparison to other models o Components o Relation Properties o Kinds of Relations
More informationIntroduction to Data Management. Lecture #6 E-Rà Relational Mapping (Cont.)
Introduction to Data Management Lecture #6 E-Rà Relational Mapping (Cont.) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 It s time again for...
More informationDatabase Systems: Design, Implementation, and Management Tenth Edition. Chapter 8 Advanced SQL
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 8 Advanced SQL Objectives In this chapter, you will learn: How to use the advanced SQL JOIN operator syntax About the different
More informationAN ADVANCED COURSE IN DATABASE SYSTEMS: BEYOND RELATIONAL DATABASES
AN ADVANCED COURSE IN DATABASE SYSTEMS: BEYOND RELATIONAL DATABASES Chapter 9 Case Studies: Relational, Object-Relational, and Object-Oriented Database Implementations Suzanne W. Dietrich and Susan D.
More informationPrinciples of Data Management
Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what
More informationDatabase Systems: Design, Implementation, and Management Tenth Edition. Chapter 8 Advanced SQL
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 8 Advanced SQL SQL Join Operators Join operation merges rows from two tables and returns the rows with one of the following:
More informationProgramming the Database
Programming the Database Today s Lecture 1. Stored Procedures 2. Functions BBM471 Database Management Systems Dr. Fuat Akal akal@hacettepe.edu.tr 3. Cursors 4. Triggers 5. Dynamic SQL 2 Stored Procedures
More informationDATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems
DATABASE MANAGEMENT SYSTEMS UNIT I Introduction to Database Systems Terminology Data = known facts that can be recorded Database (DB) = logically coherent collection of related data with some inherent
More informationReview -Chapter 4. Review -Chapter 5
Review -Chapter 4 Entity relationship (ER) model Steps for building a formal ERD Uses ER diagrams to represent conceptual database as viewed by the end user Three main components Entities Relationships
More informationDatabases IIB: DBMS-Implementation Exercise Sheet 13
Prof. Dr. Stefan Brass January 27, 2017 Institut für Informatik MLU Halle-Wittenberg Databases IIB: DBMS-Implementation Exercise Sheet 13 As requested by the students, the repetition questions a) will
More informationChapter 4. Basic SQL. SQL Data Definition and Data Types. Basic SQL. SQL language SQL. Terminology: CREATE statement
Chapter 4 Basic SQL Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured Query Language Statements for data definitions, queries,
More informationVisit for more.
Chapter 9: More On Database & SQL Advanced Concepts Informatics Practices Class XII (CBSE Board) Revised as per CBSE Curriculum 2015 Visit www.ip4you.blogspot.com for more. Authored By:- Rajesh Kumar Mishra,
More informationIntroduction to Computer Science and Business
Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline
More informationCOSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan
COSC 304 Introduction to Database Systems SQL DDL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Overview Structured Query Language or SQL is the standard query language
More informationAdvanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs
Object Oriented Database Chapter 13 1 Object DBMSs Underlying concepts: Freely sharing data across processing routines creates unacceptable data dependencies All software should be constructed out of standard,
More informationIntroduction to Data Management. Lecture #5 (E-R Relational, Cont.)
Introduction to Data Management Lecture #5 (E-R Relational, Cont.) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v HW#1 is due
More informationIssues in Information Systems
OBJECT REUSE AND INTEGRATION IN OBJECT-RELATIONAL DATABASE DEVELOPMENT Ming Wang, California State University, ming.wang@calstatela.edu ABSTRACT One of the most important features of the Object-relational
More informationINDEX. 1 Introduction. 2 Types of Cursors 2.1 Explicit cursor 2.2 Attributes 2.3 Implicit cursor 2.4 Attributes. 3 Parameterized cursor
INDEX 1 Introduction 2 Types of Cursors 2.1 Explicit cursor 2.2 Attributes 2.3 Implicit cursor 2.4 Attributes 3 Parameterized cursor INTRODUCTION what is cursor? we have seen how oracle executes an SQL
More informationDatabase Management Systems
S.Y. B.Sc. (IT) : Sem. III Database Management Systems Time : 2½ Hrs.] Prelim Question Paper Solution [Marks : 75 Q.1 Attempt the following (any THREE) [15] Q.1 (a) Explain database system and give its
More informationSQL: Data De ni on. B0B36DBS, BD6B36DBS: Database Systems. h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 3
B0B36DBS, BD6B36DBS: Database Systems h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 3 SQL: Data De ni on Mar n Svoboda mar n.svoboda@fel.cvut.cz 13. 3. 2018 Czech Technical University
More informationSlides by: Ms. Shree Jaswal
Slides by: Ms. Shree Jaswal A trigger is a statement that is executed automatically by the system as a side effect of a modification to the database. To design a trigger mechanism, we must: Specify the
More informationDownloaded from
Lesson 16: Table and Integrity Constraints Integrity Constraints are the rules that a database must follow at all times. Various Integrity constraints are as follows:- 1. Not Null: It ensures that we cannot
More informationIntroduction to SQL. ECE 650 Systems Programming & Engineering Duke University, Spring 2018
Introduction to SQL ECE 650 Systems Programming & Engineering Duke University, Spring 2018 SQL Structured Query Language Major reason for commercial success of relational DBs Became a standard for relational
More informationHigh-Level Database Models (ii)
ICS 321 Spring 2011 High-Level Database Models (ii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1 Logical DB Design: ER to Relational Entity sets to
More informationSQL. Char (30) can store ram, ramji007 or 80- b
SQL In Relational database Model all the information is stored on Tables, these tables are divided into rows and columns. A collection on related tables are called DATABASE. A named table in a database
More informationCopyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 21 1
Slide 21 1 Chapter 21 Object Database Standards, Languages, and Design Chapter 21Outline 1 Overview of the Object Model ODMG 2 The Object Definition Language DDL 3 The Object Query Language OQL 4 Overview
More informationObject-relational Databases. Extend relational databases with OO features
Object-relational Databases Extend relational databases with OO features 1 Recently seen (Meijer, Bierman: CACM 4/11) SQL Children point to parents Closed world Entities have identity (extensional) Necessarily
More informationDatabase Technology. Topic 3: SQL. Olaf Hartig.
Olaf Hartig olaf.hartig@liu.se Structured Query Language Declarative language (what data to get, not how) Considered one of the major reasons for the commercial success of relational databases Statements
More informationChapter 21 9/4/2012. Object Database Standards, Languages, and Design. Chapter 21Outline. Chapter Objectives. ODMG Objects and Literals
Chapter 21 Object Database Standards, Languages, and Design Copyright 2004 Pearson Education, Inc. Chapter 21Outline 21.1 Overview of the Object Model ODMG 21.2 The Object Definition Language DDL 21.3
More informationDatabase Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 5 Structured Query Language Hello and greetings. In the ongoing
More informationHandy Annotations within Oracle 10g
International Journal of Scientific & Engineering Research Volume 4, Issue 1, January-2013 1 Handy Annotations within Oracle 10g Mrs.Dhanamma Jagli, Ms.Priyanka Gaikwad, Ms.Shubhangi Gunjal, Mr.Chaitanya
More informationSQL STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE SQL Structured Query Language 4.1 Introduction Originally, SQL was called SEQUEL (for Structured English QUery Language) and implemented at IBM Research as the interface for an
More informationEnhanced Data Models for Advanced Applications. Active Database Concepts
Enhanced Data Models for Advanced Applications Active Database Concepts Topics To Be Discussed Generalized Model for Active Databases and Oracle Triggers Design and Implementation Issues for Active Databases
More informationDATABASE MANAGEMENT SYSTEMS
www..com Code No: N0321/R07 Set No. 1 1. a) What is a Superkey? With an example, describe the difference between a candidate key and the primary key for a given relation? b) With an example, briefly describe
More informationSQL:1999 additional features. Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999
SQL:1999 additional features Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999 Additional features : Motivation Not in relational model:
More informationPart III. Data Modelling. Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1
Part III Data Modelling Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1 Outline of this part (I) 1 Introduction to the Relational Model and SQL Relational Tables Simple Constraints
More informationSeveral major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their
Several major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their products. These companies are promoting a new, extended version
More informationChapter 8 SQL-99: Schema Definition, Basic Constraints, and Queries
Copyright 2004 Pearson Education, Inc. Chapter 8 SQL-99: Schema Definition, Basic Constraints, and Queries Copyright 2004 Pearson Education, Inc. 1 Data Definition, Constraints, and Schema Changes Used
More informationRelational Database Management Systems for Epidemiologists: SQL Part II
Relational Database Management Systems for Epidemiologists: SQL Part II Outline Summarizing and Grouping Data Retrieving Data from Multiple Tables using JOINS Summary of Aggregate Functions Function MIN
More informationObject Database Standards, Languages, and Design
Object Database Standards, Languages, and Design Chapter 21 March 24, 2008 ADBS: OODB 1 Announcement HW 3: 10% Due 2 nd of June. Quiz 3 3% On Saturday May 11 Chapter 21 March 24, 2008 ADBS: OODB 2 Chapter
More informationIslamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 4113: Database System Lab Eng.
Islamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 4113: Database System Lab Eng. Ahmed Abumarasa Database Lab Lab 2 Database Table Introduction: The previous
More informationCreating and Managing Tables Schedule: Timing Topic
9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the
More informationSlides by: Ms. Shree Jaswal
Slides by: Ms. Shree Jaswal Overview of SQL, Data Definition Commands, Set operations, aggregate function, null values, Data Manipulation commands, Data Control commands, Views in SQL, Complex Retrieval
More informationPL/SQL MOCK TEST PL/SQL MOCK TEST IV
http://www.tutorialspoint.com PL/SQL MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to PL/SQL. You can download these sample mock tests at your local
More informationCredit where Credit is Due. Last Lecture. Goals for this Lecture
Credit where Credit is Due Lecture 22: Database Design Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2002 Some material presented in this lecture is taken from section
More information5. Single-row function
1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing
More informationSankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment
Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment Introductory concepts of DBMS 1. Explain detailed 3-level architecture
More informationDatabase Lab Lab 6 DML part 3
Islamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 4113: Database System Lab Eng. Ahmed Abumarasa Database Lab Lab 6 DML part 3 Data Manipulation Language:
More informationOracle Database 11g: SQL and PL/SQL Fundamentals
Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL
More informationLAB 3 Notes. Codd proposed the relational model in 70 Main advantage of Relational Model : Simple representation (relationstables(row,
LAB 3 Notes The Relational Model Chapter 3 In the previous lab we discussed the Conceptual Database Design Phase and the ER Diagram. Today we will mainly discuss how to convert an ER model into the Relational
More informationSQL Structured Query Language Introduction
SQL Structured Query Language Introduction Rifat Shahriyar Dept of CSE, BUET Tables In relational database systems data are represented using tables (relations). A query issued against the database also
More informationThe DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.
Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting
More informationCS511 Design of Database Management Systems
Announcements CS511 Design of Database Management Systems HW incremental release starting last Sun. Class will reschedule next week: time: Wednesday Tuesday 5pm, place: 1310 DCL Lecture 05: Object Relational
More informationOuter Join, More on SQL Constraints
Outer Join, More on SQL Constraints CS430/630 Lecture 10 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke Outer Joins Include in join result non-matching tuples Result tuple
More informationDOWNLOAD PDF INSIDE RELATIONAL DATABASES
Chapter 1 : Inside Microsoft's Cosmos DB ZDNet Inside Relational Databases is an excellent introduction to the topic and a very good resource. I read the book cover to cover and found the authors' insights
More informationEfficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB. Marc Stampfli Oracle Software (Switzerland) Ltd.
Efficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB Marc Stampfli Oracle Software (Switzerland) Ltd. Underestimation According to customers about 20-50% percent
More informationRelational Database Systems Part 01. Karine Reis Ferreira
Relational Database Systems Part 01 Karine Reis Ferreira karine@dpi.inpe.br Aula da disciplina Computação Aplicada I (CAP 241) 2016 Database System Database: is a collection of related data. represents
More informationDatabase Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Representation in Relational Model.
Database Design Database Design I: The Entity-Relationship Model Chapter 5 Goal: specification of database schema Methodology: Use E-R R model to get a high-level graphical view of essential components
More informationSQL: A COMMERCIAL DATABASE LANGUAGE. Data Change Statements,
SQL: A COMMERCIAL DATABASE LANGUAGE Data Change Statements, Outline 1. Introduction 2. Data Definition, Basic Constraints, and Schema Changes 3. Basic Queries 4. More complex Queries 5. Aggregate Functions
More informationDatabase Technology Introduction. Heiko Paulheim
Database Technology Introduction Outline The Need for Databases Data Models Relational Databases Database Design Storage Manager Query Processing Transaction Manager Introduction to the Relational Model
More informationSQL-99: Schema Definition, Basic Constraints, and Queries. Create, drop, alter Features Added in SQL2 and SQL-99
SQL-99: Schema Definition, Basic Constraints, and Queries Content Data Definition Language Create, drop, alter Features Added in SQL2 and SQL-99 Basic Structure and retrieval queries in SQL Set Operations
More informationDatabase Applications
Database Applications Database Programming Application Architecture Objects and Relational Databases John Edgar 2 Users do not usually interact directly with a database via the DBMS The DBMS provides
More informationSQL Interview Questions
SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic
More informationCSE 880:Database Systems. ER Model and Relation Schemas
CSE 880:Database Systems ER Model and Relation Schemas 1 Major Steps for Database Design and Implementation 1. Requirements Collection and Analysis: Produces database requirements such as types of data,
More informationSQL:1999 and Recent Developments in SQL Standardisation
SQL:1999 and Recent Developments in SQL Standardisation by Hugh Darwen IBM United Kingdom Limited Hugh_Darwen@uk.ibm.com 22 May, 2001 (Cambridge University) (c) Hugh Darwen 2001 1 The Parts of SQL Part
More informationOverview Relational data model
Thanks to José and Vaida for most of the slides. Relational databases and MySQL Juha Takkinen juhta@ida.liu.se Outline 1. Introduction: Relational data model and SQL 2. Creating tables in Mysql 3. Simple
More informationCS425 Fall 2016 Boris Glavic Chapter 1: Introduction
CS425 Fall 2016 Boris Glavic Chapter 1: Introduction Modified from: Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Textbook: Chapter 1 1.2 Database Management System (DBMS)
More informationSet theory is a branch of mathematics that studies sets. Sets are a collection of objects.
Set Theory Set theory is a branch of mathematics that studies sets. Sets are a collection of objects. Often, all members of a set have similar properties, such as odd numbers less than 10 or students in
More informationHigh Level Database Models
ICS 321 Fall 2011 High Level Database Models Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 9/21/2011 Lipyeow Lim -- University of Hawaii at Manoa 1 Database
More informationIntroduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe
Introduction to Query Processing and Query Optimization Techniques Outline Translating SQL Queries into Relational Algebra Algorithms for External Sorting Algorithms for SELECT and JOIN Operations Algorithms
More information