Posts

Showing posts from May, 2017

Python on IBM i

Image
Python on IBM i has been around for many years now but only few are using it. In most banking application, using open source language is not allowed. So though we are able to run some basic programs on pyton/Node.js we do not get to install/use all the modules. ITjungle has many articles on iseriespython. I assume earler it had to installed but with V7R1 i assume it comes pre-installed. On IBM i, 5733-OPS placeholder for open source technologies contains python,Node.js. Thanks to Aaron Bartell, litmis spaces for providing the platform for learning. Litmis spaces is hosting IBM i on cloud and provides single tenant for free. You can also try out pub400.com which is a free server. Open the Qshell with QSH  from command line and to identify the location of python runtime type below command - $which python3 /QOpenSys/usr/bin/python3 Python3 does not reside here but a symbolic representation. The original location /QOpenSys/QIBM/ProdData/OPS/Python3.4/bin/python3. $python3 ...

MongoDB - How to insert document into collection

We had seen an example in the earlier post about inserting document to collections i.e. move keys & values to a variable and execute insert function e.g. db.customer.insert(x) In this post, we will see some additional examples and about Batch insert as well. db.customers.insert({"Name" : "ABC", age " 32}) A basic insert would add single document along with "_id" is listed below - > db.customers.find() Output : {         "_id" : ObjectId("591899d3768edf8898da8c46"),         "name" : "ABC",         "age" : 32,         "sex" : "male" } Suppose we need to multiple documents n the shell you can try the below script db.customer.insert ([{"Name" : "ABC","age": 32},{"Name" : "DEF","age":33},{"Name" : "GHI"}]) Output : > db.customer.find() { "_id" : ObjectId("59189ea47...

MongoDB

Database is place to store data but never thought we would have so many flavors. Though I'm no expert in DB, just to see so many ways to store and retrieve data is so fascinating. NoSQL has been around for many years now. MongoDB is NOSQL database. Its document based database not relational. Terms in MongoDB Database is database i.e. we can have many db. We will see more about this later. Collection is like a table. Document is like a row. All document will have " _id " generated which is unique within a collection Some shell commands - Show db -  This command will list all database use db     -  This command will place us in the mentioned database Show collections - This command will list all collections in database Assume we need to create customer database. Just type  use customerdb then we can create collections(tables) like customers,orders. E.g.            x   = { "name" : "ABC", ...

Nulpalakal - நூல் பல கல்

Nul pala kal (read many books) is a line from Aathichoodi written by Avvaiayar. Aathichoodi has 109 sacred lines written in Tamil alphabetical order. https://en.wikipedia.org/wiki/Aathichoodi This is my first blog. Planning to use this blog to share my thoughts about technical books, blogs that I read, also some random thoughts as well.