Please see my comment to the question: your needs are formulated too vaguely; there is nothing much to discuss here.
Perhaps, first thing to learn is: stop mixing all things together. You need some separate layers or maybe also some different tiers (don't mix them up):
http://en.wikipedia.org/wiki/Layer_%28object-oriented_design%29[
^],
http://en.wikipedia.org/wiki/Data_access_layer[
^] (this is where your database could be),
http://en.wikipedia.org/wiki/Multi-tier[
^].
Your database should be in a
data access layer, which may or may not be implemented on a separate tier. Likewise, you will need a separate layer for data acquisition, or hardware control, or whatever your hardware does.
In your case, judging by your question, it looks like you really need at least person capable of analysis of the problems and requirements and defining of the architecture. Or you should learn a lot and become such a person. :-)
—SA