As far as I am concerned, I can only provide some guidelines, not the actual code.

First of all, the "data" database table should be extended with a third column, which should be declared as a unique key. As you recalled the StockList Demo, let's call it "stock_name".

Then your client page, in its extended form with two rows, should associate two item names to the two rows. In place of the "greetings" item name, you could use two stock names, for instance GOOG and MSFT.

You should then populate the table with data, using "GOOG" and "MSFT" as "stock_name" and setting suitable text in the "message" column.
You can even setup a process which changes the values in the "message" column over time.

Then the implementation of the Data Adapter should be extended in such a way that two possible threads can be spawned, depending on the item that is being subscribed to:



The two different threads will differ in the way they perform the query:


vs


Obviously, the above is the worst possible way in which you can generalize the code to two or more items,
but doing that in a better way is just a refactoring matter.