SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot medicus's Avatar
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question SQL and Pictures database design ! Need help

    Hi all,
    No where better to seek advice that from a collective mind. I am setting up a site for the purpose of having people post any residence they wish to rent. Although I do have an idea of how I wish to set up the data I do wish to seek more advice incase I missed something.

    The data layout would be as follows:
    1) Alpha-numeric data will be placed within mySQL so its easier to perform searchs on certain strings, mostly would be by locale and price.

    2) The problem I have is the pictures if someone wishes to submit them for his residence or building. Shall I have the data related to the pictures in the database and the pictures in another folder (which is what I am currently planning) ? Any other better ideas out there ?

    Thank you for just reading.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're planning to do it right. As I've said in another post, IMHO file systems are for storing files and databases are for storing data, so let both do what they're best at ... put your images in a folder and write the relative path to that image into the database. That's how I did it for a similar problem and it works a treat. Much better than using a file field.



Bookmarks

Posting Permissions

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