Orientation, Setup, Brief Introduction to DBMS
This module will help you get setup with the tools used in the course. This includes creating your CCIS ID, using the Piazza email service for course communications, becoming familiar with the CCIS GitHub repository for managing code for your assignments and exams, and installing and configuring the Eclipse integrated development environment (IDE).
Next, this module provides a gentle introduction to database management systems, their history, and the two types of systems that we will study: Relational Database Management Systems (RDBMS) and Non-Relational or NoSQL databases (sometimes also refered to as document-oriented" database systems).
Finally, we will install and configure the Eclipse integrated development environment (IDE) that will help us create, debug, document, and test database programs we create in this class. Two other tabs below also describe the installation of two database management systems we will be working with during the semester. You may install these as needed, since we will begin with a RDBMS that is a part of the core Java release.
- Create your CCIS account and know your CCIS login.
- Login to your CCIS GitHub account using your CCIS login.
- Create an empty repository in your CCIS GitHub account.
- Register with the Course's Piazza forum.
- Install and configure the Eclipse IDE for Java and plugins.
- CCIS Account
- Piazza
- CCIS GitHub
- Eclipse IDE
- Derby RDBMS
- MariaDB RDBMS
- MongoDB NoSQL Database
- Node.js
- Lecture 1
For the purposes of this class you will need to have a valid CCIS account. Please visit CCIS Account Creation and follow the instructions there in order to create your CCIS account.
Your CCIS account will provide you access to all student-available CCIS resources. See the CCIS Howto pages for information on how to access your CCIS email, create personal web pages, and the other resources available to you from the department.
We will be using Piazza for all email communication and online discussion. Everyone on the class roster has already been registered using the preferred email address you provided when you regitered. If you have not already done so, please respond to the confirmation email to join the class Piazza group. The instructors and TA will use this group to send you information about the course throughout the semester. If you did not receive an invitation, please contact an instrctor or TA as soon as possible.
We will be using the NEU CCIS department's GitHub repository server throughout the course to distribute programming examples, submit homework assignments and exam solutions, and keep track of your work.
When you created your CCIS account, you also received an acccount on the CCIS GitHub server. Use your CCIS login and password to access the CCIS GitHub Server.
You can interact with the GitHub server through its web-based user interface, you can download a GitHub Desktop client that enables you to manage your repositories locally. The client is availble for Windows, MacOS here.
We will cover the basic of using GitHub and the GitHub desktop in class. There are also a number of online tutorials about using GitHub, including:
- GitHub Hellow World from GitHub.
- Mastering GitHub from Code School (free account registration required).
Database Management Systems
An introduction to database management systems.
Class presentation
Additional readings
- Database from Wikipedia (last accessed 2017-09-01).
- Relational Database from Wikipedia (last accessed 2017-09-01).
- NoSQL Database from Wikipedia (last accessed 2017-09-01).
We will use the Eclipse Integrated Development Environment (IDE) to write, test, and debug database applications in Java for the class.
Java
You will need to install the latest version of Java 8 for this class. To install Java 8, go to the installation page to select the correct version for your computer and operating system
Eclipse
Eclipse is open source software produced and maintained by the Eclipse Foundation. This IDE is used by many software professionals, so gaining experience using it will be valuable to you in future employment.
You can install either of these versions:
If you have a recent version of Eclipse already installed, you can probably use that, or you can install the latest version of Eclipse. You can also update the Java Developers edition to the Java EE Developers edition through the Java EE Developer Tools webpage.Data Tools Platform
If you installed the standard Eclipse IDE for Database Developers, you will also need to install the Data Tools Platform (DTP) using the Eclipse Update Manager. DTP is pre-installed with the Java EE Developers version.
Under the Help menu, select "Install New Software". In the "Work with" field, select "All Available Sites". In the list of available software, select the "Database Development" checkbox, then select Next. After reviewing the two items to be installed, select Next again, then accept the Eclipse Foundataion software license agreement and select Finish.
JUnit Unit Test Framework
We will use the JUnit unit test framework to test the Java database programs we write in class. You will need to download and install the JUnit JAR file, and configure Eclipse project to use JUnit.
- Downloading and installing JUnit
- Using JUnit within Eclipse from TutorialsPoint
Apache Derby
For our initial work with relational databases, we will be using Apache Derby. Derby is a relational database management system (RDBMS) developed by the Apache Software Foundation that can be embedded in Java programs and used for online transaction processing.
The core of the technology, Derby's database engine, is a full-functioned relational embedded database-engine, supporting JDBC and SQL as programming APIs. It uses IBM DB2 SQL syntax. Derby can also be accessed using a network server that allows clients to connect over TCP/IP using standard DRDA protocol. This allows an embedded database to be configured to act as a hybrid server/ embedded RDBMS. Derby also provides tools like ij, which allows SQL scripts to be executed against any JDBC database.
To download Derby, go to the Apache Derby Downloads page, and select the version for Java 8 and higher. Select either the binary or library distribution. The binary distribution includes documentation, javadoc, and jar files, while the library distribution includes only the jar files.
- Apache Derby on Wikipedia.
- Derby at the Apache Software Foundation.
- Derby Tutorial
MariaDB
For later work with relational databases, we will be using MariaDB Server. MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation. MariaDB intends to maintain high compatibility with MySQL, ensuring a "drop-in" replacement capability with library binary equivalency and exact matching with MySQL APIs and commands.
To install MariaDB, go to MariaDB Server page. On the right side of the page is a form for selecting the version of MariaDB for your operating system.
On MacOS, MariaDB can also be installed and started using the Homebrew package manager. If you do not have Homebrew installed, go the the Homebrew page for instruction on installing it. There is a link to an article for installing MariaDB from Homebrew below the form on the MariaDB Server page.
You will also need the MariaDB Java Connector. On the right side of the Connectors page is a form for downloading this connector.
- MariaDB on Wikipedia.
- MariaDB at the MariaDB Foundation.
- MariaDB Tutorial from TutorialsPoint
- MariaDB Tutorial from MariaDB Foundation
MongoDB
For our work with non-relational (NoSQL) databases, we will be using MongoDB. MongoDB (from humongous) is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. MongoDB is developed by MongoDB Inc., and is published under a combination of the GNU Affero General Public License and the Apache License.
MongoDB ins available for installation on Linux, MacOS and Windows. Select the MongoDB Community Edition installation instructions for your computer on the Install MongoDB Community Edition page.
On MacOS, MongoDB can also be installed and started using the Homebrew package manager. If you do not have Homebrew installed, go the the Homebrew page for instruction on installing it. To have launchd start mongodb now and restart at login: brew services start mongodb. if you don't want/need a background service just run: mongod --config /usr/local/etc/mongod.conf.
You will also need a matching MongoDB Java Connector. You can download a version of the connector from the Maven repository's mongo-java-driver page. If you are using the latest production version of MongoDB (4.0.3), select 3.10.2 to go the driver page page, then select "View All" under Files. Download the files "mongodb-driver-3.10.2.jar", "mongodb-driver-3.10.2-javadoc.jar", and "mongodb-driver-3.10.2-sources.jar". Add "mongodb-driver-3.10.2.jar" as an external JAR, and associae the other two as the source files and the JavaDoc files attributes of this file. This will enable you to see the JavaDoc as tool tips and jump to the source file if you need to refer to it.
Finally, there are several user interfaces available for access and devlopment. The Mongo Shell that comes with MongoDB is a JavaScript shell that provides full access through calls to MongoDB JavasScript functions. There are also several GUI tools. Mongo Compass, available for download from the Mongo website is an officially supported GUI for Visually exploring data and run ad hoc queries. It is available on Linux, Mac, or Windows. MonjaDB is a GUI tool for Eclipse for rapid application development that is available from within the Eclipse Marketplace.
- MongoDB on Wikipedia.
- MongoDB at MongoDB.com.
- MongoDB Java Tutorial on TutorialsPoint
- MongoDB v3.4 Java API
- MongoDB v3.4 Manual
Node.js
Node.js is an event driven JavaScript runtime designed to build scalable network applications. It is a popular platform technology for creating web applications. We will use Node.js to access MongoDB's JavaScript APIs.
Installing Node.js
NodeJS in available for installation on Linux, MacOS and Windows. See the installation information on the Node.js website.
Node.js Support in Eclipse
You can add support for Node.js in Eclipse by installing Nodeclipse.github.io 1.0.2 from within the Eclipse marketplace. This provides very basic support for Node.js projects.
To create a new Node.js project in Eclipse, use the New->Project... and select Node.js under the Node category. Once you create a Node.js project, you will need to manually initialize it from a command shell by going into the project directory and running the command
npm init --yes
This will create a "package.json" file and a "node_modules" directory with the Node.js configuration information and required modules. You will also need to install support for mongodb in the project by executing the command
npm install mongodb --save
Node.js Support in IntelliJ IDEA Ultimate
You can add support for Node.js in IntelliJ IDEA Ultimate by installing the NodeJS plugin. Note that the plugin is not available in the Community Edition. See the NodeJS plugin page on the JetBrains website for details.
To create a new Node.js project in IntelliJ IDEA, use the New->Project... and select Node.js and NPM. This will also create a "packages.json" file and a "node_modules" directory with the Node.js configuration information and required modules. You will need to manually install support for mongodb by going into the project directory and executing the command
npm install mongodb --save
The IntelliJ IDEA Node.js plugin also supports debugging Node.js applications, including setting break points and viewing variables.
- Intalling Node.js via package manager on nodejs.org.
- Node.js MongoDB Driver API on nodejs.org.
- Node.js Tutorial on w3schools.com.
- npm Documentation on docs.npmjs.com.
- MongoDB for Node on developer.ibm.com.