Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing the classes, functions, models and Connecting to Database #4

Closed
5 tasks
bjin02 opened this issue Dec 7, 2017 · 0 comments
Closed
5 tasks

Comments

@bjin02
Copy link
Owner

bjin02 commented Dec 7, 2017

  • Implement the Info, Post data class to model the data
    The class should include a repr method that can descripe the Post/Info data
    And a contains method to check if the Post data contains some words in Summary
  • Use this class definition for database models in your program
    Process the raw data to model the Post data into instances of the classes
  • Connect to the database and get Info and Post database tables data
    Set up Info and Post database tables in a database, and store the data instances in them.

Database table data with these columns in each:

Info

id
followed
likes
total_posts	title
url
ask_page_title
name

Post

id
date
summary
format
short_url
can_like
can_reply
type
info_id
  • Post table has the external key to the Info table. We can make JOIN query to these tables

  • Setup the DB connection code to Connect, Insert, Update and Query the tables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant