Powered by Blogger.

Saturday 27 April 2024

How to Develop code logic using Stream API Workflow

2 comments :
Let's begin by defining the term stream as it applies to the stream API:
A stream operates on a data source, such as an array or a collection. A stream, itself, never provides storage on a data. It simply moves data, possibly filtering, sorting, or otherwise operating on that data is the process. as a genral rule, however a stream operation by itself does not modyfy the data source. For Example: sorting a stream does not change the order of the source. Rather, sorting a stream results in the creation of a new stream that produces the sroted result.
A Simple Stream Example : Let's work through an example that uses streams. The following program creates an ArrayList called myList that holds a collection of integers. Next, it obtains a stream that uses myList as a source.


OUTPUT:


How To Retrieve Data Using FLASHBACK Command In Oracle.

1 comment :
This command undoes changes made by Oracle Database to the data files that exist when you run the command. FLASHBACK can fix logical failures, but not physical failures
FLASHBACK DATABASE is usually much faster than a RESTORE operation followed by point-in-time recovery because no data files are restored. The time needed to perform FLASHBACK DATABASE depends on the number of changes made to the database since the desired flashback time. On the other hand, the time needed to do a traditional point-in-time recovery from restored backups depends on the size of the database.
For Example :
FLASHBACK TABLE TABLENAME to TIMESTAMP(SYSDATE-1);  

Note: If Flashback is not working on SQL Tools/Oracle DataTable you can First run the command given below and then run the flashback command.

ALTER TABLE TABLENAME ENABLE ROW MOVEMENT; 

Wednesday 27 December 2023

Multiples DATABASE Connection and Data shifting Using Spring Boots API

No comments :
Multiple DataBase Connection and Data shifting using Spring boot API configuration Example.
Step-by-step Write Java files.
1. application.properties File for Add multiple DataBase Connection. 
2. DBConfigDBNAME.JAVA Files for multiple DataBase Connection. 
3. Job Scheduler.java file for Auto shift programm. 
4. Entity Beans, Repository, Services Implementations for Binding and shifting Data.
  1. Create Spring Boot Java (Microservices)
      Create Spring Boot Java (Microservices).
  1. Project Name: DataShiftingConfigSpringBoots
  2. Group: DataShifting-a143mk
  3. Artifactid: DataShifting-a143mk
  4. Description: DataBase Connection and Data shifting using Spring boot API.
  5. Package: DataShiftinga143mk
Select the technologies and library(Maven Dependency ) to be.
  1. spring-boot-configuration-processor
  2. ojdbc8

while creating the project pom.xml file and some maven dependency, main class is automatically created when web add any dependency like.

pom.xml


1. Configure application.properties


Create DataBase Configuration java Files :
DBConfigDATABASE1.java


DBConfigDATABASE2.java


DBConfigDATABASE3.java

Create Scheduler ClassCreate Scheduler for Auto run Program and import some Packages Scheduler.java as below:

Have you seen the previous post? You all know how to learn and create Entity Bean, Repository, Service Implementation in the project. If you don't know about it then go to the previous post and learn it.