LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save file pointers to database

Hi,

My application requires saving of images (5 per trial) which is to be used for processing in later stages. I am storing trial data in database using LabVIEW database connectivity toolkit. I would also want to save images with the database for easy data management. But I do not want to save the entire image as it makes my db bulky and slow overtime. I would rather create a file reference/pointer to the image in database. Any ideas on how to create a file reference in database.
0 Kudos
Message 1 of 8
(4,159 Views)

Save filepath as string

0 Kudos
Message 2 of 8
(4,152 Views)

The simplest solution is to just store the path as a string in the database.  This requires you to follow some guidelines on where your files will go out on the server, preferably with the database.

 

Another solution, if using SQL, is the FileStream.  It allows the SQL database to keep the files in its own way (folder location stored with the database).  So the files are not exactly in the database and you can access the files quite quickly.  This does require using some .NET nodes and a little setting up with the database.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(4,132 Views)
So what you are saying is that the pictures aren't very important and it's OK to have them be lost?

If they are not in the database they *will* get lost. It's not a matter of if it will happen. It's a matter of when.

Better to use a DB server that can store all your data -- and by the way, images don't have to be large thanks to data compression. Likewise, any database will slow down over time if it is not maintained.

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 8
(4,125 Views)
I would want to explore the SQL Filestream method as it would be reliable for my case. I have some idea with Filestream but how to use .NET nodes is something I haven't explored. Where do I start???
0 Kudos
Message 5 of 8
(4,086 Views)
Mike Porter, I will require the images for further processing , so I should not lose them. With regards to data compression, there may be some data loss which may affect my processing in future. How to configure a db server. Can you brief this method.
0 Kudos
Message 6 of 8
(4,083 Views)

@mikeporter wrote:
So what you are saying is that the pictures aren't very important and it's OK to have them be lost?

If they are not in the database they *will* get lost. It's not a matter of if it will happen. It's a matter of when.

Better to use a DB server that can store all your data -- and by the way, images don't have to be large thanks to data compression. Likewise, any database will slow down over time if it is not maintained.

If they are saved as files on the database server it's about as likely they are deleted as other data.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 8
(4,068 Views)
Y: true, but if they are in the database you can at least setup permissions that would make it more difficult.

haripandian: with compression it depends on the type you use.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 8
(4,051 Views)