Database Design Language Incorporating Collection Types for Web Database Applications

Size: px
Start display at page:

Download "Database Design Language Incorporating Collection Types for Web Database Applications"

Transcription

1 Database Design Language Incorporating Collection Types for Web Database Applications Eric Pardede, Wenny Rahayu Department of Computer Science La Trobe University Bundoora 3086 Australia David Taniar School of Business System Monash University PO BOX 63B, Clayton 3800 Australia KEYWORDS Database Design, Collection Types, Set, List, Bag, Database Design Language ABSTRACT As the most widely used data model, the relational data model has undergone extensions since it was first introduced. The motivation is mainly to increase the ability in capturing complex real world problems. The new era of Internet databases, which includes document meta-data repository and multi media databases have raised a need for more complex semantics of data modeling. Thus, the existing relational database design needs to be extended to capture more complex data structure. One of the data structures is represented by collection types in the attributes of an entity or relationship. With collection type, an attribute can be an atomic type, but also a non-atomic or complex type. The existence of collection type then has changed the whole design methods in relational databases. However, the relational model design has not captured the collection types. Thus, this paper proposes the new database design for the purpose. 1. INTRODUCTION Relational database (RDB) has been very useful for database purposes. However, many believe that this model does not have enough capability to capture the real world problem and thus need to be enriched with concepts from object-oriented database (OODB). One feature that has been introduced in RDB from object-oriented concepts is various data types. RDB attributes of normalized relations are nondecomposable and they tend to have simple data type. On the other side, OODB can support not only atomic data types, but also collection types (Cattell et al. 1997). This feature has emerged the needs for new database design in relational model using collection types. The aim of this paper is to propose an extension to RDB design as opposed to the existing design in OODB or existing implementation in Object Relational Database (ORDB). Even in ORDB, the implementation of few collection types is not supported by good design. There is need to extend the way in modeling the problem domain, so it can capture the new data structures correctly and efficiently. In this paper the design will focus on the database design language (DBDL), which is normally used to express the results of a database design. The proposed DBDL that focuses on collection types is very much suitable for web database applications, in which collections are naturally encountered. 2. THE NEED OF COLLECTION TYPES IN DATABASE FOR WEB APPLICATIONS The current implementation of collection types in XML schema and the need for meta-data repository are only few examples of the collection type significance in web database applications. Currently, the implementation of this feature still follows the traditional relational model and thus the efficiency and performance can become an issue. To demonstrate the current practice, an example is shown in figure 1. With a traditional implementation the association between and Reviewer tables will create another table Rate that stores the references to both tables as well as its own attribute, rating. rating rate name Reviewer contact Figure 1. Association Relationship in Traditional RDB

2 In this association, even a simple query like retrieving the ratings for a book and its particular reviewers will require join operation. In a mark up language like XML, each join will require an individual tedious code. It is very inefficient and one way to solve the problem is by enabling the tables to store the rating as collection type either as a list or a bag (because duplication will be very probable). Despite the increased of its implementation, specific design method on database using collection types has not been existed. It is true that some commercial relational DBMS have already applied the collection types for their products, but even so there are certain aspects of collection types that have not been covered. 3. CURRENT IMPLEMENTATION OF COLLECTION TYPES: STATE OF THE ART Despite the non-existence of a formal design method of collection type in a relational model, some relational DBMS products have provided features to implement collection type. One of the products that has been used in industry and in academic world is Oracle. Oracle 9i has improved the previous release by some additional features, including the collection type implementation, varray and nested table. Most of the additional were intended to access and manage the database using the style and the infrastructure of the Internet. That is why it gives a significance importance of database in Internet computing. Figure 2 shows the syntax and example of creating varray in Oracle9i. In the example Contacts is a collection of data type NUMBER. The collection then can be used as attribute like it is shown by Person table. General Syntax: CREATE [OR REPLACE] TYPE <object schema> AS VARRAY(n) OF (data typeobject); CREATE TABLE <table schema> attribute attribute type); Example: CREATE OR REPLACE TYPE Contacts AS VARRAY(3) OF NUMBER CREATE TABLE Person (person_id person_name person_contact VARCHAR2(10), VARCHAR2(20), Contacts); Figure 2. Oracle 9i Varray Type In Oracle, collections are means of storing a series of data entries that are jointly associated to a corresponding row in the database. Varrays are typically stored inline with respect to their containing row and are assigned an outer limit of values. The collections provided model a one-to-many relationship between a row and a collection without necessitating integrity constraints and a separate data structure (Dorsey and Hudicka 1999). On the other side, nested table is essentially an additional relational table and is not stored inline with the master table. Figure 3 shows the syntax and sample of creating nested table in Oracle9i. General Syntax: CREATE [OR REPLACE] TYPE <object schema> AS OBJECT attribute attribute type); CREATE [OR REPLACE] TYPE <object table schema> AS TABLE OF (object schema); CREATE TABLE <table schema> attribute attribute type, nested item object table schema); NESTED TABLE nested item STORE AS storage table schema (PRIMARY KEY (object table id;object type id)) ORGANIZATION INDEX); Example: CREATE OR REPLACE TYPE Person_Type AS OBJECT (person_id VARCHAR2(10), person_name VARCHAR2(30)) CREATE OR REPLACE TYPE Person_Table_Type AS TABLE OF Person_Type CREATE TABLE Course (course_id VARCHAR2(10), course_name VARCHAR2(20), lecturer Person_Table) NESTED TABLE lecturer STORE AS Person_tab( (PRIMARY KEY (nested_table_id, person_id)) ORGANIZATION INDEX); Figure 3. Oracle9i Nested Table An object type Person_Type is created with its attributes and an object table, Person_Table_Type is created as table of Person_Type. This object table can then be used as a column in a table. When a table type appears as the type of a column in a table or as an attribute of the underlying object type, Oracle stores all of the nested table data in a single table, which is associated with the enclosing table or object type. Every time users create a table with columns or column attributes whose type is nested table, users have to include nested table storage clause, NESTED TABLE (object table column schema) STORE AS followed by the separate storage table name.

3 The example of collection types implementation in figure 2 is actually the implementation of bag collection. Without primary key attached to the collection attributes, the duplication is allowed. On the other side, the nested table in figure 3 is now treated as set collection. The users will not be able to duplicate the person in lecturer attribute. The organization index is a facility in Oracle to sort the data in storage table based on the associated parent table. Sets are unordered collection of elements that do not allow duplicates. The objects that belong to a set are all unique. Figure 4 shows the object or entity with attribute, which is a collection of type set. A book can have several, but a duplication of author is not allowed. In addition the order of author for the book is not concerned. The curly bracket ({}) notation is used to represent sets collection like it is used in ODM. Out of three collection types mentioned before, Oracle can accommodate bags and sets implementation. At this stage, Oracle has not provided method to implement lists. {Author} Author name address contact The implementation of collection type in Oracle and other products have demonstrated the importance and usability of this complex data type. Nevertheless, no formal database design that captures the entire collection types has been proposed. 4. PROPOSED DATABASE DESIGN OF COLLECTION TYPE IN RELATIONAL MODEL In this section the proposed database design to relational model using collection types is provided. The design in this paper will cover the basic formulation of collection types and the DBDL as the language representation of the database design results Formulation of Traditional Relational Model Formulation of traditional relational model is well known since the model was introduced. A simplified formulation involving relations, attributes, domains, tuples, and the keys are described below. Let R be a relation scheme with a finite set of attributes A {A 1, A 2,,A n } and D is the domain of these attributes where D = D 1 D 2 D n. Note that the domain in traditional relational model has atomic restriction. Each attribute A i corresponds to the domain D i where 1 i n. On R, let r be a relation that is a finite set of tuples or set of mapping {t 1, t 2,, t p } from R to D with restriction that for each mapping t r, t(a i ) must be in D i, 1 i n. Let I {I 1, I 2, I m } be the identifiers of a set of objects and the constraint is that I j I k for j N Formulation of New Relational Model incorporating Collection Types The Object Database Management Standard has defined four collection types, namely: sets, lists, arrays, and bags (Cattell et al. 1997). Figure 4. Set Collection Type The formulation of relational model with set collection types in some level has similarity to the traditional relational model formulation. The only difference is that the Domain D has no atomic restriction like in the previous example, where is a set of values of name, address, and contact. Note that the implementation of set collection type does not straightforwardly resemble the traditional relational model implementation, as in the traditional relational model the set has to be implemented as different relation and thus the original relation is flattened. Next collection type, lists are ordered collections of elements that allow duplicates. Similar to the concept of list, arrays are dynamically sized ordered collections that allow duplicates. The main difference between a list and an array is in the method used to store the pointers that assign the next element. Since the difference is from the implementation point of view, both will have the same design procedures. Figure 5 shows the object or entity Borrower with attribute borrower_book, which is a list. A borrower can borrow several books in a span of time. The order of the books borrowed has to be kept and the borrower can borrow the same book several times. The square bracket ([ ]) notation is used to represent lists collection. Borrower borrower_no borrower_name borrower_book borrower_book [] Figure 5. List Collection Type The formulation of relational model with list collection types will change the traditional formulation. Like in set, the domain D will allow non-atomic values. In addition, the key or identifier formulation will have to be changed. In listarray, I {I 1, I 2,, I k,, I m-1, I m }

4 are the identifiers of a listarray of objects and the constraint is that ϑ [ I j, (I 1..m I j ))] (m j where k is the insertion order,ϑ is the number of elements in a listarray, and I j {I 1, I 2,, I m }. The last collection type is bags. A bag is an unordered collection that allows duplicates. Figure 6 shows the renewed object with attribute book_rating, which is a bag. A book can have similar ratings without concerning the order of the ratings. The angle brackets (<>) notation is used to represent sets collection. book_rating book_rating <> Figure 6. Bag Collection Type Rating point comment Like in the previous collection types, if bags are allowed, the domain D will allow non-atomic values. In addition, the key or identifier formulation will have to be changed. In Bag, I {I 1, I 2,, I m } are the identifiers of a bag of objects and the constraint is that ϑ [ I j, (I 1..m I j ))] (m j ZKHUHϑ is the number of elements in a bag, and I j {I 1, I 2,, I m } Database Design Language incorporating Collection Types In relational model, the result of mapping and normalization is basically a list of relational tables that conforms to a certain level of normal forms. These tables however do not allow the designer to include details of various design constraints or issues that are essential to a good design, such as primary and foreign keys, nulls, integrity constraints, etc (Pratt and Adamski 1994). Therefore a specific language is needed to express the results of database design and it is called Database Design Language (DBDL). In relational model, DBDL will focus on the table descriptions including attributes, keys, domains, and referential integrity treatment for database. In this research, DBDL can be used as the starting point of designing the collection types in the RDB, before full research on logical and physical design can be conducted. Most designers put concern on the conceptual, logical, and physical database design for their main interests. There are not many literatures found mentioning DBDL although the purpose is profound. With the foundation from previous research (Pratt and Adamski 1994), we propose a set of rules that can be applied to every type of domains for every type of collection attribute. The rules are described below: 1. Relation and its attributes are represented in the format of Table Name(A 1, A 2,, A n ) 2. Set collection attributes are represented using curly brackets, e.g. Table Name(A 1, {A 2, {A 21, A 22,, A 2m }},, A n ) 3. List collection attributes are represented using square brackets, e.g. Table Name(A 1, [A 2, [A 21, A 22,, A 2m ]],, A n ) 4. Bag collection attributes are represented using angle brackets, e.g. Table Name(A 1, <A 2, <A 21, A 22,, A 2m >>,, A n ) 5. Attributes that are allowed to be null are followed by an asterisk (*). An asterisk on a collection attribute applied to every sub-attributes of the particular attribute, e.g. Table Name(A 1, {A 2, {A 21, A 22,, A 2m } * },, A * n ) 6. Primary keys are identified by the underline, e.g. Table Name(A 1, A 2,, A n ) 7. Collection keys are identified by the dotted underline, e.g. Table Name(A 1, {A 2, {A 21, A 22,, A 2m }},, A n ) 8. Collection keys with index are identified by the dotted underline and super-script i after the attribute, e.g. Table Name(A 1, [A i 2, [A i 21, A 22,, A 2m ]],, A n ) 9. Alternative keys are identified by the letters AK followed by the attribute(s) that comprise the alternative key 10. Secondary keys are identified by the letters SK followed by the attribute(s) that comprise the secondary key 11. Foreign keys are identified by the letters FK followed by the attributes that comprise the foreign keys. These attributes are followed by an arrow pointing to the relation identified by the foreign key, which is the parent relation. After the parent relation name, determine the keys (including primary keys and collection keys where applicable) and the actual attribute being referred, e.g. FK referencing-attribute Table Name (PK, CK1, CK2, referenced-attribute) 12. The rules for maintaining the integrity constraints are specified after the foreign keys declaration mentioned before. After determining the referenced attributes, the action to anticipate update and delete operations are specified, following these rules: a) For delete action: DLT NLS (delete nullifies), DLT RSTR (delete restricted), DLT CSCD, (delete cascades) b) For update action: UPD NLS (update nullifies), UPD RSTR (update restricted), UPD CSCD (update cascades) To demonstrate the use of DBDL an example is provided in figure 7. The DBDL is applied for the Student table, given two other tables Faculty, and Department to display the relationship.

5 Given: Faculty (faculty-number, faculty-name, {degree-code, degree-name, degreelength}) Department (dept-number, dept-name, dept-head) Detailed relation: Student (student-number, student-name, address *, dept-number, {degree}, {subject, {assignment-name, assignment-mark}, {exam-no, exammark}} *, ) AK SK student-name FK dept-number Department (dept-number) DLT RSTR UPD CSCD degree Faculty (facultynumber, degree-code, degreename) DLT RSTR UPD CSCD Figure 7. DBDL Example The simple language for Student table captures the whole design result of the table including the design constraints. This table can be interpreted as follows. Table Table Student has attributes listed with studentnumber as the primary key (underlined) Table Student has two set collection types degree and subject, shown by the curly brackets. The latter has sub-collection inside it Table Student has four collection keys, degree, subject, assignment-name, exam-no, indicate by the dotted underlines Attributes Attribute address and all collection on subject may accept nulls indicated by the asterisks Attribute is another possible key, shown by the symbol AK Attribute student-name is a secondary key, shown by the symbol SK Attribute dept-number is a foreign key pointing to the Department table that has dept-number as primary key and also the attribute being referenced, indicated by the symbol FK Attribute degree is a foreign key pointing to the Faculty table, both are collection attributes. Notice that after the table name, the primary key and collection key have to be specified first before specifying the actual attribute being referred Update of dept-number in Department and degreename in Faculty may be updated and be cascaded in Student (UPD CSCD) 5. CONCLUSIONS AND FUTURE WORK This paper proposes a database design in relational model using collection types. Despite its increasing usage, there is no formal design on database using collection type. Although there are some relational DBMS products have implemented a few of the collection types, the implementation is not accompanied by standardized design. This is the main motivation of the research. This work is just a beginning of series of potential work. They include further design steps that have not been covered in this paper such as the transformation method of the collection into relations, the normalization, and the integrity constraint issue of the collection types. Other potential researches are the query language for the database incorporating collection types and the implementation of the design to the full database application using complete set of collection like it has been performed in OODB. REFERENCES Cattell, R.C.G. (ed.) The Object Database Standard: ODMG 2.0, Morgan Kaufmann Publisher, Inc. Dorsey, P. and J. Hudicka Oracle 8 Design Using UML Object Modelling, Oracle Press, Osborne McGraw Hill Elmasri, R. and S.B. Navathe Fundamentals of Database Systems, 3 rd ed., Addison Wesley Pratt, P.J. and J.J. Adamski Database System: Management and Design, Boyd & Fraser Publishing Co. Boston Operations Deletion of a department is restricted if any student exist (DLT RSTR) and deletion of a degree is restricted if any student exists with the particular degree

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model CS2Bh: Current Technologies Introduction to XML and Relational Databases Spring 2005 The Relational Model CS2 Spring 2005 (LN6) 1 The relational model Proposed by Codd in 1970. It is the dominant data

