Reader small image

You're reading from  Developing Robust Date and Time Oriented Applications in Oracle Cloud

Product typeBook
Published inMay 2023
PublisherPackt
ISBN-139781804611869
Edition1st Edition
Concepts
Right arrow
Author (1)
Michal Kvet
Michal Kvet
author image
Michal Kvet

Michal Kvet is a researcher, educator, and database expert at the University of Žilina in Slovakia. His primary focus areas are databases, analytics, performance, and cloud computing. He works closely with Oracle and Oracle Academy. He is the co-author of multiple textbooks (a SQL and PL/SQL cookbook, a book on APEX application development, a book on temporal databases, and a MySQL cookbook), coordinates multiple Erasmus+ projects and co-organizes several research conferences and database workshops. Besides this, he supervises engineering projects and bachelor's, master's, and doctoral theses. Over the years, his research has been associated with date and time management and temporal databases. He has Oracle's SQL, PL/SQL, Cloud, Analytics, and Administration certifications. His core knowledge of temporality is provided to you in this book.
Read more about Michal Kvet

Right arrow

Interval Representation and Type Relationships

So far, we have dealt with time points and durations expressed via closed-closed or closed-open characteristics. We have shown how to model unbounded validity. The focus has been on the transformation rules across the representations. This chapter deals with the duration interval positions and interaction principles between multiple representations. These interaction characteristics are widely used in the temporal environment by examining the evolution of the object’s states and changes. The emphasis must be on collision detection and undefined state identification. As we will describe in the first part of this chapter, interval interaction types form a tree structure summarizing possible interval positions and interactions.

Then, the second part of this chapter will highlight the temporal validity, represented by the PERIOD data structure. You will get a complex understanding of modeling principles, representations, usage, and...

Relationships between time interval representations

Relationships between time intervals form an important part of processing in time-delimited environments. Individual states of objects must be defined positionally, emphasizing possible overlaps of time intervals so that the object is always defined correctly in time. Each object needs to be covered by just one valid state at any time (based on the assumption that the undefined states are explicitly defined by the user). Therefore, it is necessary to identify the different types of time and interval relationships. This section describes the existing taxonomy of relationships according to Tom Johnston and Randall Weis in their book Managing Time in Relational Databases: How to Design, Update and Query Temporal Data. We will point out the potential interpretations and the importance of specific types in time-oriented databases. Temporal solutions based on positional representation were defined in 1983 and became the basis of the temporal...

Using positional relations in temporal space

A temporal database is characterized by extending the object identifier by the time dimensions introduced in the Exploring temporal dimensions section in Chapter 11. Typically, the object cannot be directly identified by the ID. Time validity must be applied as well. Thus, there are multiple states for each object. However, each data object tuple characterizes the object’s values at a particular time frame. It must be ensured that each state is defined by no more than one valid state at any time. The uni-temporal model uses a one-time dimension, mostly related to validity. The temporal integrity covers the reliability of the system. Supervision is done by the transaction manager using the positional relationships in the temporal space. The aim is to ensure that each object is characterized by one state, allowing users to sort the states based on the timeline. To do that, the following relationships are used:

  • The [intersects...

Modeling temporal validity using Oracle Database’s embedded PERIOD

The original concept of the PERIOD data type was specified in the temporal paradigm definition, but it was not, however, completely accepted. The principle was based on providing an extra data type covering the duration, internally modeled by the beginning and end points of the state validity. It was based on direct mapping and comparison; thus, the positional relationships were assumed to be widespread. Thanks to that, sorting the states over the evolution was easy, and there was an emphasis on the consistency of the duration and the definition – the beginning point was placed before the end point. It was primarily designed for validity management, but any time frame could be used generally. Since the standardization process did not approve the concept of the PERIOD data type, many research and development prospects were either refused or at least not further developed. As a result, individual developers...

Summary

This chapter dealt with interval representation and type relationships. In the first part, transformation principles across time intervals were stated and demonstrated by adding the smallest time element to the interval. Then, the focus shifted to the positional and temporal relationships by discussing interval interaction types. These positions are crucial for state monitoring in a timeline.

Oracle Database provides a PERIOD structure that applies to the table definition expressing the duration forming temporal validity. This chapter dealt with its concepts, modeling, and definition. By reading this chapter, you will have become familiar with using the data dictionary to evaluate and identify the PERIOD structure for a particular table that already exists. The PERIOD structure is associated with the ENABLE_AT_VALID_TIME function of the DBMS_FLASHBACK_ARCHIVE package. By using that function, temporal principles can be applied. It allows you to highlight current valid states...

Questions

  1. Let’s define the following duration with a closed-closed representation: < 1st of January 2022 ; 28th of February 2022 >. Which option expresses an analogous solution using a closed-open model?
    1. < 1st of January 2022 ; 28th of February 2022 )
    2. < 1st of January 2022 ; 29th of February 2022 )
    3. < 1st of January 2022 ; 1st of March 2022 )
    4. ( 31th of December 2021 ; 1st of March 2022 )
  2. Which relationship characterizes two interval interactions with no common point?
    1. not_fills only
    2. occupies only
    3. The whole excludes category
    4. meets only
  3. Which interval interaction type is used in temporal management to monitor the temporal state evolution with no undefined states?
    1. before
    2. after
    3. meets
    4. fills
  4. If the PERIOD specification is defined by PERIOD FOR VALIDITY, what are the names of the temporal attributes?
    1. PERIOD_START, PERIOD_END
    2. VALIDITY_START, VALIDITY_END
    3. BD, ED
    4. An exception is raised because the names are not explicitly specified
  5. Which option takes current valid data...

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Developing Robust Date and Time Oriented Applications in Oracle Cloud
Published in: May 2023Publisher: PacktISBN-13: 9781804611869
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Michal Kvet

Michal Kvet is a researcher, educator, and database expert at the University of Žilina in Slovakia. His primary focus areas are databases, analytics, performance, and cloud computing. He works closely with Oracle and Oracle Academy. He is the co-author of multiple textbooks (a SQL and PL/SQL cookbook, a book on APEX application development, a book on temporal databases, and a MySQL cookbook), coordinates multiple Erasmus+ projects and co-organizes several research conferences and database workshops. Besides this, he supervises engineering projects and bachelor's, master's, and doctoral theses. Over the years, his research has been associated with date and time management and temporal databases. He has Oracle's SQL, PL/SQL, Cloud, Analytics, and Administration certifications. His core knowledge of temporality is provided to you in this book.
Read more about Michal Kvet