Functions as Conditionally Discoverable Relational Database Tables

Size: px
Start display at page:

Download "Functions as Conditionally Discoverable Relational Database Tables"

Transcription

1 Functions as Conditionally Discoverable Relational Database Tables A. Ondi and T. Hagan Securboration, Inc., Melbourne, FL, USA Abstract - It is beneficial for large enterprises to have an accurate and up-to-date picture of the status of the enterprise, yet the information, though available, is rarely accessible from one place and in a unified manner. The research presented here introduces conditionally discoverable relational database tables (CDTs) that present a subset of the information they contain via links to special input columns. Such CDTs can be used to present functions and web-methods in a unified relational manner, thus easing the burden on information discovery. CDTs can be used in conjunction with each other or with other traditional database tables via SQL SELECT queries. Keywords: Conditionally discoverable table, Virtual table, Relational database, Information discovery 1 Motivation It is beneficial for large enterprises to have an accurate and up-to-date picture of the status of the enterprise, yet the information, though available, is rarely accessible from one place and in a unified manner. Having to know what piece of the big picture is located where hinders putting together a comprehensive overview. The goal of the research presented here is to help in the understanding of the current status of large enterprises where the information needed is disparately located, by offering a unified view of the available data at a single location. 2 Background Relational databases [1] have long been used to store, retrieve and manipulate information. One of their beneficial qualities is that the information is presented in a unified manner: all data is stored as rows of tables, the columns of which representing the various aspects of the data, referred to by the name of the column. The database is broken up into a number of tables, each representing a coherent view of a subset of the data. Relationship between the views offered by the tables can be further established by linking columns of the different tables (and sometimes within one table). As all aspects of the data (up to access rights) can be linked, users with a good understanding of the layout of the data can craft queries that can answer many questions about the data (e.g. Which manufacturers are behind schedule for parts used in the construction of product X? ). The name of the table columns, the type of the data stored in the columns and possible restrictions on the data (ensuring its integrity) stored in the tables are described in schemas, which allow discovery of the data. It is important to note that the view of the data in relational databases is static, similarly to procedural programming languages: the data is accessed and manipulated by external processes (in this case, queries). Objects in object-oriented programming languages [2] store data adhering to the principles of abstraction, encapsulation, inheritance and polymorphism. Moreover, the view of the data is dynamic: the processes to access and manipulate the data captured by the objects are associated with the objects themselves (in the form of member functions), ensuring the integrity of the state of the objects they are associated with. Relationship between objects are established directly by encapsulation or indirectly by linking aspects (exposed via member functions) of different objects. Due to their differences in what data is accessible, how they are linked and the ways to ensure the integrity of the data, relational databases and object oriented languages had a hard time working together. Either the objects had to be opened up to enable storage in relational databases (thus violating the abstraction and encapsulation principles); or the objects had to be stored in object databases [3] that allow discovery of information in only ways the objects were specifically designed for (e.g. following one-way pointers to other objects). To alleviate the object-relational impedance mismatch, object-relational databases [4] were created that offer a hybrid approach between pure relational and pure object databases by allowing the storage of objects in relational tables that preserve their compound types (along with inheritance), while still allowing queries similar to those in pure relational databases. 3 Approach The data is presented as (virtual) relational database tables, thus our system can be viewed as a mostly read-only relational database server, supporting a large subset of the SELECT section of the Standard Query Language (SQL)

2 (Reddy, 2008). The virtual tables can be backed by real database tables, web services or any other means the data is available. 3.1 Functions as Tables Whereas presenting data in a virtual database table is straightforward when it is backed by other database tables, the situation is somewhat more complicated when the virtual table is backed by functions (e.g. in the form of web methods of a web service). From a mathematical point of view, functions are relations between their input values and their output values; therefore a table can be formed by listing the values of the function for each input. For example, if the function to be represented is f(x:int):int=2*x, the corresponding table representation is as listed in Table 1. Table 1 : Table representation of f(x:int):int=2x x:int f(x):int Immediately, we can see that constructing the whole table is troublesome for at least two reasons. First, the range of the input values can be quite large (compounded for functions with multiple input values). Second, knowing the domain of the function is non-trivial. Both of these issues can be circumvented if we require the input values to be provided for the virtual table. For example, the above f(x) can be easily computed and represented if the values -1, 0, 1, 2 are provided for x, yielding the result listed in Table 2. Table 2 : Table representation of f(x:int):int=2x restricted to x ϵ {-1, 0, 1, 2} x:int f(x):int This requirement turns the virtual table into a conditionally discoverable table (CDT): in order to discover the contents of the table, one has to provide a subset of the table columns. Note that such conditionally discoverable tables are equitable to functions in imperative languages indeed, it was precisely our desire to represent imperative functions that drove the conditions imposed on the table. The restrictions of conditionally discoverable tables are easily satisfiable: one has to provide the required input values as a table in the first part of a JOIN expression (possibly with column aliasing to match the name of the input value), where the second part of the JOIN is the desired conditionally discoverable table. In situations where the same name is used for different input values (e.g. two different functions f(x) and g(x) are backing two tables used in the construction of the result table) the conflict is resolvable by using sub-queries for each CDT, followed by possible column aliasing to avoid column name conflict, just as with the classic use of JOIN. Note that tables that are backed by functions that do not require input values (e.g. constants) have an empty condition and are unconditionally discoverable, thus the JOIN can be avoided. Although this conditionality theoretically restricts the discovery of the whole table, it does not impose a real restriction as we are able to discover all the rows of the table that are relevant to our purpose. 3.2 Objects as Tables Another issue we have to address in order to use objectoriented web methods is the representation of objects in our tables. Although objects in the object-oriented paradigm fulfill a number of requirements (abstraction, encapsulation, inheritance and polymorphism), it will be sufficient to view objects here as plain old data with the possibility of inheritance, utilizing the shallow and static nature of objects used in web methods. To represent compound data values (objects) in tables, we need to decompose them recursively into columns following the member values. Note that the traditional dot notation used in imperative programming languages uniquely identifies the member values, up to object identity. Using this scheme and using the parameter names (for input parameters) and the returned type name (for return value) as the base name of the columns, the function getpersonnelinfo(employeeid:int): PersonnelInfo that returns personnel information given the ID value of an employee can be represented as a CDT as listed in Table 3. Note that although in the above example the input parameter (employeeid) is superfluous as it appears as part of the returned values, this is not necessarily the case: a function getaddress(employeeid:int):address would only return the address associated with the employee ID, but not he ID itself. For the sake of generality, we will not differentiate between these cases and include the input parameters in the function s table representation.

