Probably I could not ask the question in a proper way. But Here is what I want to do.
I have folders in hierarchical manner. Folders within folders. (For example - I am working on a DL project. I have images of blades of a image. Every fan is in one separate room of a house. House has many rooms hence we have assign number to these fans. A Fan has room number, A Blade of fan has three sides. We have assign some characters to these sides of blade also. like this we have images of blade and folders is something like this.
House - Room - Blade side
Now I want to build a front end which has these tabs(House name, room number, blade side etc) on web page . And I want to use local system's or azure storage drive to store the huge image dataset. But I want to use SQL database to store the information (like sides of the blade, room number, fan number etc) in csv format. And use this SQL as backend database for the web page.
When a user enters just any one of these information in the tab on webpage. I want this to give image as output
How to do this?
Thank you very much in advance.
Related
I'm making a small ecommerce project using Reactjs and SQL. I'm storing two different images shop(1) and user report(2)
I'm wondering if it's a good idea if I store the shop images in the directory itself like this
./public
./images
./shop
image1.png
image2.png
index.html
While the user report gets uploaded in the SQL as a blob
If the shop images are only used as static resources for your app, your example is the common way to do it.
However, if the shop images can be added/edited by users or if they shouldn't be visible to everyone, then you should store them in the database similar to the user report images.
We have product images which are stored on the filesystem under a manufacturer folder and those files are assigned to products in an IMAGE table.
Our developer needs two sets of data from the REST API:
Get all images for a product (comes from IMAGE table)
/api/manufacturer/[:id]/product[:id]/product-image
Get all product images under a manufacturer (comes from file system)
/api/manufacturer/[:id]/product-image
We can't take from the table in the second example because the client wants to keep unused images around for when products come in (products often use the same image as similar products).
Our developer pointed out that this setup is confusing for API users because the data comes from two different sources (IMAGE table vs. File System)
How is this properly done? Two different nouns?
The users of the API should not care about the back-end architecture. It does not matter that the API's look similar (same noun) but the data is coming from different sources. Let the middle layer (or data layer) worry about that and deal with it elegantly. The reason we modulize and layer our architecture is so that things like this can be done without one layer (or module) worrying about it.
So I am looking at creating a very small app for the town I live in, I would like to offer people the ability to log into a website and create a business listing that would have things like (name, address, phone, opening hrs, logo -image).
I have limited knowledge in sql and creating Databases but am able to with abit of reading and time.. However I would like to know the best approach for storing images.
I am planning on just uploading the image to the webspace and then having a URL link stored in the DB... But not really sure if this is the best option?
So my question first of all, is this the best way to go about it? secondly how could I achieve this?
You've got everything right.
Yes, go for the plain table in the database, contains all the required fields.
Upon inserting another company data, get the autoincremented id, extract logo's filename extension and move uploaded file into a file called "$id.$ext" and you're all set.
How to achieve it - just try some online manuals.
There are plenty on working with database, while handling files is better to learn from the man page http://php.net/manual/en/features.file-upload.post-method.php
I have a ruby on rails 3.0 application which will need a database containing the name and address of all the listed places in a certain area indexed by google maps. I don't need to display the map provided by google maps itself, I just need to be able to get the names and addresses of all places in a certain area from google, store this on my server, and then match the address/name a user enters with the place in my database if it exists, or add it if it doesn't. I have some questions about this:
Are there any gems out there that would help with this? A quick google search brought up gems which show places graphically on the google map, but this isn't what I need.
Approximately how much space will I need to store the names and addresses of, say every place in a city indexed by google maps?
I'd appreciate any feedback on how to go about building the places database using the google maps database as a source and making sure it's quickly accessible.
I just implemented an application for Google Places . There were about 4 million records in the Google places Db so the approach i used it you just make a curl call for a google place and store it in Database ,so next time i serve the place from DB. Don't store all the records in Db as this will make your Db too heavy. also google places allow only 1000 queries per day from a single IP. you also need ranking of the places with Db eg Paris in Canada and Paris in NYC will come together when you will search for paris. Google doesnot provide data according to the ranking . there is a different mechanism for finding ranking of the places
I recently came across a problem for image file storage in network.
I have developed a desktop application. It runs in network. It has central database system. Users log in from their own computer in the network and do their job.
Till now the database actions are going fine no problem. Users shares data from same database server.
Now i am being asked to save the user[operator]'s photo too. I am getting confused whether to save it in database as other data or to store in separate file server.
I would like to know which one is better storing images in database or in file server?
EDIT:
The main purpose is to store the account holder's photo and signature and later show it during transaction so that teller can verify the person and signature is correct or not?
See these:
Storing images in database: Yea or nay?
Should I store my images in the database or folders?
Would you store binary data in database or folders?
Store pictures as files or or the database for a web app?
Storing a small number of images: blob or fs?
User Images: Database or filesystem storage?
Since this is a desktop application it's a bit different.
It's really how much data are we talking about here. If you've only got 100 or so users, and it's only profile pictures, I would store it in the DB for a few practical reasons:
No need to manage or worry about a separate file store
You don't need to give shared folder access to each user
No permissions issues
No chance of people messing up your image store
It will be included in your standard DB backup
It will be nicely linked to your data (no absolute vs. relative path issues)
Of course, if you're going to be storing tons of images for thousands of users, I would go with the file system storage.
I think you have to define what you mean with better.
If it is faster my guess you don't want to use a database. You probably just want it plain on a file server.
If you want something like a mini-facebook, where you need a much more dynamic environment, perhaps you are better of storing it a database.
This is more a question than an answer, what do you want to do with the pictures?