Skip to main content

Posts

Showing posts from December, 2017

How to Install and Configure MongoDB on Ubuntu 16.04

What we will do in this tutorial: Install MongoDB Configure MongoDB Conclusion What we will do in this tutorial: Install MongoDB Configure MongoDB Conclusion Install MongoDB on Ubuntu 16.04 Step 1 - Importing the Public Key GPG keys of the software distributor are required by the Ubuntu package manager apt (Advanced Package Tool) to ensure package consistency and authenticity. Run this command to import MongoDB keys to your server. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 Step 2 - Create source list file MongoDB Create a MongoDB list file in /etc/apt/sources.list.d/  with this command: echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list Step 3 - Update the repository update the repository with the apt command: sudo apt-get update Step 4 - Install MongoDB Now you can install MongoDB by typing this com...

Why do we need Unicode?

In the early days, all that existed was ASCII. This was okay, as all that would ever be needed were a few control characters, punctuation, numbers and letters like the ones in this sentence. Unfortunately, today's strange world of global intercommunication and social media was not foreseen, and it is not too unusual to see English in the same document  But for argument's sake, lets say Joe Average is a software developer. He insists that he will only ever need English, and as such only wants to use ASCII. This might be fine for Joe the user , but this is not fine for Joe the software developer . Approximately half the world uses non-Latin characters and using ASCII is arguably inconsiderate to these people, and on top of that, he is closing off his software to a large and growing economy. Therefore, an encompassing character set including all languages is needed. Thus came Unicode. It assigns every character a unique number called a code point . One advantag...

Node.js - Introduction to Node.js

Introduction to Node.js The modern web application has really come a long way over the years with the introduction of many popular frameworks such as bootstrap, Angular JS, etc. All of these frameworks are based on the popular JavaScript framework. But when it came to developing server based applications there was just kind of a void, and this is where Node.js came into the picture. Node.js is also based on the JavaScript framework, but it is used for developing server-based applications. While going through the entire tutorial, we will look into Node.js in detail and how we can use it to develop server based applications. What is Node.js? Node.js is an open-source, cross-platform runtime environment used for development of server-side web applications. Node.js applications are written in JavaScript and can be run on a wide variety of operating systems. Node.js is based on an event-driven architecture and a non-blocking Input/Output API that is designed to optimize an appli...

Normalization in DBMS: 1NF, 2NF, 3NF and BCNF in Database

Normalization is a process of organizing the data in database to avoid data redundancy, insertion anomaly, update anomaly & deletion anomaly. Let’s discuss about anomalies first then we will discuss normal forms with examples. Anomalies in DBMS There are three types of anomalies that occur when the database is not normalized. These are – Insertion, update and deletion anomaly. Let’s take an example to understand this. Example : Suppose a manufacturing company stores the employee details in a table named employee that has four attributes: emp_id for storing employee’s id, emp_name for storing employee’s name, emp_address for storing employee’s address and emp_dept for storing the department details in which the employee works. At some point of time the table looks like this: emp_id emp_name emp_address emp_dept 101 Rick Delhi D001 101 Rick Delhi D002 123 Maggie Agra D890 166 Glenn Chennai D900 166 Glenn Chennai D004 The above table ...

How does database indexing work?

Why is it needed? When data is stored on disk based storage devices, it is stored as blocks of data. These blocks are accessed in their entirety, making them the atomic disk access operation. Disk blocks are structured in much the same way as linked lists; both contain a section for data, a pointer to the location of the next node (or block), and both need not be stored contiguously. Due to the fact that a number of records can only be sorted on one field, we can state that searching on a field that isn’t sorted requires a Linear Search which requires N/2 block accesses (on average), where N is the number of blocks that the table spans. If that field is a non-key field (i.e. doesn’t contain unique entries) then the entire table space must be searched at N block accesses. Whereas with a sorted field, a Binary Search may be used, this has log2 N block accesses. Also since the data is sorted given a non-key field, the rest of the table doesn’t need to be searched for duplica...

10 Best Budget Smartphones Of 2017 That You can Buy Around 15,000!

2017 was a big year for smartphones, so many new phones released this year, a lot of them were a good hit. But some managed to create impact for a longer time while some mobiles only trended for a few days and later got vanished away with the time. So here by the end of 2017, if we look at the best smartphones of 2017, here are the best 10 of this year. 1. Motorola G5S Plus Price: 15,999 Why: 4GB RAM, 64GB ROM, 13MP+13MP Dual Real Camera, 8MP Front Camera With Flash, Fingerprint Reader, 3000mAh Battery with Turbo Charger. 2. Mi A1 Price: 13,999 Why: 4GB RAM, 64GB ROM, 12MP+12MP Duel Rear Camera, Android One Smartphone with confirmed upgrades to Android Oreo and Android P. 3. Mi Max 2 Price: 15,999 Why: 6.44 inch Display, 4GB RAM, 64GB ROM, Android 7.1.1 with MiUi 8, Snapdragon 625 Octa Core 2 Ghz Processor. 4. Nokia 6 Price: 14,999 Why: 16MP PDAF Rear Camera, 8MP AF Front Camera, Android Nougat 7.1.1, Fingerprint scanner, 3GB RAM, 32GB ROM. ...