[eluser]Herb[/eluser]
Sorry if the title of this post is too vague or ambiguous; but, I just couldn't find a better way to describe what I'm after. I am after some suggestions on the best way to handle my situation. Please consider that I am a fledgling with both php and CI.
Let me lay some ground work for my question:
I am attempting to create a story section of a website. A story can consist of one or more pages|parts|chapters etc. and I wish to have uri's that includes the title rather than the id.
I have seen this handled via Expression Engine by creating a single entry with tag(s) inserted into the content that indicate the break point of a page. Furthermore, inside this tag you can pass addition parameters such as page title. I don't like relying on the individual entering the story to insert this metadata into the story.
I have two options that I can see; but, perhaps there are more. This brings us to the purpose of this post:
I am seeking advice on what would be my best course of action.
Option 1:
Make a table that is story titles which would contain the title, url_title, and any data that is about the story as a whole, irregardless of whether it is one or more pages.
Make a table that is story content which would contain the intro, body, and any data that is about the page|part|chapter. This table would have a foreign key pointing to the title of the story as a whole.
I would, of course build the interface that would allow the creation, editing, deletion, etc. of the story; but that issue is out of the scope of this post.
Option 2:
Make a single table that contains all information about the story. And through programming insert the necessary tag(s) into the post. Essentially hiding all this from the story author and of course the world when displaying the story.
Once again, I would build the interface to handle creation, edititng, deletion, etc. of the story.
Hopefully, I have provided enough information to have you provide some meaningful discussion and suggest an option that would be best in this case.