Note that there are some explanatory texts on larger screens.

plurals
  1. POCore data migrating from rdbms
    primarykey
    data
    text
    <p>I am trying to migrate from pure sqlite (with FMDB wrapper) to core data. </p> <p>My main reason is the icu problem (I have some multilingual projects - German, Spanish, Greek, Chinese) that are difficult to be searched from sqlite, as opposed with the icu built-in on core data. (NSDiacriticInsensitive | NSCaseInsensitive)</p> <p>Generally I have my data (a coded book) in the following structure:</p> <pre><code>id parentId content contentType nContent vieworder </code></pre> <p>where nContent is a diacriticinsensitive/caseinsensitive field that I need to ditch, since it slows my database very much (I have used indexes, I have used optimizations but I can't find anything to speedup the search process).</p> <p>I am baffled with the core data concept -- I can understand it on a master-detail project but I can't understand how to achieve a self referenced item object --</p> <p>A typical data stored with the above structure is this:</p> <pre><code> Chapter A Chapter A.1 Title 1 Content #1 Title 2 Content #2 Chapter A.2 [...] </code></pre> <p>Where "Chapter/Title/Content" is the content field (so it varies from a small >256 string to a large block of text).</p> <p>So my questions are: * How to achieve this structure in core data entity/class (I know that it will need the self-reference relationship) * How to find the items of each level (for example I would like to find all Title types -- that's why I have the contentType field) * Is indexing this on the core data structures will provide me with a better indexing and better time searching rates than normal sql (I use LIKE %% structures on the nContent field)? * Is it better to leave it on SQLITE and try finding a different indexing strategy?</p> <p>Please feel free to answer any of these questions or give me at least an insight.</p> <p><strong>UPDATE</strong> here is another more "realistic" example of what I mean:</p> <pre><code>Beginning HTML (Type: Chapter, parentid:0,id:1) The fundamental pieces (Type Chapter, parentid:1, id:2) How to begin (Type: title, parentid:2, id:3) [content] (Type: content, parentid:3, id:4) Using paragraphs (Type title, parentid:2, id:5) [content] (Type: content, parentid:5, id:6) Using Forms (Type: chapter, parentid:1, id:7) ... (and so on) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload