Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2002
    Posts
    37

    Where the text shall be stored? An article centered DB design question

    Hi, all,

    I commence a news web application. Articles will be submitted by various sources through the web. And there is a workflow process: editing, between the inital submission and final publication. I wonder where the articles shall be stored, in a DB table or in a file, during the various phases.

    Thanks for your input.

    V.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    in the database

    see
    http://technet.oracle.com/products/o...cms/cmsdb.html

    not for the specific technology, but for the general idea


    rudy
    http://r937.com/

  3. #3
    Join Date
    Oct 2002
    Posts
    37
    Hi, Rudy,

    Thanks for your informaiton.

    The page provides a very good information in regarding of the table design. There are some advantages of storing in DB over file system. Searchable is one although search index can be built outside of DB. I will employ JSF for this project. A web page layout information won't be stored in DB as what the article described. Only the model, but not view (in MVC) is in DB. I have some follow up questions:

    1) what is the advantage of using clob data type over varchar?
    2) the size of an article can vary. Some database have a limitation on the size of each row. When whole article is stored in one field, the size of row can exceed the limitation. Is it a problem. If yes, any good solution?
    3) A user may not read a whole article if it is long. A long article need to be divided into several pages. What will be a better approach to store articles: whole article or divided pages? If it is the second one, I shall use array of CLOB or a subtable?
    4) When a list of article is displayed, the first few sentences of each article may need to be displayed together with the title. Does I need one more field for the purpose?

    Thanks for your opinion.

    v.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    1) clob can hold larger contents, e.g. an entire book -- i would use varchar for most web-based content

    2) not a problem, so no "solution" is required -- exact design depends on which database you wish to use

    3) divided pages, because the point of division needs to be based on the content, not on something arbitrary like "after 2000 characters" where you'd end up breaking a sentence, or even a word -- you want to break where it makes sense

    4) substring


    rudy

  5. #5
    Join Date
    Oct 2002
    Posts
    37
    Originally posted by r937
    1) clob can hold larger contents, e.g. an entire book -- i would use varchar for most web-based content
    I will use varchar when. The PostgreSQL DB I plan to use doesn't support clob anyhow (but blob) currently. Since the data will be double byte unicode, twice size of space is needed.


    2) not a problem, so no "solution" is required -- exact design depends on which database you wish to use
    I may use SAP DB if the application can take off and have a ton of data since PostgreSQL doesn't scale well. SAP DB has the limitation as what I know.


    3) divided pages, because the point of division needs to be based on the content, not on something arbitrary like "after 2000 characters" where you'd end up breaking a sentence, or even a word -- you want to break where it makes sense
    So an article has one or more pages stored in DB. Usine array of varchar or another separated table to store the pages of content?



    4) substring


    rudy
    Thanks Rudy again for your help.

    v.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •