Quantcast
Channel: DigitalOcean Community Tutorials
Browsing all 136 articles
Browse latest View live

JDBC Batch Processing Example Tutorial with Insert Statements

Sometimes we need to run bulk queries of similar kind for a database, for example loading data from CSV files to relational database tables. As we know that we have option to use Statement or...

View Article



JDBC CallableStatement Stored Procedure IN, OUT, Oracle Struct, Cursor...

Stored Procedures are group of statements that we compile in the database for some task. Stored procedures are beneficial when we are dealing with multiple tables with complex scenario and rather than...

View Article

JDBC DataSource Example – Oracle, MySQL and Apache DBCP Tutorial

We have already seen that JDBC DriverManager can be used to get relational database connections. But when it comes to actual programming, we want more than just connections. Most of the times we are...

View Article

Tomcat DataSource JNDI Example for Servlet Web Application

We looked at the JDBC DataSource in the last tutorial and learned how to use that in standalone java application. Actual benefit of DataSource comes when we use it with a JNDI Context such as using...

View Article

JDBC PreparedStatement IN clause alternative approaches

If you are using JDBC API to run queries on database, you should know that PreparedStatement is the better choice than Statement. However since JDBC API allows only one literal for one “?” parameter,...

View Article


JDBC Interview Questions and Answers

JDBC API is used to connect to relational databases and run SQL queries from Java Programs. In last few articles, we learned about JDBC API and it’s important features. This article is aimed to provide...

View Article

JDBC Tutorial with Example Projects, DataSource, JNDI and Spring Integration

Java DataBase Connectivity (JDBC) is one of the most widely used API in enterprise applications, because most of the applications use some sort of database connectivity. I have recently posted a lot of...

View Article

How to install MongoDB on Unix/Linux Systems

Sometimes back I wrote a post on how to install MongoDB on Mac OS X, but most of the development usually happens on Unix/Linux machines. So today we will look how to install MongoDB on a unix/linux...

View Article


MongoDB Java CRUD Example Tutorial

Earlier we looked how to install MongoDB in Unix machines and executed some commands from terminal. Today we will look into the MongoDB Java Driver features and how to perform common operations with...

View Article


MongoDB Java Servlet Web Application Example Tutorial

Earlier in MongoDB Java Example we learned how to use MongoDB java driver in standalone application. Today we are moving forward to integrate MongoDB in Java Servlet web application. We will create a...

View Article

Spring Data MongoDB Example Tutorial

Spring Data MongoDB is one of the Spring projects for integrating Spring Framework with most widely used NoSQL database MongoDB. One of the key benefit of using Spring is that it provides integration...

View Article

MongoDB insert example using Mongo Shell and Java Driver

Mongo Client can be used to insert a document into a collection and we can also insert an array of documents, today we will look into various operations related to MongoDB insert. For these examples, I...

View Article

Primefaces Spring EclipseLink NoSQL with MongoDB & Oracle NoSQL DB

We’ve explored how can we achieve integration between EclipseLink JPA and a well-known Relational Database like MySQL. EclipseLink provides you more than integrating with Relational Databases...

View Article


MongoDB update document, set, subdocument example using Mongo Shell and Java...

In last tutorial, we learned different options with MongoDB insert with Mongo Shell and Java driver, today we will look into Mongo update and different options provided by Mongo Shell and Java driver....

View Article

MongoDB findOne() Example using Mongo Shell and Java Driver

The findOne() method returns only one document that satisfies the criteria entered. If the criteria entered matches for more than one document, the method returns only one document according to natural...

View Article


MongoDB findAndModify() examples using Mongo Shell and Java Driver

MongoDB findAndModify() method modifies and returns a single document based upon the selection criteria entered. The returned document does not show the updated content by default. If the records...

View Article

MongoDB sort example using Mongo Shell and Java Driver

MongoDB sort method sorts the document in either ascending or descending order as specified by the user in the input argument. The syntax for sort method is sort order can take the following values 1:...

View Article


MongoDB Batch/Bulk Insert Example using Mongo Shell and Java Driver

Multiple documents can be inserted at a time in MongoDB using bulk insert operation where an array of documents is passed to the insert method as parameter. MongoDB performs ordered insert by default....

View Article

MongoDB exists example using Mongo Shell and Java Driver

This checks the document for the existence of the fields in the specified collection. The syntax is The operator accepts the boolean values of either true or false. If the boolean value is set to true,...

View Article

MongoDB distinct example using Mongo Shell and Java Driver

The distinct method returns a set of discrete values for the field specified as the input argument. This method returns an array of discrete values. The syntax for distinct method is field: A string...

View Article
Browsing all 136 articles
Browse latest View live




Latest Images