3 Table 3 : Table representation of function getpersonnelinfo(empoyeeid:int):personnelinfo columns represented as rows for easier readability employeeid:int employeeid:int firstname:string Jane John lastname:string Dow Smith address.street:string 123 Apple St. 45 Orange Ct. address.city:string Melbourne Melbourne address.state:string FL FL address.zip:int phone:string The choice of base column name for the return value is arbitrary and can be custom-set for each function-backed virtual table. This helps in cases where the return value is a simple type, like int that has little meaning to a human Handling collection values Function return values and members of objects can have collection types (e.g. lists, sets). The straight-forward approach is to represent all collections by replicating the associated rows for each value of the collection; however there are problems with is approach: if the collection is empty, it will lead to leaving out all other member value data as well. A refined approach is to follow the 2NF recommendations of relational database design [1] and factor the collection representations into their own tables and connect to the rest of the object by an artificial ID value (the name of which is arbitrary, as long as it does not conflict with other column names). To demonstrate, assume a modified version of the above getpersonnelinfo function that returns a list of known addresses and phone numbers for each employee and that Jane Dow has two known addresses (123 Apple St., Melbourne, FL and 6 Date Ln., New York, NY 10453), and John Smith has two known addresses (45 Orange Ct., Melbourne, FL and 78 Mango Ave., Chicago, IL 60007) and two phone numbers ( and ). The resulting tables are listed in Tables 4-8. Under this scheme, the various sub-tables have to be JOIN-ed to connect the non-collection parts to their corresponding collections; however care must be taken as JOIN-ing on empty tables will lead to the same issues as the straightforward approach Handling of null values Occasionally, functions return null values or objects that have null members, often representing processing errors or missing information. In such cases, each column related to the null value can be set to null. Although this is against the strict guidelines of traditional database design [1], the alternatives are no better: either leave out the entire object or use known error values. The first approach might be acceptable for null return values, but it can hide useful information if only some members of the returned value is null; the second approach requires that no backing function returns values that use the designated values representing error, which is usually an unrealistic requirement as this restriction is rarely known to the developers of the backing functions. 3.3 Temporal Tables The last issue to remedy is the possibility of temporal functions: functions that return different values at different invocation times, for the same input values. Although the reason for such temporality can be many-fold (e.g. change of underlying hidden state, dependence on current time, use of random numbers), the exact cause is irrelevant for our considerations. To resolve the issue, we extend the resulting table with a new column (taking care to avoid conflicts with existing column names) representing the time of invocation of the underlying function. Note that since this extra column can introduce unnecessary complications (e.g. triggering a false-positive in change detection of the returned data when only the timecolumn has changed), this extension can be used per-table, as needed. Of course, the extra column could also be easily removed with a projection in the query. 3.4 Dependencies between Tables It is often tedious to write queries by hand, especially when the input columns of conditionally discoverable tables are numerous (as can be the case when the input parameters of the backing function are complex objects themselves). In cases when some of the non-input columns of other tables correspond to input columns of a conditionally discoverable table, these two tables can be linked. These links then can be used to automatically supply the necessary components for a JOIN between the two tables. Moreover, when there is only one table that is linked to another s input columns, the first table can be automatically added to the JOIN when the second table s input columns are not fully specified.

4 Table 4 : Main-table representation of the modified getpersonnelinfo function employeeid:int employeeid:int firstname:string lastname:string Jane Dow John Smith Table 5 : Sub-table of the modified getpersonnelinfo function, representing the address values address_id:int address.street:string address.city:string address.state:string address.zip:int Apple St. Melbourne FL Date Ln. New York NY Orange Ct. Melbourne FL Mango Ave. Chicago0 IL Table 6 : Sub-table of the modified getpersonnelinfo function, representing the phone values phone_id:int phone:string Table 7 : Sub-table of the modified getpersonnelinfo function, representing the connection between the main table and the address sub-table employeeid:int address_id:int Table 8 : Sub-table of the modified getpersonnelinfo function, representing the connection between the main table and the phone sub-table employeeid:int phone_id:int The dependency relations between tables are stored in an internal knowledge base, identifying the tables linked and the column alignment (with possible aliasing). To demonstrate the effects of table dependencies, consider a scenario, where information about items in a warehouse inventory system can be accessed via the following functions: getwarehouses(zip:int):[int] getinventory(warehouseid:int):inventoryitem{itemid:int, itemcount:int} and where brackets ( [] ) represent lists, braces ( {} ) denote their associated compound types and getwarehouses returns a list of warehouse IDs belonging to the given ZIP code. The corresponding virtual tables are named after their backing functions and the base name of the getwarehouses return column names is set to warehouseid. There are two dependency relationships: getinventory depends on getwarehouses with the column getinventory.warehouseid aligned with getwarehouses.warehouseid and getiteminfo(id:int):iteminfo{id:int, manufacturerid:int}, pricecents:int, getiteminfo depends on getinventory with the column getieminfo.id aligned with getinventory.inventoryitem.itemid

