Is this a good way to use mysql?

I am creating a web application and I am thinking about how to create a database.

The application will load by keywords, then it will extract information for these keywords and save it in the database using datestamp. The information will be from different sources, for example, from the results of yahoo, diggs from the last month that this keyword contains, etc.

So, I thought that an easy way to do this is to have a table with a column of identifiers and keywords where the keywords will be stored, and another table for ALL data with an identifier (the same as the keyword), datestamp, data_name, data_content.

Is this a good way to use mysql or can it make queries slower or sometihng? Should I create tables for each type of data that I want to use? I am mostly looking for good in-app performance.

Another reason I would like to use only one table for data is that I can easily add more data names without touching db.

+4
source share
3 answers

The second table ie, a table that contains various keyword information, the id column in this table can be used as a foreign key for the column of the first column of the table

0
source

Is this a good way to use mysql or can it somehow make queries slower or sometihng? Should I build tables for each data type that I want to use? I am mainly looking for good application performance.

Many large MySQL players (like flickr ) use MySQL as a simple KV (key-value) storage.

In addition, if you are interested in performance, you should cache your data in memcached / redis (there is nothing that can ruin the memory).

0
source

I have one more recommendation: index your content. If you plan to store content and be able to search using keywords, use mysql to store information about your document, such as author, text, and some other information, and use Lucene to create the index. Lucene is originally for Java, but has ports in many languages, and PHP is no exception.

You can use the Zend framework to manage Lucene indexes, with minimal effort, view documentation or look for a tutorial online. The fact is that this recommendation is simple: - You will significantly improve the search time - The recognition of your keyword will be higher, Lucene will make it possible to search

Hope I can help! Good luck

0
source

All Articles