More information

Relational Databases

Relational Databases Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute

More information

Normal Form vs. Non-First Normal Form

Normal Form vs. Non-First Normal Form Normal Form vs. Non-First Normal Form Kristian Torp Department of Computer Science Aalborg Univeristy www.cs.aau.dk/ torp torp@cs.aau.dk September 1, 2009 daisy.aau.dk Kristian Torp (Aalborg University)

More information

Normalization in OODB Design

Normalization in OODB Design Normalization in OODB Design Byung S. Lee Graduate Programs in Software University of St. Thomas St. Paul, Minnesota bslee@stthomas.edu Abstract When we design an object-oriented database schema, we need

More information

Databases What the Specification Says

Databases What the Specification Says Databases What the Specification Says Describe flat files and relational databases, explaining the differences between them; Design a simple relational database to the third normal form (3NF), using entityrelationship

More information

Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4

Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Schema: The structure of the data Structured Data: Relational, XML-DTD, etc Unstructured Data: CSV, JSON But where does

More information

AVOIDANCE OF CYCLICAL REFERENCE OF FOREIGN KEYS IN DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL

AVOIDANCE OF CYCLICAL REFERENCE OF FOREIGN KEYS IN DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL AVOIDANCE OF CYCLICAL REFERENCE OF FOREIGN KEYS IN DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL Ben B. Kim, Seattle University, bkim@seattleu.edu ABSTRACT The entity-relationship (ER model is clearly

More information

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar Object Oriented Databases OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar Executive Summary The presentation on Object Oriented Databases gives a basic introduction to the concepts governing OODBs

More information

The Relational Data Model: Structure

The Relational Data Model: Structure The Relational Data Model: Structure 1 Overview By far the most likely data model in which you ll implement a database application today. Of historical interest: the relational model is not the first implementation

More information

Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005

Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005 Databasesystemer, forår 2005 IT Universitetet i København Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005 Forelæser: Rasmus Pagh Today s lecture Constraints and triggers Uniqueness

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model 221 After completing this chapter, you should be able to explain the three phases of database design, Why are multiple phases useful? evaluate the significance of the Entity-Relationship

More information

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 Outline More Complex SQL Retrieval Queries

More information

SQL NULL s, Constraints, Triggers

SQL NULL s, Constraints, Triggers CS145 Lecture Notes #9 SQL NULL s, Constraints, Triggers Example schema: CREATE TABLE Student (SID INTEGER PRIMARY KEY, name CHAR(30), age INTEGER, GPA FLOAT); CREATE TABLE Take (SID INTEGER, CID CHAR(10),

More information

Physical Database Design Process. Physical Database Design Process. Major Inputs to Physical Database. Components of Physical Database Design

Physical Database Design Process. Physical Database Design Process. Major Inputs to Physical Database. Components of Physical Database Design Physical Database Design Process Physical Database Design Process The last stage of the database design process. A process of mapping the logical database structure developed in previous stages into internal

More information

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys Database Design Overview Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Conceptual design The Entity-Relationship (ER) Model, UML High-level, close to human thinking Semantic

More information

Concepts of Database Management Seventh Edition. Chapter 6 Database Design 2: Design Method

Concepts of Database Management Seventh Edition. Chapter 6 Database Design 2: Design Method Concepts of Database Management Seventh Edition Chapter 6 Database Design 2: Design Method Objectives Discuss the general process and goals of database design Define user views and explain their function

More information

A basic create statement for a simple student table would look like the following.

A basic create statement for a simple student table would look like the following. Creating Tables A basic create statement for a simple student table would look like the following. create table Student (SID varchar(10), FirstName varchar(30), LastName varchar(30), EmailAddress varchar(30));

More information

Normalization in Database Design

Normalization in Database Design in Database Design Marek Rychly mrychly@strathmore.edu Strathmore University, @ilabafrica & Brno University of Technology, Faculty of Information Technology Advanced Databases and Enterprise Systems 14

More information

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

The Relational Model. Why Study the Relational Model? Relational Database: Definitions The Relational Model Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Microsoft, Oracle, Sybase, etc. Legacy systems in

More information

Database Systems. Lecture 1: Introduction

Database Systems. Lecture 1: Introduction Database Systems Lecture 1: Introduction General Information Professor: Leonid Libkin Contact: libkin@ed.ac.uk Lectures: Tuesday, 11:10am 1 pm, AT LT4 Website: http://homepages.inf.ed.ac.uk/libkin/teach/dbs09/index.html

More information

ICAB4136B Use structured query language to create database structures and manipulate data

ICAB4136B Use structured query language to create database structures and manipulate data ICAB4136B Use structured query language to create database structures and manipulate data Release: 1 ICAB4136B Use structured query language to create database structures and manipulate data Modification

More information

Relational model. Relational model - practice. Relational Database Definitions 9/27/11. Relational model. Relational Database: Terminology

Relational model. Relational model - practice. Relational Database Definitions 9/27/11. Relational model. Relational Database: Terminology COS 597A: Principles of Database and Information Systems elational model elational model A formal (mathematical) model to represent objects (data/information), relationships between objects Constraints

More information

Guide to SQL Programming: SQL:1999 and Oracle Rdb V7.1

Guide to SQL Programming: SQL:1999 and Oracle Rdb V7.1 Guide to SQL Programming: SQL:1999 and Oracle Rdb V7.1 A feature of Oracle Rdb By Ian Smith Oracle Rdb Relational Technology Group Oracle Corporation 1 Oracle Rdb Journal SQL:1999 and Oracle Rdb V7.1 The

More information

CS 632 Advanced Database Systems Object-Relational Database (ORDB) Dr. H. Assadipour

CS 632 Advanced Database Systems Object-Relational Database (ORDB) Dr. H. Assadipour Introduction: CS 632 Advanced Database Systems Object-Relational Database (ORDB) Dr. H. Assadipour Oracle8 introduced Object-Relational Database (ORDB) Management System as extension of purely relational

More information

CSC 443 Data Base Management Systems. Basic SQL

CSC 443 Data Base Management Systems. Basic SQL CSC 443 Data Base Management Systems Lecture 6 SQL As A Data Definition Language Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured

More information

3.GETTING STARTED WITH ORACLE8i

3.GETTING STARTED WITH ORACLE8i Oracle For Beginners Page : 1 3.GETTING STARTED WITH ORACLE8i Creating a table Datatypes Displaying table definition using DESCRIBE Inserting rows into a table Selecting rows from a table Editing SQL buffer

More information

Using Multiple Operations. Implementing Table Operations Using Structured Query Language (SQL)

Using Multiple Operations. Implementing Table Operations Using Structured Query Language (SQL) Copyright 2000-2001, University of Washington Using Multiple Operations Implementing Table Operations Using Structured Query Language (SQL) The implementation of table operations in relational database

More information

Fundamentals of Database System

Fundamentals of Database System Fundamentals of Database System Chapter 4 Normalization Fundamentals of Database Systems (Chapter 4) Page 1 Introduction To Normalization In general, the goal of a relational database design is to generate

More information

COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries

COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries COMP 5138 Relational Database Management Systems Week 5 : Basic COMP5138 "Relational Database Managment Systems" J. Davis 2006 5-1 Today s Agenda Overview Basic Queries Joins Queries Aggregate Functions

More information

How To Manage Data In A Database System

How To Manage Data In A Database System Database Systems Session 2 Main Theme Relational Data Model & Relational Database Constraints Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical

More information

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an

More information

5. CHANGING STRUCTURE AND DATA

5. CHANGING STRUCTURE AND DATA Oracle For Beginners Page : 1 5. CHANGING STRUCTURE AND DATA Altering the structure of a table Dropping a table Manipulating data Transaction Locking Read Consistency Summary Exercises Altering the structure

More information

Schema Evolution in SQL-99 and Commercial (Object-)Relational DBMS

Schema Evolution in SQL-99 and Commercial (Object-)Relational DBMS Schema Evolution in SQL-99 and Commercial (Object-)Relational DBMS Can Türker Swiss Federal Institute of Technology (ETH) Zurich Institute of Information Systems, ETH Zentrum CH 8092 Zurich, Switzerland

More information

Relational Database Basics Review

Relational Database Basics Review Relational Database Basics Review IT 4153 Advanced Database J.G. Zheng Spring 2012 Overview Database approach Database system Relational model Database development 2 File Processing Approaches Based on

More information

SQL Simple Queries. Chapter 3.1 V3.0. Copyright @ Napier University Dr Gordon Russell

SQL Simple Queries. Chapter 3.1 V3.0. Copyright @ Napier University Dr Gordon Russell SQL Simple Queries Chapter 3.1 V3.0 Copyright @ Napier University Dr Gordon Russell Introduction SQL is the Structured Query Language It is used to interact with the DBMS SQL can Create Schemas in the

More information

A Tool for Generating Relational Database Schema from EER Diagram

A Tool for Generating Relational Database Schema from EER Diagram A Tool for Generating Relational Schema from EER Diagram Lisa Simasatitkul and Taratip Suwannasart Abstract design is an important activity in software development. EER diagram is one of diagrams, which

More information

The Relational Data Model and Relational Database Constraints

The Relational Data Model and Relational Database Constraints The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations and Dealing with Constraint

More information

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3 The Relational Model Chapter 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase,

More information

www.dotnetsparkles.wordpress.com

www.dotnetsparkles.wordpress.com Database Design Considerations Designing a database requires an understanding of both the business functions you want to model and the database concepts and features used to represent those business functions.

More information

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms.

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms. Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS

More information

4. SQL. Contents. Example Database. CUSTOMERS(FName, LName, CAddress, Account) PRODUCTS(Prodname, Category) SUPPLIERS(SName, SAddress, Chain)

4. SQL. Contents. Example Database. CUSTOMERS(FName, LName, CAddress, Account) PRODUCTS(Prodname, Category) SUPPLIERS(SName, SAddress, Chain) ECS-165A WQ 11 66 4. SQL Contents Basic Queries in SQL (select statement) Set Operations on Relations Nested Queries Null Values Aggregate Functions and Grouping Data Definition Language Constructs Insert,

More information

SQL Server. 1. What is RDBMS?

SQL Server. 1. What is RDBMS? SQL Server 1. What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained

More information

Objectives of SQL. Terminology for Relational Model. Introduction to SQL

Objectives of SQL. Terminology for Relational Model. Introduction to SQL Karlstad University Department of Information Systems Adapted for a textbook by Date C. J. An Introduction to Database Systems Pearson Addison Wesley, 2004 Introduction to SQL Remigijus GUSTAS Phone: +46-54

More information

Instant SQL Programming

Instant SQL Programming Instant SQL Programming Joe Celko Wrox Press Ltd. INSTANT Table of Contents Introduction 1 What Can SQL Do for Me? 2 Who Should Use This Book? 2 How To Use This Book 3 What You Should Know 3 Conventions

More information

Chapter 9: Object-Based Databases

Chapter 9: Object-Based Databases Chapter 9: Object-Based Databases Database System Concepts See www.db-book.com for conditions on re-use Database System Concepts Chapter 9: Object-Based Databases Complex Data Types and Object Orientation

More information

A Rational Software Whitepaper

A Rational Software Whitepaper The UML and Data Modeling A Rational Software Whitepaper Table of Contents Introduction...1 The UML Data Modeling Profile...1 Database...1 Schema...2 Table...2 Key...3 Index...4 Relationship...5 Column...6

More information

SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6

SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 SUBQUERIES AND VIEWS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 String Comparisons and GROUP BY 2! Last time, introduced many advanced features of SQL, including GROUP BY! Recall:

More information

IT2304: Database Systems 1 (DBS 1)

IT2304: Database Systems 1 (DBS 1) : Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation

More information

CPS352 Database Systems: Design Project

CPS352 Database Systems: Design Project CPS352 Database Systems: Design Project Purpose: Due: To give you experience with designing and implementing a database to model a real domain Various milestones due as shown in the syllabus Requirements

More information

Relational Database Concepts

Relational Database Concepts Relational Database Concepts IBM Information Management Cloud Computing Center of Competence IBM Canada Labs 1 2011 IBM Corporation Agenda Overview Information and Data Models The relational model Entity-Relationship

More information

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database. Physical Design Physical Database Design (Defined): Process of producing a description of the implementation of the database on secondary storage; it describes the base relations, file organizations, and

More information

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY 2.1 Introduction In this chapter, I am going to introduce Database Management Systems (DBMS) and the Structured Query Language (SQL), its syntax and usage.

More information

Information Systems SQL. Nikolaj Popov

Information Systems SQL. Nikolaj Popov Information Systems SQL Nikolaj Popov Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria popov@risc.uni-linz.ac.at Outline SQL Table Creation Populating and Modifying

More information

Oracle Database 10g Express

Oracle Database 10g Express Oracle Database 10g Express This tutorial prepares the Oracle Database 10g Express Edition Developer to perform common development and administrative tasks of Oracle Database 10g Express Edition. Objectives

More information

Section of DBMS Selection & Evaluation Questionnaire

Section of DBMS Selection & Evaluation Questionnaire Section of DBMS Selection & Evaluation Questionnaire Whitemarsh Information Systems Corporation 2008 Althea Lane Bowie, Maryland 20716 Tele: 301-249-1142 Email: mmgorman@wiscorp.com Web: www.wiscorp.com

More information

3. Relational Model and Relational Algebra

3. Relational Model and Relational Algebra ECS-165A WQ 11 36 3. Relational Model and Relational Algebra Contents Fundamental Concepts of the Relational Model Integrity Constraints Translation ER schema Relational Database Schema Relational Algebra

More information

Fundamentals of Database Design

Fundamentals of Database Design Fundamentals of Database Design Zornitsa Zaharieva CERN Data Management Section - Controls Group Accelerators and Beams Department /AB-CO-DM/ 23-FEB-2005 Contents : Introduction to Databases : Main Database

More information

Database IST400/600. Jian Qin. A collection of data? A computer system? Everything you collected for your group project?

Database IST400/600. Jian Qin. A collection of data? A computer system? Everything you collected for your group project? Relational Databases IST400/600 Jian Qin Database A collection of data? Everything you collected for your group project? A computer system? File? Spreadsheet? Information system? Date s criteria: Integration

More information

CIS 631 Database Management Systems Sample Final Exam

CIS 631 Database Management Systems Sample Final Exam CIS 631 Database Management Systems Sample Final Exam 1. (25 points) Match the items from the left column with those in the right and place the letters in the empty slots. k 1. Single-level index files

More information

Introduction to Triggers using SQL

Introduction to Triggers using SQL Introduction to Triggers using SQL Kristian Torp Department of Computer Science Aalborg University www.cs.aau.dk/ torp torp@cs.aau.dk November 24, 2011 daisy.aau.dk Kristian Torp (Aalborg University) Introduction

More information

Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Physical Design. Phases of database design. Physical design: Inputs.

Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Physical Design. Phases of database design. Physical design: Inputs. Phases of database design Application requirements Conceptual design Database Management Systems Conceptual schema Logical design ER or UML Physical Design Relational tables Logical schema Physical design

More information

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks]

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks] EXAMINATIONS 2005 MID-YEAR COMP 302 Database Systems Time allowed: Instructions: 3 Hours Answer all questions. Make sure that your answers are clear and to the point. Write your answers in the spaces provided.