5 Listing 1 : Unassisted SQL query assessing the total price of items stored in warehouses in the ZIP area SELECT SUM(getInventory.inventoryItem.itemCount * getiteminfo.iteminfo.pricecents) FROM (SELECT DISTINCT AS zip FROM tables) AS tmp JOIN getwarehouses ON getwarehouses.zip = tmp.zip JOIN getinventory ON getinventory.warehouseid = getwarehouses.warehouseid JOIN getiteminfo ON getiteminfo.id = getinventory.inventoryitem.itemid Listing 2 : Modified query of Listing 1 using column alignment and aliasing SELECT SUM(getInventory.inventoryItem.itemCount * getiteminfo.iteminfo.pricecents) FROM (SELECT DISTINCT AS zip FROM tables) AS tmp JOIN getwarehouses JOIN getinventory JOIN getiteminfo Listing 3 : Modified query of Listing 1 using singleton dependency information on tables getinventory and getiteminfo SELECT SUM(getInventory.inventoryItem.itemCount * getiteminfo.iteminfo.pricecents) FROM (SELECT DISTINCT AS zip FROM tables) AS tmp JOIN getiteminfo An unassisted query assessing the total price of the items stored in warehouses in the ZIP area would look like as presented in Listing 1. Note that the inner SELECT expression is a work-around for the fact that getwarehouses is a CDT, and therefore needs its input columns satisfied. Were it unconditionally discoverable, we could have used the traditional approach with a WHERE clause. The table tables is guaranteed to be present and non-empty (listing the available tables in the database, although that is irrelevant for the above query). Using the dependency information, the query can be written as presented in Listing 2. The system recognizes the special dependency relationship between the tables getinventory/getiteminfo; and re-writes the JOIN expression to use the column alignment and aliasing information associated with the dependencies. The input columns of getwarehouses and getinventory are fulfilled by rows of the expected name and type present. The query can be even further simplified, as presented in Listing 3, if the only table getinventory depended on was getwarehouses (and similarly for getiteminfo and getinventory). The system identifies that there are unfulfilled input columns of getiteminfo and that there is a unique dependency on table getinventory (similarly for getinventory and getwarehouses), thus re-writing the query to the previous form (which will be further re-written to the original). 4 Conclusion In this paper we presented a database system utilizing conditionally discoverable virtual relational tables that can be used to represent web-methods in a relational manner, thus allowing information discovery of an enterprise in a unified manner. Although any function can be used to back a CDT, care must be taken to minimize the use of functions that modify system state (e.g. storing information that other processes or functions utilize), restricting their use to functions for information discovery. The reason for this is the mental discrepancy between a query (which is associated with discovering information without modifying it) and an update (which is associated with modification of information): users of the system will expect that SELECT queries do not modify the state of the database or have other external impact. Relational database management systems often support the notion of stored procedures: query statement templates that are pre-constructed and can be invoked by providing a number of parameters. Stored procedures ease the burden of using the system by not requiring the user to understand how to craft the required valid query statement, nor to understand how the data is structured in the database these are done by the administrator who creates the stored queries. This idea can be easily implemented for our system as well, by capturing the stored procedures in the internal knowledge base.

6 5 Future Work The system presented in this paper is a work in progress, which we are planning to improve in a number of ways. First, if information about the backing functions is programmatically discoverable (e.g. via source code, reflection or WDSL), the dependency information between tables can be partially automated: a discovery process can list all other functions/tables that can be used in satisfying the input columns of the CDT, thus easing the burden on the human administrator of the system. Second, although collecting information about an enterprise in one place is certainly beneficial for gaining an up-to-date picture, it is essential to ensure only people with appropriate rights can access the system. Access rights can be established to restrict access to individual tables or to combinations of tables (as combining information is sometimes more damaging than access to only parts of the picture). 6 Acknowledgement This work was supported in part by the Air Force Research Laboratory, Contract No. AF References [1] C. J. Date. Database Design and Relational Theory: Normal Forms and All That Jazz. O'Reilly Media, 2012 [2] B. Pierce. Types and Programming languages. MIT Press, [3] W. Kim. Introduction to Object-Oriented Databases. MIT Press, [4] M. A. Stonebreaker. Object-Relational DBMSs: The Next Great Wave. Morgan Kaufmann Publishers, [5] M. Reddy. Structured Query Language (SQL). Encyclopedia of geographic information science, , 2008.

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

METADATA INTERCHANGE IN SERVICE BASED ARCHITECTURE

METADATA INTERCHANGE IN SERVICE BASED ARCHITECTURE UDC:681.324 Review paper METADATA INTERCHANGE IN SERVICE BASED ARCHITECTURE Alma Butkovi Tomac Nagravision Kudelski group, Cheseaux / Lausanne alma.butkovictomac@nagra.com Dražen Tomac Cambridge Technology

