7

I don't quite understand the difference between these three and I see SQLite and PostgreSQL within the SQLAlchemy - so are they a part of SQLAlchemy. Please clarify the differences and the relationships that these database systems may or may not share.

Also, I'm building my app on Heroku - does Heroku support all three of them?

Matt Seymour
  • 8,880
  • 7
  • 60
  • 101
Rohit Rayudu
  • 3,765
  • 6
  • 21
  • 21
  • I tried reading the documentation on SQLAlchemy's website - but I didn't understand the differences. – Rohit Rayudu Dec 06 '12 at 16:35
  • 3
    PostgreSQL and SQLite are different types of databases. In a nutshell, SQLAlchemy is a Python toolkit that allows you to interact with databases as though they are a collection of objects (instead of using SQL). See: http://en.wikipedia.org/wiki/SQLAlchemy – Shawn Chin Dec 06 '12 at 16:45
  • 2
    Ok so SQLAlchemy is like a tool you use in order to use Postgres or SQLite, right? Ok thanks for the clarification. – Rohit Rayudu Dec 06 '12 at 16:50
  • 2
    Yes, it is one of the ways in which you can interact with databases. – Shawn Chin Dec 06 '12 at 17:08

1 Answers1

15

PostgreSQL and SQLite are two relation databases, SQLAlchemy is an ORM which gives you a set of tools for accessing the data in the database.

SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.

It provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language.

So basically SQLAlchemy gives you the tools to access SQL databases such as PostgreSQL and SQLite Mysql etc, and query them in a pythonic way.

There is this good link on the internet to find out the difference between PostgreSQL and SQLite.

Install PostgreSQL first; then to get started i would look at the tutorials on the SQLAlchemy website, which explains all the terminology you will need to get started. SQLAlchemy tutorials

These explain simply how to connect to a database, setup SQLAlchemy and how everything pieces together.

It also teaches you how to create tables, using the alchemy code, and how to query datasets.

Matt Seymour
  • 8,880
  • 7
  • 60
  • 101
  • Can you please explain their relationship with SQLAlchemy though - this doesn't answer the question. I obviously googled it - but I didn't understand it - I am new to this whole web app world. – Rohit Rayudu Dec 06 '12 at 16:37
  • 1
    I still don't get it - please don't make fun of me. Help me out. Please. I already read that on the website - so copying and pasting won't help. – Rohit Rayudu Dec 06 '12 at 16:39
  • So do I first download SQLAlchemy in order to run Postgres/SQLite or do I run Postgres/SQLite on its own – Rohit Rayudu Dec 06 '12 at 16:40
  • 1
    @RohitRayudu You run Postgres/SQLite on their own. These allow you to create databases to store your datasets. Then, when you want to interact with the databases, you can rely on something like SQLAlchemy as they provide an ORM so you can access databases in a pythonic manner. – umop apisdn May 27 '20 at 07:29