Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

python and database

942 views

Published on

This slides shows relationship between python and databases. but this is very short story. not all that python and databases, just part of them. Use your own risk.

Published in: Internet
  • Be the first to like this

python and database

  1. 1. Python and Database Django Girls Seoul August Seminar Kwangyoun Jung (initialkommit@gmail.com)
  2. 2. Big Picture
  3. 3. Where is Database? http://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_web_01.pdf
  4. 4. How can they communicate? Request Response DatabaseUser Application .
  5. 5. Database Management System(DBMS) Request(SQL) Response(Data) Database User Application . DBMS (MySQL, postgreSQL, etc)
  6. 6. Structured Query Language I want to select data from the table in the db Dataset User Application . Database DBMS (MySQL, postgreSQL, etc)
  7. 7. Your Own Role I want to select data from the table in the db Dataset Database DBMS (MySQL, postgreSQL, etc) Application Developer User Application . Database Architecturer Database Administrator Database Developer
  8. 8. DjangoORM
  9. 9. ORM
  10. 10. DjangoORM Django Database Person id name age location gender Object Model Class DjangoORM
  11. 11. Flask has no ORM Flask Database Person id name age location gender Object Model Class SQLAlchemy
  12. 12. MySQL and python DB API(pymysql)
  13. 13. pymysql Installation pip install pymysql
  14. 14. MySQL Installation brew install mysql # Path Setting and inserting into .bash_profile export MYSQL_PATH=/usr/local/Cellar/mysql/5.7.14 export PATH=$PATH:$MYSQL_PATH/bin
  15. 15. MySQL Start Start: mysql.server start Connection by root user: mysql -u root Creating Database: Create database djangogirls Exit: exit
  16. 16. Connecting MySQL using Client Tool Tool that helps to manage dadabases iike Toad, Sequel Pro, DataGrip etc. But tool for today is PyCharm!
  17. 17. CRUD Practice C: Create R: Read U: Update D: Delete

×