More information

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases Systems Analysis and Design in a Changing World, Fourth Edition Chapter : Designing Databases Learning Objectives Describe the differences and similarities between relational and object-oriented database

More information

What are the characteristics of Object Oriented programming language?

What are the characteristics of Object Oriented programming language? What are the various elements of OOP? Following are the various elements of OOP:- Class:- A class is a collection of data and the various operations that can be performed on that data. Object- This is

More information

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure Databases databases Terminology of relational model Properties of database relations. Relational Keys. Meaning of entity integrity and referential integrity. Purpose and advantages of views. The relational

More information

0. Database Systems 1.1 Introduction to DBMS Information is one of the most valuable resources in this information age! How do we effectively and efficiently manage this information? - How does Wal-Mart

More information

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity. OOPS Viva Questions 1. What is OOPS? OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.

More information

Database Management

Database Management Database Management - 2011 Model Answers 1. a. A data model should comprise a structural part, an integrity part and a manipulative part. The relational model provides standard definitions for all three

More information

The return Statement

The return Statement The return Statement The return statement is the end point of the method. A callee is a method invoked by a caller. The callee returns to the caller if the callee completes all the statements (w/o a return

More information

DEVELOPING DATABASE APPLICATIONS (INTERMEDIATE MICROSOFT ACCESS, X405.5)

DEVELOPING DATABASE APPLICATIONS (INTERMEDIATE MICROSOFT ACCESS, X405.5) Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DEVELOPING DATABASE APPLICATIONS (INTERMEDIATE MICROSOFT ACCESS, X405.5) Section 4 AGENDA

More information

Relational Databases

Relational Databases Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 49 Plan of the course 1 Relational databases 2 Relational database design 3 Conceptual database design 4

More information

Unified Modeling Language

Unified Modeling Language Unified Modeling Language Modeling Applications using Language Mappings Programmer s Reference Manual How to use this Reference Card: The consists of a set of fundamental modeling elements which appear

More information

Introductory SQL SQL Joins: Viewing Relationships Pg 1

Introductory SQL SQL Joins: Viewing Relationships Pg 1 Introductory SQL SQL Joins: Viewing Relationships Pg 1 SQL Joins: Viewing Relationships Ray Lockwood Points: The relational model uses foreign keys to establish relationships between tables. SQL uses Joins

More information

EXAM Microsoft Database Fundamentals. Buy Full Product.

EXAM Microsoft Database Fundamentals. Buy Full Product. Microsoft EXAM - 98-364 Microsoft Database Fundamentals Buy Full Product http://www.examskey.com/98-364.html Examskey Microsoft 98-364 exam demo product is here for you to test the quality of the product.

More information

7. Introduction to Denotational Semantics. Oscar Nierstrasz

7. Introduction to Denotational Semantics. Oscar Nierstrasz 7. Introduction to Denotational Semantics Oscar Nierstrasz Roadmap > Syntax and Semantics > Semantics of Expressions > Semantics of Assignment > Other Issues References > D. A. Schmidt, Denotational Semantics,

More information

Brief History of SQL. Relational Database Management System. Popular Databases

Brief History of SQL. Relational Database Management System. Popular Databases Brief History of SQL In 1970, Dr. E.F. Codd published "A Relational Model of Data for Large Shared Data Banks," an article that outlined a model for storing and manipulating data using tables. Shortly

More information

6.001 Notes: Section 6.1

6.001 Notes: Section 6.1 6.001 Notes: Section 6.1 Slide 6.1.1 When we first starting talking about Scheme expressions, you may recall we said that (almost) every Scheme expression had three components, a syntax (legal ways of

More information

Chapter 1: Object-Oriented Programming Using C++

Chapter 1: Object-Oriented Programming Using C++ Chapter 1: Object-Oriented Programming Using C++ Objectives Looking ahead in this chapter, we ll consider: Abstract Data Types Encapsulation Inheritance Pointers Polymorphism Data Structures and Algorithms

More information

Relational Database Management Systems for Epidemiologists: SQL Part I

Relational Database Management Systems for Epidemiologists: SQL Part I Relational Database Management Systems for Epidemiologists: SQL Part I Outline SQL Basics Retrieving Data from a Table Operators and Functions What is SQL? SQL is the standard programming language to create,

More information

Appendix A - Glossary(of OO software term s)

Appendix A - Glossary(of OO software term s) Appendix A - Glossary(of OO software term s) Abstract Class A class that does not supply an implementation for its entire interface, and so consequently, cannot be instantiated. ActiveX Microsoft s component

More information

Testing ANSI SQL Hierarchical Data Modeling and Structure Processing

Testing ANSI SQL Hierarchical Data Modeling and Structure Processing Testing ANSI SQL Hierarchical Data Modeling and Structure Processing This document guides you in specifying hierarchical (Left Outer Join hierarchical data modeling) queries on your standard SQL processor

More information

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

More information

Z Notation. June 21, 2018

Z Notation. June 21, 2018 Z Notation June 21, 2018 1 Definitions There are many different ways to introduce an object in a Z specification: declarations, abbreviations, axiomatic definitions, and free types. Keep in mind that the

More information

Relational Algebra Homework 0 Due Tonight, 5pm! R & G, Chapter 4 Room Swap for Tuesday Discussion Section Homework 1 will be posted Tomorrow

Relational Algebra Homework 0 Due Tonight, 5pm! R & G, Chapter 4 Room Swap for Tuesday Discussion Section Homework 1 will be posted Tomorrow Relational Algebra R & G, Chapter 4 By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental power of

More information

OBJECT ORIENTED PROGRAMMING

OBJECT ORIENTED PROGRAMMING 1. Programming Paradigms OBJECT ORIENTED PROGRAMMING A programming methodology defines the methodology of designing and implementing programs using the key features and other building blocks (such as key

More information

Today s lecture. CS 314 fall 01 C++ 1, page 1

Today s lecture. CS 314 fall 01 C++ 1, page 1 Today s lecture Midterm Thursday, October 25, 6:10-7:30pm general information, conflicts Object oriented programming Abstract data types (ADT) Object oriented design C++ classes CS 314 fall 01 C++ 1, page

More information

During the first 2 weeks of class, all students in the course will take an in-lab programming exam. This is the Exam in Programming Proficiency.

During the first 2 weeks of class, all students in the course will take an in-lab programming exam. This is the Exam in Programming Proficiency. Description of CPSC 301: This is a 2-unit credit/no credit course. It is a course taught entirely in lab, and has two required 2-hour 50-minute lab sessions per week. It will review, reinforce, and expand

More information

A Data warehouse within a Federated database architecture

A Data warehouse within a Federated database architecture Association for Information Systems AIS Electronic Library (AISeL) AMCIS 1997 Proceedings Americas Conference on Information Systems (AMCIS) 8-15-1997 A Data warehouse within a Federated database architecture

More information

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING 10.2478/cris-2013-0011 PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING NIKOLETTA MINAROVA 77 INTRODUCTION Since the first design concept of computers came into the world,

More information

Example: Fibonacci Numbers

Example: Fibonacci Numbers Example: Fibonacci Numbers Write a program which determines F n, the (n + 1)-th Fibonacci number. The first 10 Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, and 34. The sequence of Fibonacci numbers

More information

Core Membership Computation for Succinct Representations of Coalitional Games

Core Membership Computation for Succinct Representations of Coalitional Games Core Membership Computation for Succinct Representations of Coalitional Games Xi Alice Gao May 11, 2009 Abstract In this paper, I compare and contrast two formal results on the computational complexity

More information

Data Analytics and Boolean Algebras

Data Analytics and Boolean Algebras Data Analytics and Boolean Algebras Hans van Thiel November 28, 2012 c Muitovar 2012 KvK Amsterdam 34350608 Passeerdersstraat 76 1016 XZ Amsterdam The Netherlands T: + 31 20 6247137 E: hthiel@muitovar.com

More information

Chapter 2 Overview of the Design Methodology

Chapter 2 Overview of the Design Methodology Chapter 2 Overview of the Design Methodology This chapter presents an overview of the design methodology which is developed in this thesis, by identifying global abstraction levels at which a distributed

More information

Lecture Notes on Queues

Lecture Notes on Queues Lecture Notes on Queues 15-122: Principles of Imperative Computation Frank Pfenning Lecture 9 September 25, 2012 1 Introduction In this lecture we introduce queues as a data structure and linked lists

More information

COSC Dr. Ramon Lawrence. Emp Relation

COSC Dr. Ramon Lawrence. Emp Relation COSC 304 Introduction to Database Systems Normalization Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Normalization Normalization is a technique for producing relations

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming 1. What is object-oriented programming (OOP)? OOP is a technique to develop logical modules, such as classes that contain properties, methods, fields, and events. An object

More information

= [ U 1 \ U 2 = B \ [ B \ B.

= [ U 1 \ U 2 = B \ [ B \ B. 5. Mon, Sept. 8 At the end of class on Friday, we introduced the notion of a topology, and I asked you to think about how many possible topologies there are on a 3-element set. The answer is... 29. The

More information

Recursion 1. Recursion is the process of defining something in terms of itself.

Recursion 1. Recursion is the process of defining something in terms of itself. Recursion 1 Recursion is the process of defining something in terms of itself. A method that calls itself is said to be recursive. Recursion is an alternative form of program control. It is repetition

More information

One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while

One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while 1 One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while leaving the engine to choose the best way of fulfilling

More information

Representation of Finite Games as Network Congestion Games

Representation of Finite Games as Network Congestion Games Representation of Finite Games as Network Congestion Games Igal Milchtaich To cite this version: Igal Milchtaich. Representation of Finite Games as Network Congestion Games. Roberto Cominetti and Sylvain

More information

Johns Hopkins Math Tournament Proof Round: Point Set Topology

Johns Hopkins Math Tournament Proof Round: Point Set Topology Johns Hopkins Math Tournament 2019 Proof Round: Point Set Topology February 9, 2019 Problem Points Score 1 3 2 6 3 6 4 6 5 10 6 6 7 8 8 6 9 8 10 8 11 9 12 10 13 14 Total 100 Instructions The exam is worth

More information

M301: Software Systems & their Development. Unit 4: Inheritance, Composition and Polymorphism

M301: Software Systems & their Development. Unit 4: Inheritance, Composition and Polymorphism Block 1: Introduction to Java Unit 4: Inheritance, Composition and Polymorphism Aims of the unit: Study and use the Java mechanisms that support reuse, in particular, inheritance and composition; Analyze

More information

Chapter 2: Intro to Relational Model

Chapter 2: Intro to Relational Model Chapter 2: Intro to Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Example of a Relation attributes (or columns) tuples (or rows) 2.2 Attribute Types The

More information

Chapter 11 Database Concepts

Chapter 11 Database Concepts Chapter 11 Database Concepts INTRODUCTION Database is collection of interrelated data and database system is basically a computer based record keeping system. It contains the information about one particular

More information

SIMILARITY MEASURES FOR MULTI-VALUED ATTRIBUTES FOR DATABASE CLUSTERING

SIMILARITY MEASURES FOR MULTI-VALUED ATTRIBUTES FOR DATABASE CLUSTERING SIMILARITY MEASURES FOR MULTI-VALUED ATTRIBUTES FOR DATABASE CLUSTERING TAE-WAN RYU AND CHRISTOPH F. EICK Department of Computer Science, University of Houston, Houston, Texas 77204-3475 {twryu, ceick}@cs.uh.edu

More information

On Meaning Preservation of a Calculus of Records

On Meaning Preservation of a Calculus of Records On Meaning Preservation of a Calculus of Records Emily Christiansen and Elena Machkasova Computer Science Discipline University of Minnesota, Morris Morris, MN 56267 chri1101, elenam@morris.umn.edu Abstract

More information

Evaluation of Semantic Actions in Predictive Non- Recursive Parsing

Evaluation of Semantic Actions in Predictive Non- Recursive Parsing Evaluation of Semantic Actions in Predictive Non- Recursive Parsing José L. Fuertes, Aurora Pérez Dept. LSIIS School of Computing. Technical University of Madrid Madrid, Spain Abstract To implement a syntax-directed

More information

Databases. Jörg Endrullis. VU University Amsterdam

Databases. Jörg Endrullis. VU University Amsterdam Databases Jörg Endrullis VU University Amsterdam The Relational Model Overview 1. Relational Model Concepts: Schema, State 2. Null Values 3. Constraints: General Remarks 4. Key Constraints 5. Foreign Key

More information

B16 Object Oriented Programming

B16 Object Oriented Programming B16 Object Oriented Programming Michael A. Osborne mosb@robots.ox.ac.uk http://www.robots.ox.ac.uk/~mosb/teaching.html#b16 Hilary 2013 This course will introduce object-oriented programming (OOP). It will

More information

Introduction to Oracle9i: SQL

Introduction to Oracle9i: SQL Oracle 1z0-007 Introduction to Oracle9i: SQL Version: 22.0 QUESTION NO: 1 Oracle 1z0-007 Exam Examine the data in the EMPLOYEES and DEPARTMENTS tables. You want to retrieve all employees, whether or not

More information

SQL STRUCTURED QUERY LANGUAGE

SQL 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 information

COUNT Function. The COUNT function returns the number of rows in a query.

COUNT Function. The COUNT function returns the number of rows in a query. Created by Ahsan Arif COUNT Function The COUNT function returns the number of rows in a query. The syntax for the COUNT function is: SELECT COUNT(expression) FROM tables WHERE predicates; Note: The COUNT

More information

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Spring 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

Interview 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] 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 information

Single-pass Static Semantic Check for Efficient Translation in YAPL

Single-pass Static Semantic Check for Efficient Translation in YAPL Single-pass Static Semantic Check for Efficient Translation in YAPL Zafiris Karaiskos, Panajotis Katsaros and Constantine Lazos Department of Informatics, Aristotle University Thessaloniki, 54124, Greece

More information

CREATING CUSTOMIZED DATABASE VIEWS WITH USER-DEFINED NON- CONSISTENCY REQUIREMENTS

CREATING CUSTOMIZED DATABASE VIEWS WITH USER-DEFINED NON- CONSISTENCY REQUIREMENTS CREATING CUSTOMIZED DATABASE VIEWS WITH USER-DEFINED NON- CONSISTENCY REQUIREMENTS David Chao, San Francisco State University, dchao@sfsu.edu Robert C. Nickerson, San Francisco State University, RNick@sfsu.edu

More information

COMP322 - Introduction to C++

COMP322 - Introduction to C++ COMP322 - Introduction to C++ Winter 2011 Lecture 08 - Inheritance continued School of Computer Science McGill University March 8, 2011 Last Time Single Inheritance Polymorphism: Static Binding vs Dynamic

More information

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010 CS403- Database Management Systems Solved MCQS From Midterm Papers April 29,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS403- Database Management Systems MIDTERM EXAMINATION - Spring

More information

The modularity requirement

The modularity requirement The modularity requirement The obvious complexity of an OS and the inherent difficulty of its design lead to quite a few problems: an OS is often not completed on time; It often comes with quite a few

More information

The Procedure Abstraction

The Procedure Abstraction The Procedure Abstraction Procedure Abstraction Begins Chapter 6 in EAC The compiler must deal with interface between compile time and run time Most of the tricky issues arise in implementing procedures

More information

Object-oriented Compiler Construction

Object-oriented Compiler Construction 1 Object-oriented Compiler Construction Extended Abstract Axel-Tobias Schreiner, Bernd Kühl University of Osnabrück, Germany {axel,bekuehl}@uos.de, http://www.inf.uos.de/talks/hc2 A compiler takes a program

More information

SOFTWARE ENGINEERING DESIGN I

SOFTWARE ENGINEERING DESIGN I 2 SOFTWARE ENGINEERING DESIGN I 3. Schemas and Theories The aim of this course is to learn how to write formal specifications of computer systems, using classical logic. The key descriptional technique

More information

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015 Q.1 a. Explain the role of concurrency control software in DBMS with an example. Answer: Concurrency control software in DBMS ensures that several users trying to update the same data do so in a controlled

More information

SQL: Data Querying. B0B36DBS, BD6B36DBS: Database Systems. h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 4

SQL: Data Querying. B0B36DBS, BD6B36DBS: Database Systems. h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 4 B0B36DBS, BD6B36DBS: Database Systems h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 4 SQL: Data Querying Mar n Svoboda mar n.svoboda@fel.cvut.cz 20. 3. 2018 Czech Technical University

More information

ITCS Jing Yang 2010 Fall. Class 16: Object and Object- Relational Databases (ch.11) References

ITCS Jing Yang 2010 Fall. Class 16: Object and Object- Relational Databases (ch.11) References ITCS 3160 Jing Yang 2010 Fall Class 16: Object and Object- Relational Databases (ch.11) Slides come from: References Michael Grossniklaus, Moira Norrie (ETH Zürich): Object Oriented Databases (Version

More information

RETRIEVING DATA USING THE SQL SELECT STATEMENT

RETRIEVING DATA USING THE SQL SELECT STATEMENT RETRIEVING DATA USING THE SQL SELECT STATEMENT Course Objectives List the capabilities of SQL SELECT statements Execute a basic SELECT statement Development Environments for SQL Lesson Agenda Basic SELECT

More information

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM).

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM). Question 1 Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM). By specifying participation conditions By specifying the degree of relationship

More information

Jet Data Manager 2014 Product Enhancements

Jet Data Manager 2014 Product Enhancements Jet Data Manager 2014 Product Enhancements Table of Contents Overview of New Features... 3 New Standard Features in Jet Data Manager 2014... 3 Additional Features Available for Jet Data Manager 2014...

More information

Let s briefly review important EER inheritance concepts

Let s briefly review important EER inheritance concepts Let s briefly review important EER inheritance concepts 1 is-a relationship Copyright (c) 2011 Pearson Education 2 Basic Constraints Partial / Disjoint: Single line / d in circle Each entity can be an

More information

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model. Chapter 6: Entity-Relationship Model The Next Step: Designing DB Schema Our Story So Far: Relational Tables Databases are structured collections of organized data The Relational model is the most common

More information

Draft. Students Table. FName LName StudentID College Year. Justin Ennen Science Senior. Dan Bass Management Junior

Draft. Students Table. FName LName StudentID College Year. Justin Ennen Science Senior. Dan Bass Management Junior Chapter 6 Introduction to SQL 6.1 What is a SQL? When would I use it? SQL stands for Structured Query Language. It is a language used mainly for talking to database servers. It s main feature divisions

More information

II. Review/Expansion of Definitions - Ask class for definitions

II. Review/Expansion of Definitions - Ask class for definitions CS352 Lecture - The Entity-Relationship Model last revised July 25, 2008 Objectives: 1. To discuss using an ER model to think about a database at the conceptual design level. 2. To show how to convert

More information

Introduction to Object Oriented Analysis and Design

Introduction to Object Oriented Analysis and Design A class note on Introduction to Object Oriented Analysis and Design Definition In general, analysis emphasizes an investigation of the problem and requirements of the domain, rather than a solution. Whereas,

More information

Figure 1.1: This is an illustration of a generic set and its elements.

Figure 1.1: This is an illustration of a generic set and its elements. Chapter 1 Mathematical Review et theory is now generally accepted as the foundation of modern mathematics, and it plays an instrumental role in the treatment of probability. Unfortunately, a simple description

More information

NORMAL FORMS. CS121: Relational Databases Fall 2017 Lecture 18

NORMAL FORMS. CS121: Relational Databases Fall 2017 Lecture 18 NORMAL FORMS CS121: Relational Databases Fall 2017 Lecture 18 Equivalent Schemas 2 Many different schemas can represent a set of data Which one is best? What does best even mean? Main goals: Representation

More information

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017 Overview of OOP Dr. Zhang COSC 1436 Summer, 2017 7/18/2017 Review Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in square brackets: l = [1, 2, "a"] (access by index, is mutable

More information

SQL Data Querying and Views

SQL Data Querying and Views Course A7B36DBS: Database Systems Lecture 04: SQL Data Querying and Views Martin Svoboda Faculty of Electrical Engineering, Czech Technical University in Prague Outline SQL Data manipulation SELECT queries

More information

BIRKBECK (University of London)

BIRKBECK (University of London) BIRKBECK (University of London) BSc Examination for Internal Students School of Computer Science and Information Systems Database Management COIY028U - Course Unit Value: 1/2 May 2006 : Afternoon 14.30

More information

From Module To Objects

From Module To Objects From Module To Objects It is very difficult to maintain a large monolithic block of code The solution is to divide the code into smaller pieces, called modules What is a Module? A small and manageable

More information

Introduction to Database Design, fall 2011 IT University of Copenhagen. Normalization. Rasmus Pagh

Introduction to Database Design, fall 2011 IT University of Copenhagen. Normalization. Rasmus Pagh Introduction to Database Design, fall 2011 IT University of Copenhagen Normalization Rasmus Pagh Based on KBL sections 6.1-6.8 (except p. 203 207m), 6.9 (until Multivalued dependencies ), 6.11, and 6.12.

More information

A Rough Set Approach for Generation and Validation of Rules for Missing Attribute Values of a Data Set

A Rough Set Approach for Generation and Validation of Rules for Missing Attribute Values of a Data Set A Rough Set Approach for Generation and Validation of Rules for Missing Attribute Values of a Data Set Renu Vashist School of Computer Science and Engineering Shri Mata Vaishno Devi University, Katra,

More information

Section 2.2: Relational Databases

Section 2.2: Relational Databases Page 1 Section 2.2: Relational Databases Databases A database is a set of records that can be manipulated by a computer. Database management systems allow users of the system to perform a variety of operations,

More information

A New Communication Theory on Complex Information and a Groundbreaking New Declarative Method to Update Object Databases

A New Communication Theory on Complex Information and a Groundbreaking New Declarative Method to Update Object Databases A New Communication Theory on Complex Information and a Groundbreaking New Declarative Method to Update Object Databases Heikki Virkkunen, Email: hvirkkun@gmail.com, Date: 5 April 2016 This article as

More information

Modern Systems Analysis and Design

Modern Systems Analysis and Design Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Designing Databases Learning Objectives Concisely define each of the following key database design terms:

More information

A New Algorithm for Singleton Arc Consistency

A New Algorithm for Singleton Arc Consistency A New Algorithm for Singleton Arc Consistency Roman Barták, Radek Erben Charles University, Institute for Theoretical Computer Science Malostranské nám. 2/25, 118 Praha 1, Czech Republic bartak@kti.mff.cuni.cz,

More information

UNIT-IV (Relational Database Language, PL/SQL)

UNIT-IV (Relational Database Language, PL/SQL) UNIT-IV (Relational Database Language, PL/SQL) Section-A (2 Marks) Important questions 1. Define (i) Primary Key (ii) Foreign Key (iii) unique key. (i)primary key:a primary key can consist of one or more

More information

AOSA - Betriebssystemkomponenten und der Aspektmoderatoransatz

AOSA - Betriebssystemkomponenten und der Aspektmoderatoransatz AOSA - Betriebssystemkomponenten und der Aspektmoderatoransatz Results obtained by researchers in the aspect-oriented programming are promoting the aim to export these ideas to whole software development

More information

Field Types and Import/Export Formats

Field Types and Import/Export Formats Chapter 3 Field Types and Import/Export Formats Knowing Your Data Besides just knowing the raw statistics and capacities of your software tools ( speeds and feeds, as the machinists like to say), it s

More information

Class Inheritance and OLE Integration (Formerly the Common Object Model)

Class Inheritance and OLE Integration (Formerly the Common Object Model) TM Class Inheritance and OLE Integration (Formerly the Common Object Model) Technical Overview Shawn Woods, Mike Vogl, and John Parodi August 1995 Digital Equipment Corporation Introduction This paper

More information

SQL: Data De ni on. B0B36DBS, BD6B36DBS: Database Systems. h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 3

SQL: 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 information

Chapter 8 Web Services Objectives

Chapter 8 Web Services Objectives Chapter 8 Web Services Objectives Describe the Web services approach to the Service- Oriented Architecture concept Describe the WSDL specification and how it is used to define Web services Describe the

More information

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes. Chapter 6: Entity-Relationship Model Our Story So Far: Relational Tables Databases are structured collections of organized data The Relational model is the most common data organization model The Relational

More information

DATABASE MANAGEMENT SYSTEM COURSE CONTENT

DATABASE MANAGEMENT SYSTEM COURSE CONTENT 1 DATABASE MANAGEMENT SYSTEM COURSE CONTENT UNIT II DATABASE SYSTEM ARCHITECTURE 2 2.1 Schemas, Sub-schemas, and Instances 2.2 Three-level ANSI SPARC Database Architecture: Internal level, Conceptual Level,

More information

EE221 Databases Practicals Manual

EE221 Databases Practicals Manual EE221 Databases Practicals Manual Lab 1 An Introduction to SQL Lab 2 Database Creation and Querying using SQL Assignment Data Analysis, Database Design, Implementation and Relation Normalisation School

More information

Method Description for Semla A Software Design Method with a Focus on Semantics

Method Description for Semla A Software Design Method with a Focus on Semantics Computer Science Method Description for Semla A Software Design Method with a Focus on Semantics Semla for Java, English version May 2000 Method Description for Semla A Software Design Method with a Focus

More information

Automated Test Data Design

Automated Test Data Design Automating the Automation Automated Test Data Design How organizations can add Precision and Speed up their testing tasks A CONFORMIQ WHITEPAPER By Kimmo Nupponen 1 Abstract: Experimental evidence and

More information

1 Executive Overview The Benefits and Objectives of BPDM

1 Executive Overview The Benefits and Objectives of BPDM 1 Executive Overview The Benefits and Objectives of BPDM This is an excerpt from the Final Submission BPDM document posted to OMG members on November 13 th 2006. The full version of the specification will

More information

8) A top-to-bottom relationship among the items in a database is established by a

8) A top-to-bottom relationship among the items in a database is established by a MULTIPLE CHOICE QUESTIONS IN DBMS (unit-1 to unit-4) 1) ER model is used in phase a) conceptual database b) schema refinement c) physical refinement d) applications and security 2) The ER model is relevant

More information

Object Relational Mappings

Object Relational Mappings Object Relational Mappings First step to a formal approach Bachelor thesis Tom van den Broek January 30, 2007 Contents 1 Introduction 2 2 The two models 4 2.1 The object model.........................

More information

Set theory is a branch of mathematics that studies sets. Sets are a collection of objects.

Set 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 information