title: Understanding FTS3/FTS4: What are virtual tables and to search from it having a searchable non-virtual table?
body: <p>I am very confuse now having read the first part of the documentation on SQLite3's FTS3/FTS4. The reason why I am confuse is the example scattered all over the net which I believe doesn't cover all of the possible use cases and another reason is the current situation I am in. Having said that I have a table named Note which contains two attribute whose type are TEXT and other attributes which is very important for the entire app. </p>
  
  <p>It is a very simple table. I wanted to provide a Full Text search so I could search on both short note and long notes and that is when I encountered this FTS3/FTS4. You see, storing information as such is simple but I am having problem with the design especially whatever is going on under the hood of my application. Examples on the web, especially the SearchableDictionary example provided from the sdk directory, only shows the creation of virtual tables and virtually nothing more. This is not true and the case for me. I already have an existing table whose other attributes are very important to the application and I will never plan to store them as text on a virtual table! Nor have single virtual table whose types are all TEXT. I can reason to separate ShortNote and LongNote to a separate virtual table and conduct fts here via:</p>
  
  <pre><code>create virtual table virtual_note_table using fts3(_ID, ShortNote, LongNote);
  </code></pre>
  
  <p>I am not comfortable on this approach for some few reasons:</p>
  
  <ol>
  <li><p>If I do this, I will have to maintain two tables, a) the ordinary SQLite table which is easy to comprehend, b)the virtual table which I have limited knowledge of how it will work given my situation. </p></li>
  <li><p>What I am thinking is just a create a separate virtual table and fill it up when I am going to conduct search and drop the table when I am over. The source of the content will be coming from the table which I already have. But I am not sure if this is the best way to do things since I am worried about the space overhead.</p></li>
  <li><p>Lets assume I take the original thought I have before, that is to remove ShortNote and LongNote completely from note table and just maintain a reference. It seems this is not possible at all to join a virtual table to a non-virtual table. Its a terrible concept and I never saw any article or write up about this so maybe I just completely misunderstood FTS3/FTS4 virtual tables completely!</p></li>
  </ol>
  
  <p>I am totally lost and needed help regarding the design. I badly need the feature of completely searching through the data(ShortNote and LongNote). I am thinking my best shot is #2.</p>
  
  <p>I would appreciate any advice.</p>