Tuesday, February 26, 2013

WHAT DOES SOAP,XML,JSON

JSON is a standard to represent human-readable data. It merely represents data, nothing more.
SOAP is a protocol specification for transmiting information and calling web services, and uses XML to encode it. SOAP works over HTTP (amogst other network protocols).
XML-RPC is another protocol, used for transmiting information and calling remote procedures. It doesn't run over HTTP, but is rather a different protocol, different port, etc.
So the main difference between SOAP and XML-RPC that the former wraps inside HTTP, while the latter does not. JSON is something completely different.

Monday, February 25, 2013

mysql full text search example

Blind query expansion (also known as automatic relevance feedback) is enabled by adding WITH QUERY EXPANSION following the search phrase. It works by performing the search twice, where the search phrase for the second search is the original search phrase concatenated with the few most highly relevant documents from the first search. Thus, if one of these documents contains the word databases and the word MySQL, the second search finds the documents that contain the word MySQL even if they do not contain the word database. The following example shows this difference:
mysql> SELECT * FROM articles
    -> WHERE MATCH (title,body) AGAINST ('database');
+----+-------------------+------------------------------------------+
| id | title             | body                                     |
+----+-------------------+------------------------------------------+
|  5 | MySQL vs. YourSQL | In the following database comparison ... |
|  1 | MySQL Tutorial    | DBMS stands for DataBase ...             |
+----+-------------------+------------------------------------------+
2 rows in set (0.00 sec)

mysql> SELECT * FROM articles
    -> WHERE MATCH (title,body)
    -> AGAINST ('database' WITH QUERY EXPANSION);
+----+-------------------+------------------------------------------+
| id | title             | body                                     |
+----+-------------------+------------------------------------------+
|  1 | MySQL Tutorial    | DBMS stands for DataBase ...             |
|  5 | MySQL vs. YourSQL | In the following database comparison ... |
|  3 | Optimizing MySQL  | In this tutorial we will show ...        |