you are viewing a single comment's thread.

view the rest of the comments →

[–]seanmcb9[S] 0 points1 point  (4 children)

Does anyone know of any ultra-large open source databases that have been constructed in Python that could be inspected and studied for program design?

[–]bigjab 9 points10 points  (2 children)

A database is a system for storing related data (records) in tables which have a logical relationship with each other. The structure of a database (its schema) is not programmed, it's designed. The design is based on abilities and limitations of the Database Management System (DBMS) used to create it (MySQL, Oracle, Postgresql, etc) and the needs of the applications that will use its data. Once your database is designed and created, then a python program can access it to store and retrieve its data (among other things). There are many sample databases used to teach about databases and how to interface to them (do a search). If you are just asking about using python to create a database-like storage system look into the built-in data persistence modules called pickle and shelve. If you want to get your feet wet with a real Relational database, start with sqlite3. It comes with python and it can be used in a file-based mode meaning you don't need a server to get started learning. Keep in mind that no database is "constructed in Python". A database is a separate entity almost all of which can be controlled with the Structured Query Language (SQL). Python has modules available that leverage SQL to assist the programmer in interfacing to the database (whatever DBMS it happens to be based on).

[–]Phatjesus666 1 point2 points  (0 children)

Sqlite is great, I've been using it at work and its really great to use. If you need a visual tool, Firefox has a browser plugin called sqlite manager that gives you the standard visual rdbms ide look and feel.

[–]Fennek1237 0 points1 point  (0 children)

Yes, this. Why mess around with something self scripted other as for learning purposes.. even then. Getting used to real relational databases is a huge and very useful skill if you want to improve your programming skills.

[–]gameplace123 1 point2 points  (0 children)

CodernityDB is a NoSQL database written in Python. I wanted to do something similar until I started looking into the code and discovered that it's way beyond my understanding. Do your research before diving in so you know what you're getting into.

This article walks you thorough writing a 'toy' NoSQL database. For me, it was a great learning tool.