Results 1 to 14 of 14

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260

    - ( ).

    , - , ( , , ).

  2. #2
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    . .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  3. #3
    Registered User free_spirit's Avatar
    Join Date: May:2009
    Location:
    Posts: 232
    , ? ?

    edit: ,

  4. #4
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    - .
    ''? * *
    - !
    ...

  5. #5
    Registered User
    Join Date: Oct:2006
    Location: Plovdiv
    Posts: 305
    Quote Originally Posted by bombov View Post
    , - , ( , , ).


    . - - - web server-a. .

    . - . ..

    . , "" .
    prepBut nI vrbLike adjHungarian! qWhat's artThe adjBig nProblem?

  6. #6
    UnRegistered User Nevermore's Avatar
    Join Date: May:2007
    Location: Sofia
    Posts: 615
    MS SQL (28) . . MS SQL web service SQL- . , . , . , - MS Office documents, (Microsoft Search Server 2008 Express ) . - . , . . , .
    Last edited by Nevermore; 27th November 2009 at 10:47.

  7. #7
    دارس وعامل Siemens's Avatar
    Join Date: Jul:2003
    Location:
    Posts: 1,576
    PDO php blob- stream, Oracle.
    , - .
    , .
    .

  8. #8
    Registered User
    Join Date: Oct:2006
    Location: Plovdiv
    Posts: 305
    Quote Originally Posted by Nevermore View Post
    MS SQL (28) . . MS SQL web service SQL- .
    - - - web service xml . binary streaming web service soap XML.
    prepBut nI vrbLike adjHungarian! qWhat's artThe adjBig nProblem?

  9. #9
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    , - , .

    , - , .

  10. #10
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    ?
    , , , . " ". , - -.
    - . , .
    - - , -.

    :

    Before we start looking at the application and it's code, it's a good idea to briefly look at the pros and cons of both solution. Since so many people have a strong favor for one of the two solutions, there must be interesting differences between the two. Let's look at storing the files in the file system first.
    File System - Advantages

    One of the main benefits of storing the file on disk is that it's very easy to do. Just call SaveAs on a FileUpload control and you're pretty much done.

    Another advantage is that files on disk are easy to backup; you just copy the files to another location. This also makes it easier to do incremental backups; files that have already been backed up don't need to be copied again.
    FileSystem - Disadvantages

    Storing your files in the file system has a few disadvantages as well. Probably the most problematic issue is the loosely coupled nature of the files on disk. They have no strong relation with a record in the database. So, when you delete, say, a product from the database, you may end up with an orphaned product image. There is no direct way to do an INNER JOIN between the product table and your images folder to determine what orphaned files you have left. This means that a page developer is responsible for writing code that deletes the file from disk whenever the associated database records gets deleted.

    Also, to store uploaded files on disk, your web server needs permissions (6) to write to the file system. This is easy to come by (7) when you run your own server, but may prove to be more problematic in an ISP scenario.
    Database - Advantages

    Of course some of the advantages of a database are the exact opposite of the disadvantages of saving them as physical files: since they are stored in the database, they're easy to relate to other records. They can be retrieved in JOIN style queries, and even be deleted automatically with cascading delete turned on. You also don't need additional permissions on the server; if you can write to the database, you can store files in it.

    But another advantage of storing your files in a database is the fact that all data is contained in a single location. Make a backup of your database, and you have everything you need. That makes it a lot easier to move your data to another server; other than the database, you don't need to copy files, set up permissions and so on.
    Database - Disadvantages

    At the top of the list of disadvantages of storing your files in a database is probably performance. While I don't have any hard figures to support this, the "word is" that it's slow. How slow may depend on your situation, the type of files you have, the server, and so on.

    Another downside is the lack of easy access to the files. When you store them on disk, it's easy to download them to your desktop machine and batch process them; for example, use an imaging program to scale or rotate all your images. When you use a database, you need to "materialize" them to disk first and upload them again afterwards.

    A final problem with the database is backups. Whenever you make a full backup of your database, all the files are included, whether they have been changed or not. If you copy your backups to a different machine or network for safety reasons, this could be problematic as you need to move the entire backup file. With a file based solution, you can use diff programs that can determine which files have been changed since the last backup, and only download those.

    Realizing that both methods have their pros and their cons, the question is: what to choose? Personally, I favor storing them on disk. The accessibility of the files on disk, combined with the simple coding model makes the disk solution a better one in many situations. However, I have also used the database solution at places where that made more sense. Bottom line is that you need to carefully examine your scenario and determine what works for you.

    The solution I am presenting in this article shows you how to do both; with a simple option in the web site's config file, you can switch between a file based and a database solution.
    :
    http://www.webmasterworld.com/forum88/9091.htm
    ''? * *
    - !
    ...

  11. #11
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    Quote Originally Posted by vbTheKing View Post
    ?
    , , , . " ". , - -.
    , , , , - . , . .

    , , , .

  12. #12

    Join Date: Sep:2005
    Location: Sofia
    Posts: 18,517
    - . , .
    , . , .

  13. #13
    Registered User mln's Avatar
    Join Date: Jul:2006
    Location: Varna
    Posts: 100
    - .
    One of the main benefits of storing the file on disk is that it's very easy to do. Just call SaveAs on a FileUpload control and you're pretty much done.
    . .. 1 2 . 1 .
    Another advantage is that files on disk are easy to backup; you just copy the files to another location. This also makes it easier to do incremental backups; files that have already been backed up don't need to be copied again.
    , . ..1 2 . - .

    , 6, / .


    performance MS SQL2005. . 68 20 -, 600 2 -.
    Last edited by mln; 30th November 2009 at 14:41.
    |Aus Z87-Pro, 4770k, 2x8GB GEIL EVO LEGGERA 1866, 2x PowerColor PCS+ 290, OCZ Vertex Le 100gb + 2xWD640 AAKS, EVGA Supernova P2 1000W, 24" Dell 2408WFP

  14. #14

    Join Date: Sep:2005
    Location: Sofia
    Posts: 18,517
    , .

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |