database design - Using Parse as BaaS to store multiple images in an efficient manner -


I am using paras to create an ecommerce application for iOS and Android. I have a product table (or class) that contains all product related information such as price, description etc. I am struggling to find the most effective way of storing images. Every product has about 10-15 images and I want a good UI on the customer.

  • Create an array in the product table and archive multiple images (don ''
  • Save images on some external servers and create an array of image URLs in the product table.
  • >
  • Save all the images in a new table.
  • What could be the best solution in terms of speed and minimum API call. Please advise. Does anyone have an image Know about the hosting server in my case

    Thanks

    Let me know through each of your modes Let's highlight the pros and cons of each.


    • Create additional 15 columns in the product table with the type of images to store. / Strong>
      1. If you have 3-4 images then it is quite possible and apparently good but in this case you have 15 and I do not think that doing this A lot more column sector is a good idea to add a table row is definitely not using Paras dot com. :)
      2. On the other side of the logic, you get all file references to your images related to a particular product in 1 network request.
      3. If you use the traditional Byte [] method, you can run into problems because data can eat your memory if it is not handled properly.
      4. Use the column naming (if you are going to image1, image 2, image3 ... ) then you may have to try further if you need to get data back.
      5. If the number of images is not exactly 15, then it is because in the efforts of further coding for cross checking, there is a valid image in a particular column.
      • Create an array in the product table Store many images (do not know if this is possible) < / Strong>
        1. You can of course do this by using arrays. To do this, use the normal file upload method and on parseFile.getUrl () on iOS Hold the file URL using Android and PFFile.url . Then you can add it to the Picture Array column. You can also use JSONArrays to do this.
        2. This is definitely not a good idea because you have a cloud code or scheduled job There is no scope to scale or manipulate files by using.
          • Product table Save all the images in a new table with the object reference.
            1. This should be done in the exact same way.
            2. The only issue for this implementation is that you do not get reference to images when you query for products with a network request.
            3. But you can always use relational data implementation for it

          • Some external Save images on the server and create an array of image URLs in the product table
            1. If you have the facility then you can also do the parse image processing capabilities are not good. You can use other services If it is affordable then it can be economical.

    Comments

    Popular posts from this blog

    sqlite3 - UPDATE a table from the SELECT of another one -

    c# - Showing a SelectedItem's Property -

    javascript - Render HTML after each iteration in loop -