Try: MongoDB Regular Expresssions

^ : starts with

$ : Ends with

.* : any char, any number of times

/i : case insensitive

Try the following Queries

•db.posts.find( { title: { $regex: /4$/ } } );

•db.posts.find( { category: { $regex: /^T.*/ } } );

• db.posts.find( { category: { $not: /^p.*/ } } );

•db.posts.find( { category: { $regex: /^ev/i } } );

•db.posts.find( { category: { $regex: /^ev/ } } );

•db.posts.find( { category: { $regex: /^Ev/ } } );

•db.posts.find( { category: { $regex: /^Ev.*t$/ } } );

•db.posts.find( { category: { $regex: /^Ev*t$/ } } );

Use Data from the Following URL:

https://www.w3schools.com/mongodb/mongodb_mongosh_insert.php

db.posts.insertMany([  
  {
    title: "Post Title 2",
    body: "Body of post.",
    category: "Event",
    likes: 2,
    tags: ["news", "events"],
    date: Date()
  },
  {
    title: "Post Title 3",
    body: "Body of post.",
    category: "Technology",
    likes: 3,
    tags: ["news", "events"],
    date: Date()
  },
  {
    title: "Post Title 4",
    body: "Body of post.",
    category: "Event",
    likes: 4,
    tags: ["news", "events"],
    date: Date()
  }
])

Oracle Auditing

To Know:

•WHAT IT IS?

•WHY WE NEED

•WHAT CAN WE AUDIT

•WHAT ORACLE AUDITS ON Its OWN

•WHERE AUDIT DATA ARE KEPT

•HOW TO SET CUSTOM AUDIT

•HOW TO SEE WHAT AUDITS ARE SET

•HOW TO SEE THE AUDIT TRAIL

Check:

https://docs.oracle.com/cd/E11882_01/server.112/e10575/tdpsg_auditing.htm#TDPSG50511

Activity: Using Audit Trail Views to Investigate Suspicious Activities

https://docs.oracle.com/cd/B19306_01/network.102/b14266/cfgaudit.htm#i1010026

Oracle pfile, spfile

Ref: https://www.devopsschool.com/blog/oracle-tutorials-what-is-pfile-and-spfile/

Oracle : Auditing Database Activity

7 Auditing Database Activity

This chapter contains:

Ref: https://docs.oracle.com/cd/E11882_01/server.112/e10575/tdpsg_auditing.htm#TDPSG50511

Connect to Sql Server FROM JAVA

https://learn.microsoft.com/en-us/sql/connect/jdbc/connection-url-sample?view=sql-server-ver16

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class ConnectURL {
    public static void main(String[] args) {

        // Create a variable for the connection string.
        String connectionUrl = "jdbc:sqlserver://<server>:<port>;encrypt=true;databaseName=AdventureWorks;user=<user>;password=<password>";

        try (Connection con = DriverManager.getConnection(connectionUrl); Statement stmt = con.createStatement();) {
            String SQL = "SELECT TOP 10 * FROM Person.Contact";
            ResultSet rs = stmt.executeQuery(SQL);

            // Iterate through the data in the result set and display it.
            while (rs.next()) {
                System.out.println(rs.getString("FirstName") + " " + rs.getString("LastName"));
            }
        }
        // Handle any errors that may have occurred.
        catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

jOOQ Eamples

For Java Platform:

Ref: https://www.jooq.org/

Oracle: Hierarchical Queries and Advanced Analytics Functions

•Hierarchical Queries

•START WITH

•CONNECT BY PRIOR

•CONNECT BY FOLLOWING

•ORDER by level

Analytics Functions

•Windowing

•PRECEDING, UNBOUNDED_PRECEDING

•ROWS BETWEEN Unbounded Preceding

•CURRENT ROW

•RANGE BETWEEN INTERVAL 30 DAY PRECEDING AND INTERVAL ‘30’ DAY Following

•ROWS BETWENN 1 PRECEDING and 1 FOLLOWING

Other Analytics Functions and Clauses:

•OVER()

•PARTITION OVER

•Over Partition By

•Avg () OVER Partition BY

•RANK()

•DENSE_RANK()

•DENSE_RANK FIRST

•DENSE_RANK LAST

•RANK or DENSE_RANK OVER

•KEEP

•Aggregate by keeping

••KEEP (DENSE_RANK FIRST ORDER BY …)

•KEEP (DENSE_RANK LAST ORDER BY …)

•RANK()

•RANK() OVER

•RANK() OVER PARTITION BY

•DENSE RANK() OVER

•DENSE RANK() OVER PARTITION BY

•PARTITION BY …. ORDER BY

•ROW_NUMBER() OVER (ORDER By …)

•ROWS BETWEEN Unbounded Preceding

•CURRENT ROW

•RANGE BETWEEN INTERVAL 30 DAY PRECEDING AND INTERVAL ‘30’ DAY Following

•ROWS BETWENN 1 PRECEDING and 1 FOLLOWING

oKEEP

–Aggregate by keeping

oDENSE_RANK()

oDENSE_RANK FIRST

oDENSE_RANK LAST

oOver()

oOver Partition By

–Avg () OVER Partition BY

oROW_NUMBER

oRANK()

oDENSE_RANK

oVariations

–RANK() OVER

–RANK() OVER PARTITION BY

–DENSE RANK() OVER

–DENSE RANK() OVER PARTITION BY

–PARTITION BY …. ORDER BY

–(Partition … order by)

PL/SQL Function Syntax in Oracle

REF: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/lnpls/CREATE-FUNCTION-statement.html

Stored Procedure in Oracle

Ref: https://docs.oracle.com/database/121/LNPLS/create_procedure.htm#LNPLS01373

What are some Data Integration Tools?

Tools for data integration, ETL (Extract, Transform, Load), and data management.

1. Apache NiFi

2. Pentaho Data Integration (PDI)

3. Apache Spark

4. Microsoft SQL Server Integration Services (SSIS)

5. Informatica PowerCenter

6. Apache Airflow

7. Matillion

8. Fivetran

9. Stitch

10. Apache Camel

11. Luigi

12. SnapLogic

13. DataStage (IBM)

Ref: Internet