Tuesday, April 12, 2016

Models in Django to create tables

How to connect Mysql database to Django

manged to install mysql database in ubuntu and created some tables using Models in Django.

Below online book is really helpful to master Django- http://www.djangobook.com/en/2.0/chapter05.html

models.py:




Mysql:

Friday, April 8, 2016

Apache Spark installed in Ubuntu

I am not sure much uses of Apache Spark. But thought of installing and play around .
https://www.mapr.com/blog/game-changing-real-time-use-cases-apache-spark-on-hadoop

Successfully installed Apachespark in Ubuntu using the below blog instructions.
http://blog.prabeeshk.com/blog/2014/10/31/install-apache-spark-on-ubuntu-14-dot-04/



This is the beauty of Open Source softwares, you can install it and play around it ..and contribute for the project.

For more details - http://spark.apache.org/

examples - http://spark.apache.org/examples.html

Tuesday, April 5, 2016

sqllite3 commands in Ubuntu Shell

How to install and use Sqllite3 in Ubuntu: 

Its quite easy to install sqllite3 in Ubuntu using 'apt-get install sqlite3'

naveen@naveen-Inspiron-7352:~/mysite$ sqlite3 mydb
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq  name             file                                                     
---  ---------------  ----------------------------------------------------------
0    main             /home/naveen/mysite/mydb                                 
sqlite> exit
   ...> exit()
   ...> create table employee(id integer,name TEXT );
Error: near "exit": syntax error
sqlite> create table employee(id integer,name TEXT );
sqlite> insert into employee(1,'naveen');
Error: near "1": syntax error
sqlite> insert into employee values (1,'naveen');
sqlite> ;
sqlite> select * from employee
   ...> ;
1|naveen
sqlite> .exit