Q:

Simpler way to connect to a DB with NodeJS

Connecting to any DB with Java is very simple - I just need the appropriate JAR in the classpath. Alternatively, steps involved in installing any of the (example) Oracle drivers for NodeJS are very complicated (you need the windows sdk, visual studio, python 2.7, a whole bunch of environment variables). This leads me to think I'm missing something. Is there a simpler way to connect?

A:

1. Connecting a SQL Database:
There are node modules which will help you connect to DB. Lets consider mysql as of now:
npm install mysql

Consider the mysql module. Please have a look at the documentation. From the Docs itself:
var mysql      = require('mysql');
var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'me',
  password : 'secret'
});

connection.connect();

connection.query('SELECT 1 + 1 AS solution', function(err, rows, fields) {
  if (err) throw err;

  console.log('The solution is: ', rows[0].solution);
});

connection.end();

2.Connecting a NoSQL Database:
Node.js really works well with NoSQL databases. If you are considering MongoDB,
npm install mongodb

Then try:
// Retrieve
var MongoClient = require('mongodb').MongoClient;

// Connect to the db
MongoClient.connect("mongodb://localhost:27017/exampleDb", function(err, db) {
  if(err) { return console.dir(err); }

  db.collection('test', function(err, collection) {});

  db.collection('test', {w:1}, function(err, collection) {});

  db.createCollection('test', function(err, collection) {});

  db.createCollection('test', {w:1}, function(err, collection) {});

});

