Essentially Node has an approach of making I/O operations non-blocking. All the I/O operations run independently and generate an event when they are done. Node follows an execution model of having an event loop (a concept existing in JavaScript) that handles events that are generated by I/O operations ( like database, HTTP requests, file I/O … Continue reading Understanding node.js
Tag: Database
Tornado – SQLite
I received a couple of requests for Tornado's interaction with SQLite interface. So, here's the blog... SQLite is a file based and transactional database engine. Because of it's lightweight capabilities, SQLite's adoption has increased in the recent past. You can know more about it here. Below is an example of Tornado's interaction with SQLite DB. … Continue reading Tornado – SQLite
Tornado – Database MySQL Client Wrapper
Tornado provides a simple MySQL wrapper for performing database operations. Class tornado.databse.Connection acts as a wrapper over MySQLdb DB-API connection. Consider you have a MySQL installed on your system and you create a DB 'mydb' with table 'post' and records as below: mysql> use mydb Database changed mysql> create table post (Id int, Title char(50), … Continue reading Tornado – Database MySQL Client Wrapper
MongoDB: CRUD
With a bit of intro, lets get to some work with MongoDB. CRUD in programming terms often refers to, C: Create, R: Read, U: Update, D: Delete Operations. So how do we achieve them? Create MongoDB shell version: 1.2.2 url: test connecting to: test type "exit" to exit type "help" for help > use studDB … Continue reading MongoDB: CRUD