Book Image

Developing Robust Date and Time Oriented Applications in Oracle Cloud

By : Michal Kvet
Book Image

Developing Robust Date and Time Oriented Applications in Oracle Cloud

By: Michal Kvet

Overview of this book

Proper date and time management is critical for the development and reliability of Oracle Databases and cloud environments, which are among the most rapidly expanding technologies today. This knowledge can be applied to cloud technology, on premises, application development, and integration to emphasize regional settings, UTC coordination, or different time zones. This practical book focuses on code snippets and discusses the existing functionalities and limitations, along with covering data migration to the cloud by emphasizing the importance of proper date and time management. This book helps you understand the historical background and evolution of ANSI standards. You’ll get to grips with data types, constructor principles, and existing functionalities, and focus on the limitations of regional parameters and time zones, which help in expanding business to other parts of the world. You’ll also explore SQL injection threats, temporal database architecture, using Flashback Technology to reconstruct valid database images from the past, time zone management, and UTC synchronization across regions. By the end of this book, you’ll be able to create and manage temporal systems, prevent SQL injection attacks, use existing functionalities and define your own robust solutions for date management, and apply time zone and region rules.
Table of Contents (26 chapters)
1
Part 1: Discovering Oracle Cloud
4
Part 2: Understanding the Roots of Date and Time
7
Part 3: Modeling, Storing, and Managing Date and Time
12
Part 4: Modeling Validity Intervals
17
Part 5: Building Robust and Secure Temporal Solutions
20
Part 6: Expanding a Business Worldwide Using Oracle Cloud

Oracle Cloud concepts

Oracle ADBs provide you with complexity, robustness, availability, and security with the following enhancements:

  • Self-driving: ADBs reduce the human activity required to provision, secure, monitor, back up and recover, as well as troubleshoot and perform maintenance activities to optimize and tune the database and its overall performance. They strongly reduce the work required by administrators so that they can focus on other tasks, apps, and database optimization strategies. Moreover, ADBs are converged. They can serve any data structures and types – relational, graph, temporal, spatial, streams or object structures, XML, JSON, and so on. Therefore, provisioned databases do not need to be oriented to a single purpose. The Oracle Cloud architecture is based on the Exadata platform, covering dynamic Online Transaction Processing (OLTP) in Autonomous Transaction Processing (ATP) or an analytical support layer, defined in Autonomous Data Warehouses (ADW). A specific type is covered by Oracle Autonomous JSON Database (AJD), which is specialized for NoSQL-style applications that use JavaScript Object Notation (JSON) documents. It is a feature-scoped service for storing, manipulating, and retrieving JSON documents using SQL and Document APIs. JSON is very flexible, allowing us to process schemaless data by offering dynamic reactions to application changes. There’s no need to normalize the content into relational tables. Oracle AJD typically uses Simple Oracle Document Access (SODA) APIs.
  • Self-securing: Specific services ensure system protection via firewalls and threat detection. Individual updates and patches are applied without requiring user or administrator intervention, and even with zero downtime. Data always goes through end-to-end encryption. The cloud ensures security at all levels.
  • Self-repairing: ADBs are more powerful, robust, and reliable than manually administered local databases. Data images are automatically mirrored and spread across different regions. This automatically protects the system from any physical failure (at the server or data center level) by shifting the workload to different standby databases. The fact that systems are multiplicated allows the system to be upgraded with no downtime.

Oracle Cloud Infrastructure (OCI) extends the original on-premises systems with high-performance computing power running in a cloud environment. The main advantage is elasticity, allowing the system to dynamically reflect the current workload, processing demands, and user activity. In addition, it uses Oracle autonomous services, an integrated security layer, robust functionality, and optimization techniques. OCI improves your performance and processing through autonomous services, easy migration, cost reduction, and performance enhancements.

