Can anyone tell me how I can go about getting crawled tweets into a database.I crawled the tweets using java. I stored it in a document. I am trying to use xampp to create a database, and store the tweets. I am kinda new to this, and i am trying to learn how to build my own web application. I am stuck here. Any he开发者_JAVA技巧lp would be greatly appreciated. Thanks.
I would look at setting up a mysql database and use JDBC to insert into the database programatically.
A helpful tutorial can be found here. I will outline the core steps below.
- Download and install MySQL on your server. You may also want to install it on your development machine for testing. Link.
- Download the JDBC connector jar. This is needed to connect to the MySQL database from within Java code. Link.
- Load the driver that lives in the JDBC connector jar. This is typically done using the
Class.forName(String)
method. - Create a connection in Java and use the Java/Sql interfaces to do what you want with the code. JavaDoc.
精彩评论