More information

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

Chapter 1: Introduction. Database Management System (DBMS) University Database Example This image cannot currently be displayed. Chapter 1: Introduction Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Database Management System (DBMS) DBMS contains information

More information

More on SQL. Juliana Freire. Some slides adapted from J. Ullman, L. Delcambre, R. Ramakrishnan, G. Lindstrom and Silberschatz, Korth and Sudarshan

More on SQL. Juliana Freire. Some slides adapted from J. Ullman, L. Delcambre, R. Ramakrishnan, G. Lindstrom and Silberschatz, Korth and Sudarshan More on SQL Some slides adapted from J. Ullman, L. Delcambre, R. Ramakrishnan, G. Lindstrom and Silberschatz, Korth and Sudarshan SELECT A1, A2,, Am FROM R1, R2,, Rn WHERE C1, C2,, Ck Interpreting a Query

More information

Define terms Write single and multiple table SQL queries Write noncorrelated and correlated subqueries Define and use three types of joins

Define terms Write single and multiple table SQL queries Write noncorrelated and correlated subqueries Define and use three types of joins Chapter 7 Advanced SQL 1 Define terms Objectives Write single and multiple table SQL queries Write noncorrelated and correlated subqueries Define and use three types of joins 2 Nested Queries (Subqueries)

More information

DATABASE MANAGEMENT SYSTEMS. Question Bank:

DATABASE MANAGEMENT SYSTEMS. Question Bank: DATABASE MANAGEMENT SYSTEMS Question Bank: UNIT 1 1. Define Database? 2. What is a DBMS? 3. What is the need for database systems? 4. Define tupule? 5. What are the responsibilities of DBA? 6. Define schema?

More information

TIM 50 - Business Information Systems

TIM 50 - Business Information Systems TIM 50 - Business Information Systems Lecture 15 UC Santa Cruz March 1, 2015 The Database Approach to Data Management Database: Collection of related files containing records on people, places, or things.

More information

www.gr8ambitionz.com

www.gr8ambitionz.com Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1

More information

The Relational Model. Why Study the Relational Model?

The Relational Model. Why Study the Relational Model? The Relational Model Chapter 3 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh 1 Why Study the Relational Model?

More information

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT DATABASE SYSTEMS

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT DATABASE SYSTEMS BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT DATABASE SYSTEMS any FOUR questions out of SIX. All questions carry equal marks Time: TWO hours The marks

More information

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems CSC 74 Database Management Systems Topic #0: SQL Part A: Data Definition Language (DDL) Spring 00 CSC 74: DBMS by Dr. Peng Ning Spring 00 CSC 74: DBMS by Dr. Peng Ning Schema and Catalog Schema A collection

More information

IT2305 Database Systems I (Compulsory)

IT2305 Database Systems I (Compulsory) Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

More information

Microsoft s new database modeling tool: Part 1

Microsoft s new database modeling tool: Part 1 Microsoft s new database modeling tool: Part 1 Terry Halpin Microsoft Corporation Abstract: This is the first in a series of articles introducing the Visio-based database modeling component of Microsoft

More information

USING OBJECT-RELATIONAL DATABASE TECHNOLOGY TO SOLVE PROBLEMS IN DATABASE DEVELOPMENT

USING OBJECT-RELATIONAL DATABASE TECHNOLOGY TO SOLVE PROBLEMS IN DATABASE DEVELOPMENT USING OBJECT-RELATIONAL DATABASE TECHNOLOGY TO SOLVE PROBLEMS IN DATABASE DEVELOPMENT Ming Wang, California State University, ming.wang@calstatela.edu ABSTRACT The emergence of object-relational database

More information

Fragmentation and Data Allocation in the Distributed Environments

Fragmentation and Data Allocation in the Distributed Environments Annals of the University of Craiova, Mathematics and Computer Science Series Volume 38(3), 2011, Pages 76 83 ISSN: 1223-6934, Online 2246-9958 Fragmentation and Data Allocation in the Distributed Environments

More information

Umbrello UML Modeller Handbook

Umbrello UML Modeller Handbook 2 Contents 1 Introduction 7 2 UML Basics 8 2.1 About UML......................................... 8 2.2 UML Elements........................................ 9 2.2.1 Use Case Diagram.................................

More information

VARRAY AND NESTED TABLE

VARRAY AND NESTED TABLE Oracle For Beginners Page : 1 Chapter 23 VARRAY AND NESTED TABLE What is a collection? What is a VARRAY? Using VARRAY Nested Table Using DML commands with Nested Table Collection methods What is a collection?

More information

Relational Databases and SQLite

Relational Databases and SQLite Relational Databases and SQLite Charles Severance Python for Informatics: Exploring Information www.pythonlearn.com SQLite Browser http://sqlitebrowser.org/ Relational Databases Relational databases model

More information

Oracle 10g PL/SQL Training

Oracle 10g PL/SQL Training Oracle 10g PL/SQL Training Course Number: ORCL PS01 Length: 3 Day(s) Certification Exam This course will help you prepare for the following exams: 1Z0 042 1Z0 043 Course Overview PL/SQL is Oracle's Procedural

More information

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7 SQL DATA DEFINITION: KEY CONSTRAINTS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7 Data Definition 2 Covered most of SQL data manipulation operations Continue exploration of SQL

More information

Semantic Errors in SQL Queries: A Quite Complete List

Semantic Errors in SQL Queries: A Quite Complete List Semantic Errors in SQL Queries: A Quite Complete List Christian Goldberg, Stefan Brass Martin-Luther-Universität Halle-Wittenberg {goldberg,brass}@informatik.uni-halle.de Abstract We investigate classes

More information

Triggers & Packages. {INSERT [OR] UPDATE [OR] DELETE}: This specifies the DML operation.

Triggers & Packages. {INSERT [OR] UPDATE [OR] DELETE}: This specifies the DML operation. Triggers & Packages An SQL trigger is a mechanism that automatically executes a specified PL/SQL block (referred to as the triggered action) when a triggering event occurs on the table. The triggering

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: +966 12 739 894 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training is designed to

More information

2. Basic Relational Data Model

2. Basic Relational Data Model 2. Basic Relational Data Model 2.1 Introduction Basic concepts of information models, their realisation in databases comprising data objects and object relationships, and their management by DBMS s that

More information

Database Design Methodology

Database Design Methodology Database Design Methodology Three phases Database Design Methodology Logical database Physical database Constructing a model of the information used in an enterprise on a specific data model but independent

More information

Object-persistence formats. Files. Object-oriented databases. Data management layer design. Relational databases. Relational Database Example.

Object-persistence formats. Files. Object-oriented databases. Data management layer design. Relational databases. Relational Database Example. Modelling and Systems Development Lecture 2 Data management layer design Mapping problem-domain objects to object-persistence formats Object-persistence formats Files Sequential and random-access Relational

More information

Data Modeling: Part 1. Entity Relationship (ER) Model

Data Modeling: Part 1. Entity Relationship (ER) Model Data Modeling: Part 1 Entity Relationship (ER) Model MBA 8473 1 Cognitive Objectives (Module 2) 32. Explain the three-step process of data-driven information system (IS) development 33. Examine the purpose

More information

Access Tutorial 2: Tables

Access Tutorial 2: Tables Access Tutorial 2: Tables 2.1 Introduction: The importance of good table design Tables are where data in a database is stored; consequently, tables form the core of any database application. In addition

More information

Advance DBMS. Structured Query Language (SQL)

Advance DBMS. Structured Query Language (SQL) Structured Query Language (SQL) Introduction Commercial database systems use more user friendly language to specify the queries. SQL is the most influential commercially marketed product language. Other

More information

Databases and DBMS. What is a Database?

Databases and DBMS. What is a Database? Databases and DBMS Eric Lew (MSc, BSc) SeconSys Inc. Nov 2003 What is a Database? Data (singular: datum) Factual Information Database Organized body of related information Repository / storage of information

More information

Financial Management System

Financial Management System DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING UNIVERSITY OF NEBRASKA LINCOLN Financial Management System CSCE 156 Computer Science II Project Student 002 11/15/2013 Version 3.0 The contents of this document

More information

Preview DESIGNING DATABASES WITH VISIO PROFESSIONAL: A TUTORIAL

Preview DESIGNING DATABASES WITH VISIO PROFESSIONAL: A TUTORIAL DESIGNING DATABASES WITH VISIO PROFESSIONAL: A TUTORIAL A Microsoft Visio Professional is a powerful database design and modeling tool. The Visio software has so many features that it is impossible to

More information

Introduction to SQL (3.1-3.4)

Introduction to SQL (3.1-3.4) CSL 451 Introduction to Database Systems Introduction to SQL (3.1-3.4) Department of Computer Science and Engineering Indian Institute of Technology Ropar Narayanan (CK) Chatapuram Krishnan! Summary Parts

More information

The process of database development. Logical model: relational DBMS. Relation

The process of database development. Logical model: relational DBMS. Relation The process of database development Reality (Universe of Discourse) Relational Databases and SQL Basic Concepts The 3rd normal form Structured Query Language (SQL) Conceptual model (e.g. Entity-Relationship

More information

A Brief Introduction to MySQL

A Brief Introduction to MySQL A Brief Introduction to MySQL by Derek Schuurman Introduction to Databases A database is a structured collection of logically related data. One common type of database is the relational database, a term

More information

USING UML FOR OBJECT-RELATIONAL DATABASE SYSTEMS DEVELOPMENT: A FRAMEWORK

USING UML FOR OBJECT-RELATIONAL DATABASE SYSTEMS DEVELOPMENT: A FRAMEWORK USING UML FOR OBJECT-RELATIONAL DATABASE SYSTEMS DEVELOPMENT: A FRAMEWORK Ming Wang, California State University, ming.wang@calstatela.edu ABSTRACT Data model of object-relational databases (ORDBs) is

More information

OBJECT ORIENTED EXTENSIONS TO SQL

OBJECT ORIENTED EXTENSIONS TO SQL OBJECT ORIENTED EXTENSIONS TO SQL Thomas B. Gendreau Computer Science Department University Wisconsin La Crosse La Crosse, WI 54601 gendreau@cs.uwlax.edu Abstract Object oriented technology is influencing

More information

Programming with SQL

Programming with SQL Unit 43: Programming with SQL Learning Outcomes A candidate following a programme of learning leading to this unit will be able to: Create queries to retrieve information from relational databases using

More information

Guide to Performance and Tuning: Query Performance and Sampled Selectivity

Guide to Performance and Tuning: Query Performance and Sampled Selectivity Guide to Performance and Tuning: Query Performance and Sampled Selectivity A feature of Oracle Rdb By Claude Proteau Oracle Rdb Relational Technology Group Oracle Corporation 1 Oracle Rdb Journal Sampled

More information