简体   繁体   中英

shifting database in python-django

I am a python-django beginner.

I started making a project with PostgreSQL, but find it difficult to set the configurations and dependencies. Is it possible that I make my whole project in sqLite and then shift to PostgreSQL?

Or I'll have to decide a specific database from the beginning?

Despite the fact that it is very easy to set up, I would not recommend to start using sqlite if your choice would eventually fall into postgreSQL .

Django ORM tries to "hide" the differences between the database management systems, but it is impossible to be good for everyone:

Django attempts to support as many features as possible on all database backends. However, not all database backends are alike, and we've had to make design decisions on which features to support and which assumptions we can make safely.

sqlite has a fair number of limitations, "special" handling and "corner" cases, see:

Note, that if you would not follow the advice - at least, use the latest sqlite version, prepare a bunch of tests and aim to a high test coverage - this would help to decrease the "headache" on the switching the database backend step.

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM