Results 1 to 15 of 15

Thread: [RESOLVED] Database or Folder structrue

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Resolved [RESOLVED] Database or Folder structrue

    Hi guys,

    I have 15,000 icons on my pc and as you can imagine searching, managing and backing these up is starting to become a nightmare. They are currently stored in folders as im sure most peoples are.

    I am in the middle of mocking out an application that will allow me to work with my icons easier and wanted to know if a database setup would be a better option.

    So basically my question is based on 15,000 icons which setup would be better. Database or file structure.

    Thanks

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Database or Folder structrue

    Hey,

    In my opinion, you would want to keep the folder structure that you have in place, but what you might want to do in keep the location of the icon in the database. That way you still have access to the icons on the file system when you need them, but you can easily search for and find an icon that you want by searching a database based on keyword, subject etc.

    Gary

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Database or Folder structrue

    I was thinking of that but IMOO that is a large amount of redundancy when I would store the icon itself in the DB.

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Database or Folder structrue

    I can think of no reason not to put the images in the database.

    Store the images as VarBinary(max) datatypes in the database.

    Or use MS SQL 2008 Express where they have a new datatype of FileStream - I've not used it yet but that might be a match for what you are doing.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Database or Folder structrue

    My reasoning was simply what would be the point of having a database that stores information on an icon and then have a file system that stores the icon itself. A database is one entity that can be managed easier that a mass of folders.

    Does a database store images and information more efficiently than a file structure in terms of memory?

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Database or Folder structrue

    The reason that I suggested that, was mainly based on the fact that I chose to store all the photos for my website on the file system, and not in the database, mainly because there are a lot of photos, and I didn't want the database to get too bloated. With icons I guess it would be different, since they are much smaller in size.

    Gary

  7. #7
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Database or Folder structrue

    Quote Originally Posted by szlamany
    I can think of no reason not to put the images in the database.
    I was agreeing with you

    Yes, yes - put the icon into a field in a database table. Put a couple of other fields in that row that describe nicely - maybe even a field to put keywords into.

    Then you can easily create an app - even a webpage - to display and/or extract them. Sort then - select on ranges of keywords...

    Putting images and icons into a DB is a really good idea.

    Putting them into a DB gives you a single method of saving and backing them up - and even sharing them with the folks here

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  8. #8
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Database or Folder structrue

    Quote Originally Posted by gep13
    The reason that I suggested that, was mainly based on the fact that I chose to store all the photos for my website on the file system, and not in the database, mainly because there are a lot of photos, and I didn't want the database to get too bloated. With icons I guess it would be different, since they are much smaller in size.

    Gary
    We've got 10,000+ photos of students in a DB at one of our customer sites - MS SQL server can handle it...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Database or Folder structrue

    Sorry, im knackered. I need to go to bed. Super, il do that so (after I teach myself how to use datbases). Thanks!

  10. #10
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Database or Folder structrue

    What about SQL Server Express though? That is what I am using for my personal site.

    Sorry for hi-jacking your thread Dean, just interested in the answer

  11. #11
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: [RESOLVED] Database or Folder structrue

    Quote Originally Posted by gep13
    What about SQL Server Express though? That is what I am using for my personal site.

    Sorry for hi-jacking your thread Dean, just interested in the answer
    There is a 4GB limit to the size of a single MS SQL 2005 Express database

    http://www.microsoft.com/sql/prodinf...-features.mspx

    But I just spent 10 minutes looking around MSDN and it appears that the size limit has been removed with MS SQL 2008 Express

    http://msdn.microsoft.com/en-us/library/ms165588.aspx

    And of course it has this new FileStream datatype - made specifically for doing things like we are discussing here.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  12. #12
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Database or Folder structrue

    Hmm, interesting.

    One of the main reasons that I chose to do it this way was because I was wanting to store the full resolution images. I have just checked, and currently all the files come to just over 3GB. Which is close to the limit of SQL Server Express 2005. Will have to check out SQL Server Express 2008, and see what can be done with that.

    Thanks for the info!!!

    Gary

  13. #13
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: [RESOLVED] Database or Folder structrue

    I still cannot get a firm answer on whether 2008 express has that file limit of 4gb...

    But you could always have just two DB's if you did reach 4 gb...

    I cannot imagine how useful the FileStream datatype would be in MS SQL 2008 if there was a limitation on database size - maybe the filestream data partition is excluded from that limitation...

    If I find out more info I will get back to you all!

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  14. #14
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Database or Folder structrue

    Thank you very much!!!

  15. #15
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [RESOLVED] Database or Folder structrue

    It isn't made particularly easy to find, but 2008 Express has got the 4GB limit:
    http://www.microsoft.com/sqlserver/2...ecialized.aspx

    I have no idea whether the FileStream is affected by that limit.

Posting Permissions

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



Click Here to Expand Forum to Full Width