I am coming from a novice database programmer background, mainly using MS Access for simple database applications with forms. I am in process of migrating to Xcode and need some assistance in how to populate and update my datasource which I planned to use one big array for.

I have all my raw data from sqlite loaded into Objects: Category, Subject, Quote, Quote_Map

Category
--------- 
category_id 
category_name

subject
--------
subject_id
subject_name
category_name

quote
--------
quote_id
quote_excerpt

quote_map
----------
quote_map_id
quote_id
subject_id

I have objects for each of these tables now. Now I want to make a master data source object that has all the the following:

category_data
----------
category_title
subjects (array)

then within the category_subjects array I want:

subjects
----------
subject_id
subject_title
category_title
quotes (array)

The quotes are obviously just those that map to subjects from the quote_map table.

Before I get totally down a wrong direction I wanted to ask for some guidance on what the best way to go about this task is.

I am trying to end up with one data source that I can use for a drill down app with four views, category, then the subjects of that category, then the quotes of that subject, then the specific quote selected.

Any direction would be greatly appreciated.

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top