This document provides an overview of authorization controls in database management systems. It discusses how different types of privileges can be assigned to users via data definition language statements. It also covers the use of roles to group users and how privileges can be passed to other users. The document contains examples of granting and revoking privileges and roles.
This document discusses relational database design and normalization. It outlines two major design approaches: top-down design which develops a conceptual model like an ER diagram and maps it to relational schemas, and bottom-up design which uses normalization to iteratively decompose relations. The document then describes how to map different ER model concepts like entities, attributes, and relationships to relational schemas. It also discusses functional dependencies, normalization forms, and how normalization can be used to remove redundancies and anomalies from relational schemas.
The document outlines the course review for an Introduction to Databases course. It covers 12 topics over the semester, including conceptual modeling, the relational model, SQL, database design, and more. It describes the exam format and covered textbook chapters. Additional related courses are also listed.
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...Beat Signer
The document discusses extensions that have been made to the Entity-Relationship (ER) model, including specialization and generalization relationships, aggregation, and constraints. It provides examples of using these constructs to model real-world domains more expressively. The Extended ER (EER) model and Unified Modeling Language (UML) are then introduced as ways to further enhance conceptual modeling capabilities.
The document discusses access methods in databases. It begins by introducing basic index concepts like ordered and hash indices. It then describes different types of ordered indices in detail, including dense indices, sparse indices, and multilevel indices. B+-tree indices are presented as an improved alternative to index-sequential files that do not degrade in performance over time. The properties and operations of B+-trees, including lookup, insertion, and deletion, are explained.
This presentation contains the concepts related to database design using ER Diagram. The content is adapted from the contents of the authors of the book mentioned in the reference.
This document discusses relational database design and normalization. It outlines two major design approaches: top-down design which develops a conceptual model like an ER diagram and maps it to relational schemas, and bottom-up design which uses normalization to iteratively decompose relations. The document then describes how to map different ER model concepts like entities, attributes, and relationships to relational schemas. It also discusses functional dependencies, normalization forms, and how normalization can be used to remove redundancies and anomalies from relational schemas.
The document outlines the course review for an Introduction to Databases course. It covers 12 topics over the semester, including conceptual modeling, the relational model, SQL, database design, and more. It describes the exam format and covered textbook chapters. Additional related courses are also listed.
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...Beat Signer
The document discusses extensions that have been made to the Entity-Relationship (ER) model, including specialization and generalization relationships, aggregation, and constraints. It provides examples of using these constructs to model real-world domains more expressively. The Extended ER (EER) model and Unified Modeling Language (UML) are then introduced as ways to further enhance conceptual modeling capabilities.
The document discusses access methods in databases. It begins by introducing basic index concepts like ordered and hash indices. It then describes different types of ordered indices in detail, including dense indices, sparse indices, and multilevel indices. B+-tree indices are presented as an improved alternative to index-sequential files that do not degrade in performance over time. The properties and operations of B+-trees, including lookup, insertion, and deletion, are explained.
This presentation contains the concepts related to database design using ER Diagram. The content is adapted from the contents of the authors of the book mentioned in the reference.
The document discusses object database systems and their advantages over relational database management systems (RDBMS). It notes problems with representing real-world entities in RDBMSs and describes how object-oriented and object-relational database models address these issues better by allowing for inheritance, complex data types, and encapsulation of both data and behavior. The key advantages of object database systems include more closely modeling real-world entities and supporting reuse through inheritance. Object-relational database systems combine object and relational approaches for increased flexibility.
This document discusses database design using Entity Relationship Diagrams (ERDs). It covers how to draw ERDs using Chen's Model and Crow's Foot notations and define the basic elements of ERDs. Conversion rules are presented to convert ERDs into relational tables for one-to-one, one-to-many, and many-to-many relationships. An example is given to demonstrate drawing an ERD for a company database and converting it into relational tables.
This document discusses object-oriented data modeling concepts including objects, classes, inheritance, and persistent programming languages. It defines an object as having data variables, messages it responds to, and methods implementing those messages. Classes group objects and inheritance allows subclasses to inherit attributes and methods from parent classes. Persistent programming languages allow objects to be directly manipulated from a programming language and stored in a database without explicit data formatting changes or loading/storing.
The document discusses object-oriented databases and the need for complex data types that traditional databases cannot support well. It covers the core concepts of the object-oriented data model including objects, classes, inheritance, and object identity. Key advantages of the object-oriented approach include its ability to model complex relationships and enable persistence of programming language objects.
The document discusses the process of data modeling which includes gathering requirements, conceptual design, logical design, and physical design. It defines key concepts in data modeling such as entities, attributes, domains, relationships, cardinality, and foreign keys. The stages of logical data model development are outlined as context data model, key-based data model, fully attributed data model, and normalized data model. Characteristics of a good data model are that it is simple, nonredundant, and flexible to future needs.
This document discusses an introduction to structured query language (SQL) presented by Dr. C.V. Suresh Babu. The presentation covers SQL queries including SELECT, INSERT, UPDATE, and DELETE queries. Examples are provided for how to query, create, add, edit, and delete records from database tables. The document concludes with a quiz on SQL concepts.
This presentation discusses the following topics:
What is XML?
Syntax of XML Document
DTD (Document Type Definition)
XML Schema
XML Query Language
XML Databases
Oracle JDBC
The document discusses transaction management in databases. It begins with an introduction to transactions, describing them as sequences of operations that form single logical units of work. It then covers the ACID properties that transactions must satisfy: atomicity, consistency, isolation, and durability. The document concludes with descriptions of concurrency control techniques like locking and two-phase locking that allow transactions to execute concurrently while preserving the ACID properties and serializability.
Overview of Object-Oriented Concepts Characteristics by vikas jagtapVikas Jagtap
Object-oriented data base systems are proposed as alternative to relational systems and are aimed at application domains where complex objects play a central role.
The approach is heavily influenced by object-oriented programming languages and can be understood as an attempt to add DBMS functionality to a programming language environment
The document presents a graphical approach called Graphical Notations-Data Type Documentation (GN-DTD) for normalizing XML documents. GN-DTD allows capturing the syntax and semantics of XML documents in a simple but precise way using various notations. It can visualize important XML features like elements, attributes, relationships, hierarchy, cardinality, sequence and disjunction clearly at the schema level. The paper then demonstrates how a sample DTD is transformed into a GN-DTD graph to represent the structure and constraints of an XML document and avoid potential data redundancies and update anomalies.
This document provides an overview of key concepts related to relational database management systems (RDBMS) including:
- It discusses characteristics of relational tables, keys such as primary and foreign keys, and integrity rules.
- It introduces entity relationship diagrams (ERDs) and how they are used to model relationships between entities/tables through attributes and relationships.
- It reviews key terms in the relational model including the differences between logical and physical names, as well as data definition language (DDL) and data manipulation language (DML).
This document discusses techniques for integrating extracted data and schemas. It begins by introducing the problems of column and instance value matching during data integration. It then describes common database integration techniques like schema matching. It also discusses linguistic, constraint-based, domain-level, and instance-level matching approaches. Finally, it covers issues specific to integrating web query interfaces, such as building a global query interface and matching interfaces through correlation mining and clustering algorithms.
Schema Integration, View Integration and Database Integration, ER Model & Dia...Mobarok Hossen
What is ER Model & Diagrams?
How can you design ER Model & Diagram?
What is Object-Oriented Model?
What is Schema Integration? how can you Schema Integrate?
What is View Integration? how can you View Integrate?
What is Database Integration? how can you Database Integrate?
This document discusses object query language (OQL) and the six-layer architecture model for object-oriented databases. It provides an overview of OQL, describing how it is based on SQL but extends it to support object-oriented notions. It also outlines the main components of the six-layer model - the interaction layer, application layer, administrative layer, security layer, virtual layer, and paging layer - and describes their basic responsibilities in managing and securing object-oriented data. Finally, it briefly lists some disadvantages of object-oriented database management systems.
This document provides an overview of the object-oriented database model. It describes how the model was developed from the semantic data model in 1981. The key aspects of the object-oriented database model are that data and relationships are contained within objects, objects can inherit attributes and methods from parent classes, and classes are organized in a hierarchy. Unified Modeling Language class diagrams can be used to graphically represent the data relationships in an object-oriented system.
Introduction - Web Technologies (1019888BNR)Beat Signer
This document outlines the course organization, prerequisites, schedule, and content for the Web Technologies course taught by Prof. Beat Signer at Vrije Universiteit Brussel. It provides contact information for the instructor and teaching assistant. The course covers topics such as HTML, CSS, JavaScript, web frameworks, semantic web, security and involves weekly lectures, exercises, and a group project for students taking the 6 ECTS version.
A Comparative Study of RDBMs and OODBMs in Relation to Security of Datainscit2006
Mansaf Alam and Siri Krishan Wasan
Department of Computer Sciences, Jamia Millia Islamia, New Delhi, India.
Department of Mathematics, Jamia Millia Islamia, New Delhi, India.
This document discusses the object oriented data model (OODM). It defines the OODM and describes how it accommodates relationships like aggregation, generalization, and particularization. The OODM provides four types of data operations: defining schemas, creating databases, retrieving objects, and expanding objects. Key features of the OODM include object identity, abstraction, encapsulation, data hiding, inheritance, and classes. The document concludes that a prototype of the OODM has been implemented to model application domains and that menus can be created, accessed, and updated like data from the database schema in the OODM.
Week 3 Classification of Database Management Systems & Data Modelingoudesign
The document discusses different types of database management systems and data models. It provides information on the following:
- The relational data model is the most commonly used model today and is supported by popular DBMS like Oracle, SQL Server, DB2, and MySQL.
- Other traditional models like hierarchical and network models are not commonly used now due to their complexity.
- The advantages of data models include increased effectiveness, reduced costs, simplicity, minimum redundancy, data integrity, independence, faster performance, reduced errors and risks.
- The types of data models discussed are hierarchical, network, relational, E-R and object oriented models. The characteristics and advantages/disadvantages of each model are described
The document discusses conceptual data modeling and entity-relationship (ER) modeling. It describes the key concepts in ER modeling including entities, attributes, relationships, cardinality, participation, and relationship types. It provides examples of how to model different types of relationships, attributes, and entities. The goal of conceptual modeling is to build an abstract yet rigorous model of an organization's data to help communicate requirements and ensure quality.
Building a Computer Science Pathway in Your High School - Feb 2017Hal Speed
This document provides an overview of building a computer science pathway in schools. It discusses Texas requirements for high schools to offer computer science courses and lists approved courses. It also outlines sample pathways from various school districts and common challenges faced, such as course prerequisites. Additional resources on topics like cybersecurity, programming boards and tools, recruitment clubs, and professional development programs are also referenced. The goal is to help schools develop a computer science curriculum and pathway to meet state requirements.
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Beat Signer
The document discusses Edgar Codd's relational model for data management. It describes how Codd developed the relational model while working at IBM and published a seminal paper on it in 1970. It also discusses how IBM initially did not implement the model, but later developed prototypes like System R that helped drive commercial relational database management systems. The document provides an introduction to key concepts of the relational model like relational algebra operations, relations, attributes, keys and database schemas.
The document discusses object database systems and their advantages over relational database management systems (RDBMS). It notes problems with representing real-world entities in RDBMSs and describes how object-oriented and object-relational database models address these issues better by allowing for inheritance, complex data types, and encapsulation of both data and behavior. The key advantages of object database systems include more closely modeling real-world entities and supporting reuse through inheritance. Object-relational database systems combine object and relational approaches for increased flexibility.
This document discusses database design using Entity Relationship Diagrams (ERDs). It covers how to draw ERDs using Chen's Model and Crow's Foot notations and define the basic elements of ERDs. Conversion rules are presented to convert ERDs into relational tables for one-to-one, one-to-many, and many-to-many relationships. An example is given to demonstrate drawing an ERD for a company database and converting it into relational tables.
This document discusses object-oriented data modeling concepts including objects, classes, inheritance, and persistent programming languages. It defines an object as having data variables, messages it responds to, and methods implementing those messages. Classes group objects and inheritance allows subclasses to inherit attributes and methods from parent classes. Persistent programming languages allow objects to be directly manipulated from a programming language and stored in a database without explicit data formatting changes or loading/storing.
The document discusses object-oriented databases and the need for complex data types that traditional databases cannot support well. It covers the core concepts of the object-oriented data model including objects, classes, inheritance, and object identity. Key advantages of the object-oriented approach include its ability to model complex relationships and enable persistence of programming language objects.
The document discusses the process of data modeling which includes gathering requirements, conceptual design, logical design, and physical design. It defines key concepts in data modeling such as entities, attributes, domains, relationships, cardinality, and foreign keys. The stages of logical data model development are outlined as context data model, key-based data model, fully attributed data model, and normalized data model. Characteristics of a good data model are that it is simple, nonredundant, and flexible to future needs.
This document discusses an introduction to structured query language (SQL) presented by Dr. C.V. Suresh Babu. The presentation covers SQL queries including SELECT, INSERT, UPDATE, and DELETE queries. Examples are provided for how to query, create, add, edit, and delete records from database tables. The document concludes with a quiz on SQL concepts.
This presentation discusses the following topics:
What is XML?
Syntax of XML Document
DTD (Document Type Definition)
XML Schema
XML Query Language
XML Databases
Oracle JDBC
The document discusses transaction management in databases. It begins with an introduction to transactions, describing them as sequences of operations that form single logical units of work. It then covers the ACID properties that transactions must satisfy: atomicity, consistency, isolation, and durability. The document concludes with descriptions of concurrency control techniques like locking and two-phase locking that allow transactions to execute concurrently while preserving the ACID properties and serializability.
Overview of Object-Oriented Concepts Characteristics by vikas jagtapVikas Jagtap
Object-oriented data base systems are proposed as alternative to relational systems and are aimed at application domains where complex objects play a central role.
The approach is heavily influenced by object-oriented programming languages and can be understood as an attempt to add DBMS functionality to a programming language environment
The document presents a graphical approach called Graphical Notations-Data Type Documentation (GN-DTD) for normalizing XML documents. GN-DTD allows capturing the syntax and semantics of XML documents in a simple but precise way using various notations. It can visualize important XML features like elements, attributes, relationships, hierarchy, cardinality, sequence and disjunction clearly at the schema level. The paper then demonstrates how a sample DTD is transformed into a GN-DTD graph to represent the structure and constraints of an XML document and avoid potential data redundancies and update anomalies.
This document provides an overview of key concepts related to relational database management systems (RDBMS) including:
- It discusses characteristics of relational tables, keys such as primary and foreign keys, and integrity rules.
- It introduces entity relationship diagrams (ERDs) and how they are used to model relationships between entities/tables through attributes and relationships.
- It reviews key terms in the relational model including the differences between logical and physical names, as well as data definition language (DDL) and data manipulation language (DML).
This document discusses techniques for integrating extracted data and schemas. It begins by introducing the problems of column and instance value matching during data integration. It then describes common database integration techniques like schema matching. It also discusses linguistic, constraint-based, domain-level, and instance-level matching approaches. Finally, it covers issues specific to integrating web query interfaces, such as building a global query interface and matching interfaces through correlation mining and clustering algorithms.
Schema Integration, View Integration and Database Integration, ER Model & Dia...Mobarok Hossen
What is ER Model & Diagrams?
How can you design ER Model & Diagram?
What is Object-Oriented Model?
What is Schema Integration? how can you Schema Integrate?
What is View Integration? how can you View Integrate?
What is Database Integration? how can you Database Integrate?
This document discusses object query language (OQL) and the six-layer architecture model for object-oriented databases. It provides an overview of OQL, describing how it is based on SQL but extends it to support object-oriented notions. It also outlines the main components of the six-layer model - the interaction layer, application layer, administrative layer, security layer, virtual layer, and paging layer - and describes their basic responsibilities in managing and securing object-oriented data. Finally, it briefly lists some disadvantages of object-oriented database management systems.
This document provides an overview of the object-oriented database model. It describes how the model was developed from the semantic data model in 1981. The key aspects of the object-oriented database model are that data and relationships are contained within objects, objects can inherit attributes and methods from parent classes, and classes are organized in a hierarchy. Unified Modeling Language class diagrams can be used to graphically represent the data relationships in an object-oriented system.
Introduction - Web Technologies (1019888BNR)Beat Signer
This document outlines the course organization, prerequisites, schedule, and content for the Web Technologies course taught by Prof. Beat Signer at Vrije Universiteit Brussel. It provides contact information for the instructor and teaching assistant. The course covers topics such as HTML, CSS, JavaScript, web frameworks, semantic web, security and involves weekly lectures, exercises, and a group project for students taking the 6 ECTS version.
A Comparative Study of RDBMs and OODBMs in Relation to Security of Datainscit2006
Mansaf Alam and Siri Krishan Wasan
Department of Computer Sciences, Jamia Millia Islamia, New Delhi, India.
Department of Mathematics, Jamia Millia Islamia, New Delhi, India.
This document discusses the object oriented data model (OODM). It defines the OODM and describes how it accommodates relationships like aggregation, generalization, and particularization. The OODM provides four types of data operations: defining schemas, creating databases, retrieving objects, and expanding objects. Key features of the OODM include object identity, abstraction, encapsulation, data hiding, inheritance, and classes. The document concludes that a prototype of the OODM has been implemented to model application domains and that menus can be created, accessed, and updated like data from the database schema in the OODM.
Week 3 Classification of Database Management Systems & Data Modelingoudesign
The document discusses different types of database management systems and data models. It provides information on the following:
- The relational data model is the most commonly used model today and is supported by popular DBMS like Oracle, SQL Server, DB2, and MySQL.
- Other traditional models like hierarchical and network models are not commonly used now due to their complexity.
- The advantages of data models include increased effectiveness, reduced costs, simplicity, minimum redundancy, data integrity, independence, faster performance, reduced errors and risks.
- The types of data models discussed are hierarchical, network, relational, E-R and object oriented models. The characteristics and advantages/disadvantages of each model are described
The document discusses conceptual data modeling and entity-relationship (ER) modeling. It describes the key concepts in ER modeling including entities, attributes, relationships, cardinality, participation, and relationship types. It provides examples of how to model different types of relationships, attributes, and entities. The goal of conceptual modeling is to build an abstract yet rigorous model of an organization's data to help communicate requirements and ensure quality.
Building a Computer Science Pathway in Your High School - Feb 2017Hal Speed
This document provides an overview of building a computer science pathway in schools. It discusses Texas requirements for high schools to offer computer science courses and lists approved courses. It also outlines sample pathways from various school districts and common challenges faced, such as course prerequisites. Additional resources on topics like cybersecurity, programming boards and tools, recruitment clubs, and professional development programs are also referenced. The goal is to help schools develop a computer science curriculum and pathway to meet state requirements.
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Beat Signer
The document discusses Edgar Codd's relational model for data management. It describes how Codd developed the relational model while working at IBM and published a seminal paper on it in 1970. It also discusses how IBM initially did not implement the model, but later developed prototypes like System R that helped drive commercial relational database management systems. The document provides an introduction to key concepts of the relational model like relational algebra operations, relations, attributes, keys and database schemas.
Best Engineering Colleges of Computer science – GNIOTGniot group
This document provides information about the B.Tech Computer Science program at Greater Noida Institute of Technology. The 4-year program trains students in both electrical engineering and computer science, with courses in software design, hardware, and their integration. It has an intake of 120 students in the morning batch and 60 in the evening batch for the first year. Eligible students will have a background in physics, math, and chemistry or computer science. The institute provides air conditioned computer labs, servers, high speed internet, software, and equipment to support the program's laboratories in areas like programming, databases, algorithms, graphics, and more. It also has a student-run computer society and research center promoting open source technologies.
Presentation @ #cesicon 2017 on the Provision of Computer Science in Upper Se...Neil Keane
Presentation of research findings into the provision of course in Computer Science in Upper Second Level Education Internationally at the Computers in Education Society
of Ireland (CESI) Conference 4th March 2017 in Dublin City University (DCU).
Research project led by Neil Keane & Clare McInerney of the Irish Software Research Centre.
Supported by an expert research group of Prof. Kevin Ryan, Prof. Tiziana Margaria, Prof. Rory O’Connor, Dr. Chris Exton (from Lero), Dr. Oliver McGarr, Prof. Sibel Erduran (from National STEM Centre at the School of Education University of Limerick)and
Mr. Ted Parslow (Third Level Computing Forum).
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Beat Signer
The document discusses Structured Query Language (SQL) and its history and components. It notes that SQL is a declarative query language used to define database schemas, manipulate data through queries, and control transactions. The document outlines SQL's data definition language for defining schemas and data manipulation language for querying and modifying data. It also provides examples of SQL statements for creating tables and defining constraints.
This presentation is about a lecture I gave within the "Software Modeling" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
This document provides an outline for a presentation on CS education. It discusses introducing CS and computational thinking in K-12 education. Computational thinking involves abstraction and automation. Students should learn about software and hardware design, algorithms, and computer capabilities and limitations. The role of CS involves changing the world through logical problem solving and creativity by combining mathematics, science, design and technology. CS concepts include abstraction, logic, algorithms and data representation. Computational thinking can be applied to solve new problems systematically. Examples of computational thinking in daily life are also provided.
The soul is defined as a “distinguishing mark of living things, responsible for planning and practical thinking”. Logic has been present in the origin and many important developments in Computer Science.
Hilbert’s quest for effective methods to mechanically prove theorems stimulated some of the brightest minds of the 20th century to prove it unfeasible. Eigthy years ago, Church and Turing advanced the thesis that lambda calculus and a-machines formalize the notion of effective method, and displayed sentences which could not be proved or disproved. This was the end of Hilbert’s dream and the birth of Computer Science. The Universal Turing Machine became the abstract model of our current notion of computer.
Since then, we can find logic wired into the electronic devices that make computers alive; providing a communication language with the computer; guiding verification methods to prove programs correct; and providing the basis for the semantic web. We’ll review these epiphanies so you’ll be hopefully ready to agree that Logic is the Soul of Computer Science.
This document discusses the field of computer science and IT engineering. It provides an overview of the scope of the field, new and popular programs of study, trends and developments in research, opportunities and benefits of pursuing a degree or career in this area. It also lists some top awards and institutions. The future of the field is said to involve continued growth in areas like artificial intelligence, cloud computing, the internet of things, and more efficient algorithms to solve large and complex problems.
Incremental garbage collection is an efficient way to improve the performance of real-time applications. It divides the full garbage collection process into smaller parts that each execute for a minimal time with very short pauses. The Mark and Sweep algorithm identifies reachable objects in the Mark phase and clears unreachable objects in the Sweep phase. Garbage collection techniques reduce the effort of manual memory management for programmers.
The document summarizes topics that will be covered in an advanced SQL training seminar, including SQL statement types, data types, aggregate functions, NULL handling, comparison operators, mathematical functions, joins, subqueries, views, materialized views, inline views, and optimizing SQL queries. Techniques for data sharing between databases are also mentioned. The seminar aims to provide in-depth knowledge of SQL concepts through explanations, examples, exercises and discussion.
The document introduces common data types in SQL such as char, varchar, int, numeric, and date. It describes how to create databases and tables using SQL statements like CREATE DATABASE, CREATE TABLE, INSERT INTO, and ALTER TABLE. It also covers SQL queries using SELECT, FROM, WHERE, ORDER BY, LIKE and other clauses to retrieve and filter data from one or more tables.
This document discusses advanced SQL topics including joins, subqueries, and ensuring transaction integrity. It provides examples of different types of joins like equi-joins, natural joins, outer joins, and union joins. It also discusses using subqueries in WHERE clauses, FROM clauses, and HAVING clauses, and differentiates between correlated and noncorrelated subqueries. The document concludes by defining transactions and describing SQL commands like BEGIN TRANSACTION, COMMIT, and ROLLBACK that are used to ensure transaction integrity.
Advanced SQL - Introduction to Databases (1007156ANR).pdfSara Parker
This document provides an introduction to advanced SQL and discusses various topics related to database programming and application development. It begins with an overview of authorisation and privilege management in SQL. It then discusses impedance mismatch problems when combining SQL with host languages, and various programming environments for embedded SQL and call level interfaces. The document concludes with examples of application logic implementation on the database server side using stored procedures, triggers, and user-defined types.
DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...Beat Signer
The document discusses database management system (DBMS) architectures and components. It describes the main components of a DBMS, including the DML preprocessor, query compiler, DDL compiler, and catalog manager. It then outlines several common DBMS architectures such as teleprocessing, file-server, two-tier client-server, and three-tier client-server architectures. The three-tier architecture separates the presentation, application, and data tiers for increased scalability and flexibility.
Database migration from Sybase ASE to PostgreSQL @2013.pgconf.eualdaschwede80
The talk explains some differences between Sybase ASE and PostgreSQL and shows two different migration strategies - the dump reload process and replication.
Building Applications for SQL Server 2008Dave Bost
The document discusses new features in SQL Server 2008 including spatial data support, geography and geometry data types, table value parameters, date and time enhancements, and the MERGE statement. It also covers SQL CLR, reporting services, entity framework, and Visual Studio integration.
Hire Me
I do not having any time constraint issue I am ready to work according to client preference time zone, For faster communication with client I am available online during working hours over Skype and Google+. Currently I am available for 40-54 hrs/Week for remote location.
This document summarizes new features in SQL Server 2008 for developers. It covers new data types like spatial, XML, and CLR types as well as features like table valued parameters, change tracking, and ADO.NET Entity Framework support. It also discusses enhancements to Integration Services, reporting services, and the core SQL Server engine.
This document discusses applying domain-driven design patterns to serverless architecture. It begins by introducing the speaker and their background. It then provides an overview of serverless architecture and some of its benefits. The document goes on to discuss challenges that can arise with serverless applications as they grow in complexity, and suggests that organizing principles like domain-driven design patterns are needed. It proceeds to cover domain-driven design concepts like bounded contexts, aggregates, repositories, and CQRS, and provides examples of how they could be applied to serverless architecture. It concludes by discussing some interim conclusions, including that serverless is a new paradigm that requires principles to tame complexity, and that domain-driven design offers useful patterns for this purpose.
Your App Deserves More – The Art of App ModernizationKlaus Bild
Make your data sustainable and enhance the value of your applications. Your application and your work deserve it! We use applications everywhere but unfortunately a lot of them are old and monolithic. They are heavily used by your business but adding new functions to catch up with the business needs is almost impossible. We, a developer and an admin, will show you how you can transform your monolithic applications into modern apps using a smart architecture. Learn how you can leverage IBM Bluemix, Docker and suchlike to bring cognitive services to your applications. We will show you a live example to illustrate how we extended IBM Verse using IBM cloud technology to fulfill an urgent business need.
This document is a curriculum vitae for Vilas Namdeo Jadhav that outlines his experience developing software over 9.5 years. It details his technical skills in programming languages like C++ and databases like SQL Server. It also summarizes 9 projects he worked on, including developing intranets for companies and customizing CAD software like Autodesk Inventor. The CV shows his experience in full software development lifecycles and working with various technologies, platforms, and team sizes.
Asp.net Programming Training (Web design, Web development)Moutasm Tamimi
Asp.net Programming Training (Web design, Web development)
Prepared By: Moutasm Tamimi
Using C# language
By Microsoft visual studio program
version 2008-2010-2012-2014
Web App Architectures and Design PatternsRui Sousa
The document discusses several web application architectures: multi-tier architectures which separate an application into presentation, logic, and data tiers; the model-view-controller (MVC) pattern which separates an application into model, view, and controller components; and the REST architectural style. It provides details on each architecture, including their advantages like independence of components, reusability, and ease of maintenance.
This document discusses modernizing legacy applications through microservices architecture. It begins by describing the issues with monolithic applications, such as growing complexity, difficulty scaling, and inability to adopt new technologies. It then introduces microservices as an alternative, noting advantages like independent scaling, organizational alignment, and technology heterogeneity, though also increased complexity. Specific technologies discussed include Docker containers, Kubernetes orchestration, and open source tools like message brokers and databases to support modern applications. The document calls IT administrators and developers to action to experiment with these technologies for modernizing existing applications.
ISWC 19 - On the Use of Cloud and Semantic Web Technologies for Generative De...Daniel Mercier
This document discusses using cloud and semantic web technologies for generative design. It outlines challenges like offering multi-physics solvers, aggregating necessary data, and guiding users. It then describes efforts to develop a data unification service using ontologies, a validation and recommendation engine, and enhancing data and metadata management. Knowledge graphs are discussed as a source of data cohesion and bridge between human and machine. Semantic technologies are presented as a good first layer of intelligence to complement machine learning.
The document discusses SQL Server 2008 data mining capabilities. It provides an overview of data mining concepts and scenarios, demonstrates the data mining lifecycle process using SQL Server tools, and highlights new features in SQL Server 2008 such as improved time series algorithms and holdout support for model validation. Resources for learning more about SQL Server data mining are also listed.
The document discusses SQL Server 2008 data mining capabilities. It provides an overview of data mining concepts and scenarios, demonstrates the data mining lifecycle process using SQL Server tools, and highlights new features in SQL Server 2008 such as improved time series algorithms and holdout support for model validation. Resources for learning more about SQL Server data mining are also listed.
This document introduces Interaction-Driven Design (IDD) and discusses best practices for application structure and testing strategies when using this approach. It recommends starting the design process from the user interactions or actions needed, which will help define domain concepts and emerging entities. The core domain model should be separated from infrastructure implementations. Testing strategies covered include user journey tests at the application level, acceptance tests at the action level, integration tests at boundaries, and unit tests at the class level. Dependencies should be mocked or stubbed at different test levels.
- The document provides a resume for Chandrajit Samanta including contact details, objectives, skills, experience and details of past roles. It summarizes his extensive experience with SQL Server databases, developing ETL processes in SQL Server Integration Services, data modeling, and building cubes and writing MDX queries in SQL Server Analysis Services. It details over 10 years of experience in database development, administration, and business intelligence roles for various companies.
How can we quickly tell what an application is about? How can we quickly tell what it does? How can we distinguish business concepts from architecture clutter? How can we quickly find the code we want to change? How can we instinctively know where to add code for new features? Purely looking at unit tests is either not possible or too painful. Looking at higher-level tests can take a long time and still not give us the answers we need. For years, we have all struggled to design and structure projects that reflect the business domain.
In this talk Sandro will be sharing how he designed the last application he worked on, twisting a few concepts from Domain-Driven Design, properly applying MVC, borrowing concepts from CQRS, and structuring packages in non-conventional ways. Sandro will also be touching on SOLID principles, Agile incremental design, modularisation, and testing. By iteratively modifying the project structure to better model the product requirements, he has come up with a design style that helps developers create maintainable and domain-oriented software.
Architectural Design Spaces for Feedback Control in Self-Adaptive Systems Con...Sandro Andrade
Presented at 25th International Conference on Software Engineering and Knowledge Engineering (SEKE 2013) - Boston/MA - EUA.
A lot of current research efforts in self-adaptive systems community have been dedicated to the explicit modeling of architectural aspects related to system self-awareness and context-awareness. This paper presents a flexible and extensible representation of architectural design spaces for self-adaptation approaches based on feedback control loops. We have defined a generic representation for design spaces meta-modeling and have instantiated it in order to provide direct support for early reasoning and trade-off analysis of self-adaptation aspects with the aid of a set of feedback control metrics. The proposed approach has been fully implemented in a supporting tool and a case study with a distributed industrial data acquisition service has been undertaken. Whilst preliminary experiences with the proposed approach indicate useful reasoning support when comparing alternative design solutions for self-adaptation, further investigation regarding scalability aspects and automatic handling of conflicting goals has been identified as future work.
Similar to Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR) (20)
This document outlines the course organization, goals, schedule, and content for a Human-Computer Interaction course. It provides contact information for the instructor, Prof. Beat Signer, and TAs. The course will cover HCI principles, the interaction design process, requirements analysis, prototyping, evaluation methods, and use cases. Students will complete an assignment involving the design of parts of a new university website and take a final exam. The course will involve lectures, exercises, and group work.
Indoor Positioning Using the OpenHPS FrameworkBeat Signer
The OpenHPS framework is an open source hybrid positioning system that allows for flexibility in technologies, algorithms, use cases, and output. It features a process network design that connects different positioning techniques and data sources. The framework includes core components, abstractions, data storage options, and communication abilities. It was demonstrated through an indoor positioning use case and validated for accuracy and effectiveness. OpenHPS aims to support developers and researchers in indoor positioning applications.
Personalised Learning Environments Based on Knowledge Graphs and the Zone of ...Beat Signer
Presentation given at CSEDU 2022, Virtual Event.
The learning of new knowledge and skills often requires previous knowledge, which can lead to some frustration if a teacher does not know a learner's exact knowledge and skills and therefore confronts them with exercises that are too difficult to solve. We present a solution to address this issue when teaching techniques and skills in the domain of table tennis, based on the concrete needs of trainers that we have investigated in a survey. We present a conceptual model for the representation of knowledge graphs as well as the level at which individual players already master parts of this knowledge graph. Our fine-grained model enables the automatic suggestion of optimal exercises in a player's so-called zone of proximal development, and our domain-specific application allows table tennis trainers to schedule their training sessions and exercises based on this rich information. In an initial evaluation of the resulting solution for personalised learning environments, we received positive and promising feedback from trainers. We are currently investigating how our approach and conceptual model can be generalised to some more traditional educational settings and how the personalised learning environment might be further improved based on the expressive concepts of the presented model.
Research paper: https://beatsigner.com/publications/personalised-learning-environments-based-on-knowledge-graphs-and-the-zone-of-proximal-development.pdf
Cross-Media Technologies and Applications - Future Directions for Personal In...Beat Signer
Webinar given at icity Lab Talks - The Digital Value Chain
In this talk, I will first provide an overview of the lab’s research on a general data-driven approach for cross-media information system and architectures based on the resource-selector-link (RSL) hypermedia metamodel. We will then have a look at several cross-media applications for personal information management and next-generation presentation solutions (MindXpres). Finally, I will outline the lab’s most recent research on tangible interaction and dynamic data physicalisation.
Bridging the Gap: Managing and Interacting with Information Across Media Boun...Beat Signer
The document discusses cross-media information spaces and architectures (CISA). It describes Prof. Beat Signer's research group which focuses on managing and interacting with information across media boundaries using a data-centric approach based on a hypermedia metamodel. The group develops technologies for cross-media linking, flexible document representation, and cross-media user interfaces. Several projects are mentioned, including systems for personal information management, content-driven presentations, interactive paper, and dynamic data physicalization.
Codeschool in a Box: A Low-Barrier Approach to Packaging Programming CurriculaBeat Signer
Presentation given at CSEDU 2023, Prague, Czech Republic.
The tech industry is a fast-growing field, with many companies facing issues in finding skilled workers to fill their open vacancies. At the same time, many people have limited access to the quality education necessary to enter this job market. To address this issue, various small and often volunteer-run non-profit organisations have emerged to up-skill capable learners. However, these organisations face tight constraints and many challenges while trying to design and deliver high-quality education to their learners. In this position paper, we discuss some of these challenges and present a preliminary version of a curriculum packager addressing some of these issues. Our proposed solution, inspired by first-hand experience in these organisations as well as computing education research (CER), is based on a combination of micromaterials, study lenses and a companion mobile application. While our solution is designed for the specific context of small organisations providing vocational ICT training, it can also be applied to the broader domain of learning environments facing similar constraints.
Research paper: https://beatsigner.com/publications/codeschool-in-a-box-a-low-barrier-approach-to-packaging-programming-curricula.pdf
Towards a Framework for Dynamic Data PhysicalisationBeat Signer
This document proposes a framework for dynamically physicalizing data. It describes the Tangible Hologram (TangHo) platform, which uses a 6 degree of freedom robotic arm prototype built from Lego Mindstorms. The arm can interact bidirectionally with a user through holograms displayed via HoloLens. Challenges include inverse kinematics since the final system will be body mounted. The document concludes that the conceptual framework and TangHo prototype allow for data-driven physicalization of large multi-dimensional datasets through dynamic and interactive designs.
Cross-Media Information Spaces and Architectures (CISA)Beat Signer
The document discusses research on cross-media information spaces and architectures led by Prof. Beat Signer. Some key areas of research include interactive paper, personal information management across digital and physical media, tangible user interfaces, and dynamic data physicalization using holograms and other technologies. The goal is to develop more fluid and open document formats that go beyond simulating paper on desktop computers.
Cross-Media Document Linking and NavigationBeat Signer
Presentation given at DocEng 2018, 18th ACM Symposium on Document Engineering, Halifax, Canada, August 2018
ABSTRACT: Documents do often not exist in isolation but are implicitly or explicitly linked to parts of other documents. However, due to a multitude of proprietary document formats with rather simple link models, today's possibilities for creating hyperlinks between snippets of information in different document formats are limited. In previous work, we have presented a dynamically extensible cross-document link service overcoming the limitations of the simple link models supported by most existing document formats. Based on a plug-in mechanism, our link service enables the linking across different document types. In this paper, we assess the extensibility of our link service by integrating some document formats as well as third-party document viewers. We illustrate the flexibility of creating advanced hyperlinks across these document formats and viewers that cannot be realised with existing linking solutions or link models of existing document formats. A user study further investigates the user experience when creating and navigating cross-document hyperlinks.
Paper: https://www.academia.edu/36550753/Cross_Media_Document_Linking_and_Navigation
An Analysis of Cross-Document Linking MechanismsBeat Signer
Presentation given at JCDL 2018, ACM/IEEE Joint Conference on Digital Libraries, Fort Worth, USA, June 2018
ABSTRACT: Physical and digital documents do often not exist in isolation but are implicitly or explicitly linked. Previous research in Human-Computer Interaction and Personal Information Management has revealed certain user behaviour in associating information across physical and digital documents. Nevertheless, there is a lack of empirical studies on user needs and behaviour when defining these associations. In this paper, we address this lack of empirical studies and provide insights into strategies that users apply when associating information across physical and digital documents. In addition, our study reveals the limitations of current practices and we suggest improvements for associating information across documents. Last but not least, we identify a set of design implications for the development of future cross-document linking solutions.
Paper: https://www.academia.edu/36348960/An_Analysis_of_Cross_Document_Linking_Mechanisms
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
A Visual Guide to 1 Samuel | A Tale of Two HeartsSteve Thomason
These slides walk through the story of 1 Samuel. Samuel is the last judge of Israel. The people reject God and want a king. Saul is anointed as the first king, but he is not a good king. David, the shepherd boy is anointed and Saul is envious of him. David shows honor while Saul continues to self destruct.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
1. 2 December 2005
Introduction to Databases
Advanced SQL
Prof. Beat Signer
Department of Computer Science
Vrije Universiteit Brussel
http://www.beatsigner.com
2. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 2March 24, 2017
Context of Today's Lecture
Access
Methods
System
Buffers
Authorisation
Control
Integrity
Checker
Command
Processor
Program
Object Code
DDL
Compiler
File
Manager
Buffer
Manager
Recovery
Manager
Scheduler
Query
Optimiser
Transaction
Manager
Query
Compiler
Queries
Catalogue
Manager
DML
Preprocessor
Database
Schema
Application
Programs
Database
Manager
Data
Manager
DBMS
Programmers Users DB Admins
Based on 'Components of a DBMS', Database Systems,
T. Connolly and C. Begg, Addison-Wesley 2010
Data, Indices and
System Catalogue
3. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 3March 24, 2017
Authorisation
Different types of authorisations (privileges) can
be assigned to a user via DDL
insert, read, update and delete privileges
The creator of a new relation is automatically given all
privileges on that relation
grantPrivilege = "GRANT" , "ALL PRIVILEGES" , "TO" , ( "PUBLIC" |
grantee ) | "GRANT" , privilege , { "," , privilege } ) , "ON" ,
( table | view ) , { "," , ( table | view ) } , "TO" ,
( "PUBLIC" | grantee ) , [ "WITH GRANT OPTION" ];
privilege = "INSERT" | "SELECT" | ( "UPDATE" , [ "(" , column ,
{ "," , column } , ")" ] ) | "DELETE";
grantee = ( user | role ) , { "," , ( user | role ) };
4. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 4March 24, 2017
Authorisation ...
An update privilege may be limited to certain
attributes only
Roles can be used to group users
GRANT ALL PRIVILEGES TO Alice, Bob;
GRANT INSERT, UPDATE (amount, status) ON Order TO Eve WITH GRANT OPTION;
createRole = "CREATE ROLE" , role;
grantRole = "GRANT" , role , "TO"
( "PUBLIC" | grantee );
CREATE ROLE PowerUser;
GRANT PowerUser TO Alice, Bob;
5. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 5March 24, 2017
Authorisation ...
Privileges can be passed to other users if the
WITH GRANT OPTION has been specified
Privileges and roles can be removed via the REVOKE
command (similar to GRANT statement)
Examples
Note that the revocation of a privilege may have an effect
on grants that have been passed to other users
authorisation graph has to be inspected
REVOKE INSERT ON Order FROM Eve;
REVOKE PowerUser FROM Bob;
6. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 6March 24, 2017
Authorisation Graph
Privilege revocation examples
remove privilege from user1 (g1) user4 still has privilege via g24
remove privilege from user2 (g2) user2 still has privilege via g23
remove privilege from user3 (g3) user3 still has privilege via g23
remove privilege from user2 (g2) and user3 (g3)
- g23 still exists but is no longer part of a path starting from the admin
user2 and user3 no longer have privilege user5 no longer has privilege
user1
user2
user3
user4
user5admin
g1
g2
g24
g3
g14
g25
g23
7. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 7March 24, 2017
Working with SQL
There are two main modes to work with SQL
via generic query interfaces or SQL application interfaces
note that standard SQL is not Turing complete
Generic SQL interface
command-line or web-based interface
answer single questions (one query)
interactive query evaluation
SQL interface for applications
sequence of queries, inserts, updates and deletes
SQL statements that are embedded within a host language
query results are processed and reused in non-declarative actions
- I/O interfaces
- human-computer interaction
8. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 8March 24, 2017
Impedance Mismatch Problem
Combination of SQL with a host language
mix of declarative and procedural programming paradigms
two completely different data models
- relational model with sets and bags
- no pointers, loops and branches in basic SQL
- no NULL values in typical host languages
different set of data types
- many programming languages do not offer Date or Time data types
Interfacing with SQL is not straightforward
data has to be converted between the host language and SQL
due to the impedance mismatch
~30% of the code and effort is used for this conversion!
various libraries to simplify the mapping (e.g. Hibernate)
9. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 9March 24, 2017
Impedance Mismatch Problem ...
Why not simply use a single language?
both languages have their domain-specific strengths
/**
* Transforms the Swiss Projection
* coordinates (y, x, h') to the
* ellipsoidic WGS84 coordinates (phi,
* lambda, h) using and approach of
* [U. Marti] based on the formulas of
* [Bolliger, 1967].
* @param swissCoordinates the Swiss
* coordinates to be transformed.
* @return the WGS84 coordinates for
* the specified Swiss coordinates.
*/
public static final WGS84Coordinates
transformSwissCoordinatesToWGS84(
SwissCoordinates swissCoordinates) {
double yPrime =
(swissCoordinates.getY() - 600000) /
1000000;
double xPrime =
(swissCoordinates.getX() - 200000) /
1000000;
double xPrimePow2 = xPrime * xPrime;
double xPrimePow3 = xPrimePow2 *
xPrime;
double yPrimePow2 = yPrime * yPrime;
double yPrimePow3 = yPrimePow2 *
...
Impedance
Mismatch
Application Code Database
10. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 10March 24, 2017
SQL Programming Environments
Embedded SQL (ESQL)
integration of SQL in a host programming language
e.g. interfacing with C through ESQL/C
SQL Call-Level Interface (SQL/CLI)
e.g. interfacing with Java through JDBC
SQL Persistent Stored Modules (SQL/PSM)
stored procedures
Triggers
11. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 11March 24, 2017
Database Applications
Task sharing between client and server
client does data presentation
server does data management
Where should we implement the application logic?
on the client
- ESQL, SQL/CLI, ODBC, JDBC, ...
on the server
- SQL/PSM, Stored Procedures, Triggers
thin client vs. thick client
12. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 12March 24, 2017
Example Database
customerID
name
street
postcode
city
orderID
customerID
cdID
date
amount
status
Customer
CDOrder
name
address
Producer
cdID
title
duration
price
year
producer
CREATE TABLE Customer (
customerID INTEGER CHECK (customerID > 0) PRIMARY KEY,
name VARCHAR(30) NOT NULL,
street VARCHAR(30) NOT NULL,
postcode SMALLINT CHECK (postcode > 0),
city VARCHAR(20)
);
13. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 13March 24, 2017
Example Database ...
CREATE TABLE Producer (
name VARCHAR(40) PRIMARY KEY,
address VARCHAR(30)
);
CREATE TABLE Order (
orderID INTEGER CHECK (orderID > 0) PRIMARY KEY,
customerID INTEGER,
cdID INTEGER,
date DATE,
amount INTEGER,
Status VARCHAR(20) NOT NULL DEFAULT 'open',
UNIQUE (customerID, cdID, date),
FOREIGN KEY (customerID) REFERENCES Customer(customerID)
ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (cdID) REFERENCES CD(cdID)
ON UPDATE CASCADE
);
14. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 14March 24, 2017
Example Database ...
CREATE TABLE CD (
cdID INTEGER PRIMARY KEY,
title VARCHAR(30) NOT NULL,
duration SMALLINT,
price SMALLINT,
year SMALLINT,
producer VARCHAR(40),
FOREIGN KEY (producer) REFERENCES Producer(name)
);
15. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 15March 24, 2017
Embedded SQL
The expressiveness of SQL can be enhanced by
embedding SQL statements into application code
Use of a preprocessor
transforms SQL statements into function calls in the host language
type checks, syntax and semantic validation
error handling
Data interchange via shared variables
shared variables are used in SQL statements as well as in
statements of the host language
A special SQLSTATE variable is used to connect the host
language with the SQL execution engine
16. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 16March 24, 2017
Embedded SQL Program Processing
The preprocessor transforms a program with embedded
SQL statements into the host language
e.g. nsqlprep.exe for ESQL-C
The compiler produces the linked program object code
Host
language
with
Embedded
SQL
Host
language
with
function
calls
Program
object
code
Embedded SQL
preprocessor
Host language
compiler
SQL library
17. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 17March 24, 2017
Call Level Interface
SQL library functions are called directly
not tied to particular DBMS (drivers stored separately)
Various implementations exist
SQL/CLI for C
Open Database Connectivity (ODBC) and its successor OLE DB
Java™ Database Connectivity (JDBC)
ActiveX® Data Objects (ADO)
18. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 18March 24, 2017
Java Database Connectivity (JDBC)
The following JDBC packages are part of Java SE 8
java.sql.*
- basic JDBC functionality for J2SE
javax.sql.*
- supplemental extensions for J2EE
The standardised Java API provides database
connectivity through vendor-specific drivers
Limited code portability among SQL platforms due to
vendor-specific SQL dialects
19. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 19March 24, 2017
Opening a JDBC Connection
The JDBC URL varies for different drivers
e.g. jdbc:microsoft:sqlserver for Microsoft SQL Server
public Connection openConnection() {
try {
Connection conn = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://localhost:1433",
"fred",
"password");
return conn;
} catch (SQLException e) {
System.out.println("Opening JDBC Connection failed.");
return null;
}
}
20. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 20March 24, 2017
Statements
There are three different kinds of statements
Statement
- general statement
PreparedStatement
- precompiled statement
- more efficient if the same query is executed multiple times
CallableStatement
- used to call stored procedures
Methods for executing a statement
executeUpdate(String sql)
executeQuery(String sql)
No parameters are required for PreparedStatements
21. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 21March 24, 2017
Statements ...
void insertProducer(String name, String address) {
try {
Connection conn = this.openConnection();
Statement s = conn.createStatement();
s.executeUpdate("INSERT INTO Producer VALUES ('" + name + "', '"
+ address + "')");
} catch (SQLException e) {
System.out.println("Inserting "" + name + "" failed.");
}
}
public void insertProducer(String name, String address) {
try {
Connection conn = this.openConnection();
Statement s = conn.prepareStatement("INSERT INTO Producer VALUES ('"
+ name + "', " + address + ")");
s.executeUpdate();
} catch (SQLException e) {
System.out.println("Inserting "" + name + "" failed."); }
}
22. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 22March 24, 2017
Result Set
JDBC represents cursors as ResultSet
API offers navigation methods on a ResultSet
next(), previous()
first(), last()
absolute(int row), relative(int rows)
API offers various get methods to fetch data as well as
update methods for common SQL data types
23. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 23March 24, 2017
Result Set Example
Note that it would be easier to use the SQL AVG operator
public float getAverageCDLength() {
float result = 0.0;
try {
Connection conn = this.openConnection();
Statement s = conn.createStatement();
ResultSet set = s.executeQuery("SELECT length FROM CD");
int i = 0;
while (set.next()) {
result += set.getInt(1);
i++;
}
return result/i;
} catch (SQLException e) {
System.out.println("Calculation of average length failed.");
return 0;
}
}
24. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 24March 24, 2017
Parameter Parsing
Prepared statements can be parameterised
flexibility to use different values in a given query
A question mark (?) is used as a placeholder in the query
string
Various methods to insert data at runtime
setString(int index, String s)
setInt(int index, int i)
setBoolean(int index, boolean b)
setDate(int index, Date d)
...
25. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 25March 24, 2017
Parameter Parsing Example
public void insertProducers(List<Producer> producers) {
try {
Connection conn = this.openConnection();
Statement s = conn.prepareStamement(
"INSERT INTO Producer(name, address) VALUES(?, ?)");
for (Producer producer : producers) {
s.setString(1, producer.getName());
s.setString(2, producer.getAddress());
s.executeUpdate();
}
} catch (SQLException e) {
System.out.println("Insertion of Producers failed.");
}
}
26. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 26March 24, 2017
Special Datatypes and NULL Values
Some SQL datatypes cannot be easily mapped to Java
datatypes
JDBC offers implementations for these types
Clob, Blob, Date, Time, Timestamp
Null values are handled via special methods
wasNull()
updateNull(int index)
setNull(int index, int sqlType)
27. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 27March 24, 2017
JDBC Summary
Concepts of ESQL and JDBC are similar
State of the art for Java database programming
Generic JDBC-ODBC driver if no specific JDBC driver is
available
Java Data Objects (JDO)
enables Java programmers to directly store their Java domain
model instances in a database
hides SQL from the programmer
http://java.sun.com/javase/technologies/database/
28. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 28March 24, 2017
Application Logic on the Server Side
Stored Procedures
PL/SQL
- Oracle
Transact-SQL
- Microsoft
standardised as SQL/PSM in SQL-99
- Persistent Stored Modules
Triggers
event driven execution of application logic
User Defined Types
standardised in SQL-99
29. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 29March 24, 2017
SQL Persistent Stored Modules
SQL is extended with constructs known from high-level
programming languages
assignments, branches, loops, subroutines and exceptions
createProcedure = "CREATE PROCEDURE" , name , "(" , parameters , ")" ,
localDeclarations , procedureBody;
createFunction = "CREATE FUNCTION" , name , "(" , parameters , ")" ,
"RETURNS" , type , localDeclarations , functionBody;
30. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 30March 24, 2017
Parameters
SQL/PSM defines three types for parameters
IN
- input only
OUT
- output only
INOUT
- both input and output
The default mode is IN
Procedure parameters can have any mode
Function parameters can have IN mode only
result given back only via the return value
31. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 31March 24, 2017
Procedure Example
Procedure parameters can have any mode
DB administrators often create these type of procedures
(for maintenance)
CREATE PROCEDURE RelocateProducer(
IN oldAddress VARCHAR(30),
IN newAddress VARCHAR(30)
)
UPDATE Producer
SET address = newAddress
WHERE address = oldAddress;
32. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 32March 24, 2017
Function Example
CREATE FUNCTION AverageCDLengthOfProducer(
IN name VARCHAR(30),
)
RETURNS INTEGER
DECLARE result INTEGER;
BEGIN
SELECT AVG(length) INTO result
FROM CD
WHERE producer = name;
RETURN result;
END;
33. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 33March 24, 2017
SQL/PSM Statements
Procedure calls
Function evaluation
functions cannot be called
functions are directly invoked as parts of expressions
Return statement
does not terminate the function
additional RETURN statements may cause the return value to
change after an initial return statement
CALL name (arguments)
RETURN expression
34. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 34March 24, 2017
SQL/PSM Statements ...
Local variable declaration
Assignments
NULL is a permissible expression
Compound statement
DECLARE name type
SET variable = expression
BEGIN ... END
35. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 35March 24, 2017
Branch Statement
If statement
ELSEIFs and final ELSE are optional
IF condition THEN
statements
ELSEIF condition THEN
statements
ELSE
statements
ENDIF
36. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 36March 24, 2017
Branch Example
CREATE FUNCTION IsExpensive(
IN cdTitle CHAR(30)
)
RETURNS BOOLEAN
IF NOT EXISTS(SELECT *
FROM CD
WHERE title = cdTitle) THEN
RETURN FALSE;
ELSEIF 50 < (SELECT MAX(price)
FROM CD
WHERE title = cdTitle) THEN
RETURN TRUE;
ELSE
RETURN FALSE;
ENDIF;
37. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 37March 24, 2017
Loop Statements
Basic loop statement
The loop can be terminated with
LEAVE label
the label identifies which loop has to be aborted
label: LOOP
statements
END LOOP
38. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 38March 24, 2017
Loop Statements ...
While loop statement
Repeat loop statement
WHILE condition DO
statements
END WHILE
REPEAT
statements
UNTIL condition
END REPEAT
39. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 39March 24, 2017
Loop Statements ...
For loop statement
Convenience statement to iterate over cursor
open / close cursor
check if more tuples to be fetched
Name and cursor are needed for transformation into
basic loop (by PSM interpreter)
FOR name AS cursor CURSOR FOR
query
DO
statements
END FOR
40. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 40March 24, 2017
Loop Example
CREATE FUNCTION LengthVarianceOfProducer(
IN name VARCHAR(40),
) RETURNS REAL
DECLARE variance REAL;
DECLARE mean REAL;
DECLARE count INTEGER;
BEGIN
SET variance = 0.0; SET mean = 0.0;
SET count = 0;
FOR cdLoop AS cdCursor CURSOR FOR
SELECT length FROM CD WHERE producer = name;
DO
SET count = count + 1;
SET variance = variance + length * length;
SET mean = mean + length;
END FOR;
SET mean = mean/count;
RETURN variance/count – mean * mean;
END;
41. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 41March 24, 2017
SQL/PSM Summary
Perform computation on the server side
Implement functionality not contained in SQL
recursion
closure
mathematical and statistical functions
SQL in combination with SQL/PSM forms a
Turing complete programming language
Functionality for administrative tasks is often
implemented as PSM
42. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 42March 24, 2017
Transitive Closure (Recursion)
Inconvenient to specify transitive closure using iteration
Since SQL:1999 there is a form of recursion using the
WITH RECURSIVE clause
Example
"Find all destinations that can be reached (directly or indirectly)
from Zurich Airport"
from to
ZRH BRU
ZRH JFK
BRU CDG
JFK BRU
... ...
Flight
43. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 43March 24, 2017
Transitive Closure (Recursion) ...
Recursive view is a union of two subqueries
base query
recursive query making use of the recursive view
- recursive query should be monotonic (e.g. no aggregation in recursive view)
Repeat until no new tuples added and fixpoint is reached
WITH RECURSIVE Connection(from, to) AS (
SELECT from, to
FROM Flight
UNION
SELECT Flight.from, Connection.to
FROM Flight, Connection
WHERE Flight.to = Connection.from
)
SELECT DISTINCT to
FROM Connection
WHERE Connection.from = 'ZRH';
44. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 44March 24, 2017
Triggers
A trigger is a statement that the DBMS executes as a
side effect of a modification to the database
The definition of a trigger follows the so-called
event-condition-action (ECA) model
event
- specifies the signal that triggers the rule (e.g. insert, update or delete)
condition
- the condition that has to be satisfied for the execution of the action
action
- the action to be executed
Triggers are a powerful tool for checks before/after an
operation on a relation (e.g. for integrity constraints)
45. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 45March 24, 2017
Triggers ...
Example
When data is restored from a backup or replicated,
triggers often have to be disabled
otherwise triggers might be executed multiple times
The execution of a trigger can lead to a (infinitite)
cascade of other triggers that get fired
often the length of such a trigger chain is limited by the system
CREATE TRIGGER setNull BEFORE UPDATE ON Producer
REFERENCING NEW ROW AS newRow
FOR EACH ROW
WHEN newRow.address = '' SET newRow.address = NULL;
46. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 46March 24, 2017
Homework
Study the following chapter of the
Database System Concepts book
chapter 5
- sections 5.1-5.4, 5.7
- Advanced SQL
47. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 47March 24, 2017
Exercise 6
Structured Query Language (SQL)
48. Beat Signer - Department of Computer Science - bsigner@vub.ac.be 48March 24, 2017
References
A. Silberschatz, H. Korth and S. Sudarshan,
Database System Concepts (Sixth Edition),
McGraw-Hill, 2010
H. Garcia-Molina, J.D. Ullman and J. Widom, Database
Systems: The Complete Book, Prentice Hall, 2002