AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Save record to BLOB

Ein Thema von nanix · begonnen am 4. Dez 2009 · letzter Beitrag vom 12. Dez 2009
Antwort Antwort
Seite 2 von 2     12   
nanix
(Gast)

n/a Beiträge
 
#11

Re: Save record to BLOB

  Alt 5. Dez 2009, 17:24
This is a table that will hold Sensor info.I have like 4 more tables in that hold other computer information about graphic cards,processor and so and so on.

So what would be best to solve this?

And has to be structured Data + DB
  Mit Zitat antworten Zitat
Benutzerbild von sx2008
sx2008

Registriert seit: 16. Feb 2008
Ort: Baden-Württemberg
2.332 Beiträge
 
Delphi 2007 Professional
 
#12

Re: Save record to BLOB

  Alt 5. Dez 2009, 17:43
Zitat von nanix:
I only save all data to 1 BLOB how can i loose performance with this.
Let's asume you want to read all sensors from one monitor with the name "Test2009".
Let's asume further there are 100 monitors and each monitor has 100 sensors.
And everything is stored in one single BLOB.
You have to read the BLOB on the whole and start a while-loop to find the monitor.
This is really unefficient.
You read a BLOB that could be huge only to use small parts of it.
On a network this would waste a lot of bandwith.

On the other side, if you have a well designed database you would emit this SQL query:
SELECT * FROM sensors WHERE MonitorName='Test2009' and within a few milliseconds you will get exactly what you are looking for.

Let's assume you want to extend the TMonitor structure:
Delphi-Quellcode:
TMonitor = record
  Name :String[20];
  Sensor :Array of TSensor
  Manufacturer : string; // new
end;
If you have a clean database this task is very easy; simply add a field to the table "monitors".
But with your design you will have big problems.
You need a TMonitorOld and a TMonitorNew record and a flag to indicate the old or the new structure.

Here are some argument against Blobs:
A clean designed database could be used without your application.
It has a value because it is open and portable.
But a table with a single BLOB is worthless without a working app.
If your app has a bug, everything could be destroyed and your data is lost.
fork me on Github
  Mit Zitat antworten Zitat
nanix
(Gast)

n/a Beiträge
 
#13

Re: Save record to BLOB

  Alt 5. Dez 2009, 18:09
Yes but i need structured data this is a must in a DB variant.
So if you have suggestion please write.
  Mit Zitat antworten Zitat
Benutzerbild von sx2008
sx2008

Registriert seit: 16. Feb 2008
Ort: Baden-Württemberg
2.332 Beiträge
 
Delphi 2007 Professional
 
#14

Re: Save record to BLOB

  Alt 5. Dez 2009, 19:33
I've attached a small MS access database and a image with the relationship between the tables.
You need some more tables and fields, but it could serve as a template.
Miniaturansicht angehängter Grafiken
inventoryrelations_122.gif  
Angehängte Dateien
Dateityp: zip inventory_321.zip (16,8 KB, 8x aufgerufen)
fork me on Github
  Mit Zitat antworten Zitat
nanix
(Gast)

n/a Beiträge
 
#15

Re: Save record to BLOB

  Alt 5. Dez 2009, 20:43
And thanks for the info you have given me so far infact to all of you!

Interesting idea,i looked it with office 2010

but how to realize this with delphi any example would more than thankfull.]
One of the features is DB should be universal and this would be more than good.

Tell me some of the features and how it scales to DB like Absolute DB and SQL..
  Mit Zitat antworten Zitat
generic

Registriert seit: 24. Mär 2004
Ort: bei Hannover
2.416 Beiträge
 
Delphi XE5 Professional
 
#16

Re: Save record to BLOB

  Alt 12. Dez 2009, 00:46
if speed is the important thing, why are you using a db?

when you are using flat files with your records/data its much much much much much much much faster than using a db!
Coding BOTT - Video Tutorials rund um das Programmieren - https://www.youtube.com/@codingbott
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:11 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz