Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Posts
    2

    Cool Unanswered: Extensive text to be saved, what is best method?

    Hi, I'm new at db stuff and I'm not sure what the best method is.

    I am setting up a news website feature for college alumni to submit news about themself. The fields will be last name, first name, year graduated, location, and news text.

    The text copy could get quite extensive, should I save the text copy in the database or should it be saved in an external text file? The database would then reference the text file when that specific alumni news is requested.

    What is the best way? Is there a better method?
    Thanks!

  2. #2
    Join Date
    Jan 2006
    Posts
    20
    It's quite obvious to save the text in its own file - preserves formatting, pictures, and many other reasons. Also, anything to cut down on DB size is good I should think.

    You should probably create another table:
    Code:
    table news
    (
        filename varchar primary key,
        datecreated datetime,
        .
        ..
        ...
    )

  3. #3
    Join Date
    Jan 2006
    Posts
    2
    Why am I creating a second table called news?

  4. #4
    Join Date
    Jan 2006
    Posts
    20
    I was considering the possible future growth of your database and giving you the opportunity to create additional data that you may want to have associated with a file.

    Additionally, I'm looking at data normalization rules - look at the 3rd rule.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    it depends if you want the content indexed. If the content is purely a regurgitaiton of what someone has said then there is a strong argument to store it as flat files, away from the db.

    It also depends on how you intend storing those flat files, at some point you are going to hit the limits within whatever OS you are using (whether its no of directories, files in a directory or whatever)

    if you wanted the content to be searchable then there is a strong argument to store the information within the db. for examle if you wanted to offer the ability to search alumnii's postings for specific terms

    it depends on how you plan to use the information, if you deploy it as a web aplication then that may also change what is reasonable. if you link to existing resources available elsewhere then you don't get charged for the bandwidth accessing tht information. Youmay be able to rely on external indexing engnes such as google to provide the search faciliites that would be provided by storing inside the db.

    finally there is a backup and security issue. storing insode the db will be mor secure than outside, it will be part of any backups - but it will increase the time and cost of your backups. information stored outside the db can be as secure as inside, with carefull design, but you are prone to more data errors if users are allowed to modify or delete files held outside the db

    HTH

Posting Permissions

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