using databases and sql ('kthanos' ('lecturetools' rows we can see that we have properly recorded that we have visited lhawthorn and opencontent also the accounts cnxorg and kthanos already have two followers since we now have retrieved the friends of three people (drchuckopencontentand lhawthornour table has rows of friends to retrieve each time we run the program and press enter it will pick the next unvisited account ( the next account will be steve_coppin)retrieve their friendsmark them as retrievedand for each of the friends of steve_coppin either add them to the end of the database or update their friend count if they are already in the database since the program' data is all stored on disk in databasethe spidering activity can be suspended and resumed as many times as you like with no loss of data basic data modeling the real power of relational database is when we create multiple tables and make links between those tables the act of deciding how to break up your application data into multiple tables and establishing the relationships between the tables is called data modeling the design document that shows the tables and their relationships is called data model data modeling is relatively sophisticated skill and we will only introduce the most basic concepts of relational data modeling in this section for more detail on data modeling you can start withlet' say for our twitter spider applicationinstead of just counting person' friendswe wanted to keep list of all of the incoming relationships so we could find list of everyone who is following particular account since everyone will potentially have many accounts that follow themwe cannot simply add single column to our twitter table so we create new table that keeps track of pairs of friends the following is simple way of making such tablecreate table pals (from_friend textto_friend texteach time we encounter person who drchuck is followingwe would insert row of the forminsert into pals (from_friend,to_friendvalues ('drchuck''lhawthorn'as we are processing the friends from the drchuck twitter feedwe will insert records with "drchuckas the first parameter so we will end up duplicating the string many times in the database