Developing Robust Date and Time Oriented Applications in Oracle Cloud: A comprehensive guide to efficient date and time management in Oracle Cloud 9781804611869, 1804611867

Create robust temporal solutions in Oracle Cloud and spread the solution worldwide by leveraging its regional properties

129 35 7MB

English Pages 464

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover
Title Page
Copyright and Credits
Contributors
Table of Contents
Preface
Part 1: Discovering Oracle Cloud
Chapter 1: Oracle Cloud Fundamentals
Oracle Cloud concepts
The Always Free option
Types of ADBs
Understanding the deployment models
A public cloud
A private cloud
The hybrid cloud
The community cloud
Shared versus dedicated architecture
Oracle Cloud terminology
Region
Availability domains
Realms
Tenancies
Consoles
Compartments
VCNs
Instances
Images
Storage management
Networking
Compute instances
Database provisioning
Connecting to the ADB
Database system architecture overview
Memory structures
Database system architecture
Summary
Questions
Further reading
Chapter 2: Data Loading and Migration Perspectives
Understanding SQL Loader
Importing data using SQL Data Loader in SQL Developer Desktop
Importing data using SQL Data Loader in the cloud interface
Accessing data stored outside the database using an external table
Getting to know client-side import/export
Examining server-side import/export using dump files
Object Storage and buckets
Creating credentials
Authentication token
Pre-authenticated request
Import process using dump files
Export process using dump files
Understanding Transportable Tablespace Data Pump
Full Transportable Tablespace Data Pump
Exploring migration techniques
OCI Data Transfer Service
Oracle Zero Downtime Migration
Enterprise Manager Database Migration
Oracle Maximum Availability Architecture
Oracle Application Continuity
Move to Autonomous Database, Move to Oracle Cloud Database
OCI GoldenGate
Summary
Questions
Further reading
Part 2: Understanding the Roots of Date and Time
Chapter 3: Date and Time Standardization Principles
Understanding relational database integrity
The ISO 8601 standard
Date value definition
Week management
Ordinal date values
Time element modeling and management
12-hour notation remarks
Composite date and time value
Periods of time
Validity interval modeling
Unlimited validity
Interval periodicity
Representation enhancement remarks
Date and time value modeling in CSV, XML, and JSON format
Summary
Questions
Further reading
Chapter 4: Concepts of Temporality
What is temporality?
Introducing DST
The impact of DST
Permanent DST usage
Summer Time in Europe
Introducing UTC
Time zone perspective
Implementing DST in an Oracle database
Gregorian versus Julian calendar
Leap years in the Gregorian calendar
Leap second
The leap second in Oracle Databases
Summary
Questions
Further reading
Part 3: Modeling, Storing, and Managing Date and Time
Chapter 5: Modeling and Storage Principles
Exploring data types
Exploring constructor functions
The ANSI DATE constructor
The TO_DATE function
The ANSI TIMESTAMP constructor
The TO_TIMESTAMP function
Time zone enhancements
DATE and TIMESTAMP transformation
Daylight saving time in Oracle
Storing the date as an INTEGER value
Getting the actual date and time values
Getting to know DATE arithmetic
Understanding the INTERVAL data type
INTERVAL YEAR TO MONTH
INTERVAL DAY TO SECOND
TIMESTAMP arithmetic
Summary
Questions
Further reading
Chapter 6: Conversion Functions and Element Extraction
Understanding the TO_CHAR and TO_DATE conversion functions
Working with flexible format mapping
Constructing the TIMESTAMP value
Conversion functions – century reference
TIMESTAMP precision in SQL and PL/SQL
Understanding the EXTRACT function
Reliability and integrity issues
Investigating the CAST function
Casting a character string to a DATE value
Casting a numerical value to a DATE value
Casting DATE to TIMESTAMP
Casting TIMESTAMP to DATE
Casting a DATE value to character string format
Casting a TIMESTAMP value to character string format
Casting NULL
Validating conversions
Summary
Questions
Further reading
Chapter 7: Date and Time Management Functions
Getting to know the ADD_MONTHS function
Identifying the number of days in a month using LAST_DAY
Understanding the usage of the MONTHS_BETWEEN function
Exploring the NEXT_DAY and NEXT_DATE functions
Exploring the principles of the NEXT_DAY function
The impact of language definition on the NEXT_DAY function
Implementing the NEXT_DATE function
Numerical day-of-week representation related to the NEXT_DATE function
Getting the second Sunday of the month
Investigating the TRUNC function
The TRUNC function and week management
Understanding the usage of the ROUND function
Understanding the PERSONAL_ID concept and birthday management
Generating random dates
Summary
Questions
Further reading
Chapter 8: Delving into National Language Support Parameters
NLS parameter overview
Exploring NLS parameters and their impact
NLS_DATE_FORMAT parameter
NLS_DATE_LANGUAGE parameter
NLS_CALENDAR parameter
NLS_TERRITORY parameter
Embedding NLS parameters in the TO_CHAR function
Other NLS parameters
Summary
Questions
Further reading
Part 4: Modeling Validity Intervals
Chapter 9: Duration Modeling and Calculations
What timepoint means and how to use it
Getting the current state
Deploying duration models using timepoint borders
Closed-closed representation
Closed-open representation
Transformation of duration intervals
Interval representation remarks
Modeling unlimited validity
Getting current valid states
Managing duration – getting the elapsed time
Summary
Questions
Further reading
Chapter 10: Interval Representation and Type Relationships
Relationships between time interval representations
Using positional relations in temporal space
Modeling temporal validity using Oracle Database’s embedded PERIOD
Concepts of temporal validity
Utilizing data images using the DBMS_FLASHBACK_ARCHIVE package
Identifying temporality
Final remarks
Summary
Questions
Further reading
Chapter 11: Temporal Database Concepts
The origin and evolution of temporal models
The object-oriented temporal approach
The temporal aspect of management
Temporal system requirements
Exploring temporal dimensions
Validity
Transaction validity
The IPL model
The IPLT model
Future valid record management
Online and offline application modes
Replicas
Final remarks on the temporal dimensions
The attribute-oriented approach
The extended attribute-oriented temporal approach
The group-level temporal system
Temporal group – the physical representation
Conventional table with time-delimited attributes
Summary
Questions
Further reading
Chapter 12: Building Month Calendars Using SQL and PL/SQL
Defining a calendar using PL/SQL
Modeling a calendar using SQL
Step 1 – Getting the day numbers for each day in the month
Step 2 – Grouping the data based on the weekday
Step 3 – Padding the data
Step 4 – Getting the header and ordering the rows in the result set
Name day management
The header of the package
The package body
Summary
Questions
Further reading
Part 5: Building Robust and Secure Temporal Solutions
Chapter 13: Flashback Management for Reconstructing the Database Image
Transaction as a change vector source
Transaction log structure and log types
Reconstructing states using Flashback technology
Using FLASHBACK DATABASE to get a historical image
Understanding and referencing the DBMS_FLASHBACK package
Retrieving historical data using the AS OF query
Summary
Questions
Further reading
Chapter 14: Building Reliable Solutions to Avoid SQL Injection
Understanding SQL injection
Solutions to limit SQL injection
Using bind variables
Explicit date and time value conversion
Sanitizing the input with the DBMS_ASSERT package
Implementing the ENQUOTE_LITERAL function for data enclosure
Summary
Questions
Further reading
Part 6: Expanding a Business Worldwide Using Oracle Cloud
Chapter 15: Timestamp Enhancements
Applying time zones for the server and client sides
Setting the time zone value at the database and session levels
TIMESTAMP and transformation across time zones
Extending the TIMESTAMP value with the time zone using the FROM_TZ function
Using the AT TIME ZONE clause to reflect the time zone shift
Transforming DATE values across multiple time zones using the NEW_TIME function
Converting time zones
TIMESTAMP normalization
Extracting UTC
Local value reflection using TIMESTAMP data type extensions
Local versus global expansion
Summary
Questions
Further reading
Chapter 16: Oracle Cloud Time Zone Reflection
Summarizing time zone management
Exploring SQL translation profiles
Developing a package to translate SQL code
Translation profile usage
Simplifying time zone management shift using SYSDATE_AT_DBTIMEZONE
Summary
Questions
Further reading
Index
Other Books You May Enjoy
Further reading
Assessments
Chapter 1 – Oracle Cloud Fundamentals
Chapter 2 – Data Loading and Migration Perspectives
Chapter 3 – Date and Time Standardization Principles
Chapter 4 – Concepts of Temporality
Chapter 5 – Modeling and Storage Principles
Chapter 6 – Conversion Functions and Element Extraction
Chapter 7 – Date and Time Management Functions
Chapter 8 – Delving into National Language Support Parameters
Chapter 9 – Duration Modeling and Calculations
Chapter 10 – Interval Representation and Type Relationships
Chapter 11 – Temporal Database Concepts
Chapter 12 – Building Month Calendars Using SQL and PL/SQL
Chapter 13 – Flashback Management for Reconstructing the Database Image
Chapter 14 – Building Reliable Solutions to Avoid SQL Injection
Chapter 15 – Timestamp Enhancements
Chapter 16 – Oracle Cloud Time-Zone Reflection
Index
Why subscribe?
Other Books You May Enjoy
Packt is searching for authors like you
Share Your Thoughts
Download a free PDF copy of this book

Developing Robust Date and Time Oriented Applications in Oracle Cloud: A comprehensive guide to efficient date and time management in Oracle Cloud
 9781804611869, 1804611867

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers