Relational and non-relational databases

From Gridkaschool
Revision as of 14:10, 27 August 2013 by Mlassnig (talk | contribs)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

import sqlite3 import MySQLdb import psycopg2


s_con = sqlite3.connect(database='/home/username/student.db')

m_con = MySQLdb.connect(host='localhost', user='student', passwd='student', db='student', )

p_con = psycopg2.connect('host=localhost user=student password=student dbname=student')

s_con.close() m_con.close() p_con.close()


CREATE TABLE test_table (id integer, name varchar(255));


Hosts:

ssh <username>@<host>.scc.kit.edu -p24

  • gks-148
  • gks-149
  • gks-150
  • gks-151
  • gks-152
  • gks-153
  • gks-154
  • gks-155
  • gks-156
  • gks-157
  • gks-158
  • gks-159
  • gks-160
  • gks-161
  • gks-162
  • gks-163
  • gks-164
  • gks-165
  • gks-166
  • gks-167
  • gks-168
  • gks-169
  • gks-170
  • gks-171
  • gks-172
  • gks-173
  • gks-174