The following list summarizes the available product categories in OCI:

  • Oracle Analytics uses built-in ML and AI to propose a robust solution for the company and offer better decision-making opportunities. It covers Oracle Analytics Cloud, Oracle Big Data Service, Oracle Big Data SQL Cloud Service, Oracle Data Science, OCI Data Flow, and many more.
  • The application development environment handles data-driven application development by simplifying the whole development process. It covers the API Gateway service, Blockchain Platform, OCI Data Science, Oracle Digital Assistant, Java functionality, OCI Events Service, Mobile Hub, Oracle MySQL Database Service, and more. Two solutions should be emphasized – Oracle Application Express (APEX) and Visual Builder. These tools provide a complex environment to create web- or mobile-based applications based on SQL, PL/SQL, or JavaScript functionality. Thus, using these tools makes implementation far easier, aided by rapid development. The solution can be created overnight.
  • Applied software technologies include AI, blockchain, ML, data science, and digital assistants.
  • Compute nodes ensure scalability and overall performance.
  • Databases such as ATP, ADW, AJD, Oracle Base Database Service (formerly known as Database Cloud Service) (bare-metal/Virtual Machine (VM)), Exadata Cloud Service, and so on are offered.
  • Integration is performed using API Gateway, Oracle GoldenGate, Oracle Data Integrator, OCI Data Integration, and Oracle SOA Cloud Service.
  • Observability and management are offered by logging, monitoring, notifications, and other techniques, along with the OCI Resource Manager service.
  • Networking and connectivity are managed by the DNS, email delivery, FastConnect, health checks, load balancing, Virtual Cloud Networks (VCNs), and so on.
  • Security, identity, and compliance reduce the constant threat risk with security-first design principles, utilizing built-in tenant isolation and least privilege access. There are several defense layers that can be implemented, including Identity and Access Management (IAM), OCI Vault key management, Security Zones, Cloud Guard, Web Application Firewall, Bastion, and Vulnerability Scanning Service. The core element of overall security, however, is the always-on data encryption. Automated security is responsible for reducing complexity, the number of human errors, and costs with automated patching.
  • Storage includes Archive Storage, Block Volume, Data Transfer, File Storage, Local NVMe SSD storage, Object Storage, and Storage Gateway.

Oracle Cloud technology is in widespread use across the whole world by both commercial and government entities. In Europe, clouds are located in multiple cities, including Amsterdam, London, Frankfurt, Zürich, and Newport. New locations are still being opened over time, and availability is widespread.

Now that you understand the core properties of Oracle Cloud, it’s time to provision the database and get started with practicing. Oracle offers you the Always Free option with time-unlimited resources for testing and studying purposes. Although it is resource limited, as the name suggests, it’s free. Later on, you can apply for the paid option to extend the functionality and resources if required.

The Always Free option

OCI has launched a significant project to offer cloud services to students and developers for testing and evaluation. The Oracle Cloud Always Free tier is provided to students to test the suitability of their environments. Services are time-unlimited with the following resource limitations:

  • 2 ADBs, each limited to 1 OCPU and 20 GB of disk storage
  • Compute VMs
  • 2 Block Volume storage instances – 100 GB in total
  • 10 GB object storage
  • 10 GB archive storage

If you are unfamiliar with OCI, the Oracle Cloud Always Free option makes sense. It is implemented inside the Oracle Cloud Free Tier, which comes with a 30-day free trial with $300 of free credits and access to a wide range of Oracle Cloud services during the trial period (containing the Database, Analytics, Compute, and Container Engine for Kubernetes services). This is limited to no more than 8 instances across these services, and up to 5 terabytes (TB) of storage. After the free 30 days are up, it shifts to the Always Free tier.

Scan the following QR code or use the link to get Oracle Cloud Always Free option:

https://www.oracle.com/cloud/free/

The registration is straightforward – a wizard will walk you through it. First, you must specify some parameters: a username, which defines the tenancy, and a password. Note that a credit card must be provided, but it will not be charged. This allows you to dynamically make your account a paid account to take advantage of the multiple features offered. It is also used to make sure that a real person is registering and not a bot.

If you are a student, ask your teachers and representatives to provision a cloud account for you. If the school is part of the Oracle Academy project, the whole registration process is simplified and significantly faster. Moreover, there is no requirement to provide a credit card at all. Oracle Academy (https://academy.oracle.com) is free for schools and universities, offering you many resources, learning materials, and other teaching resources.

Figure 1.1 – Oracle Cloud home screen

Figure 1.1 – Oracle Cloud home screen

Among that, Oracle offers OCI tutorials for free, such as LiveLabs, the OCI Architecture Center, or GitHub repositories:

LiveLabs

OCI Architecture Center

GitHub repositories

Figure 1.1 shows the home screen of the Oracle Cloud environment and highlights its main functionality. As you can see, multiple database types can be provisioned. In the next section, you will get an overview of ATP databases and analytical model covered by ADW.