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 11. Dez 2009
 
Benutzerbild von sx2008
sx2008

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

Re: Save record to BLOB

  Alt 5. Dez 2009, 15:49
Zitat von nanix:
Speed is the first priority.
Premature optimization is the root of all evil - Donald Knuth.
read more: http://www.codinghorror.com/blog/archives/000061.html
Maybe you save some time storing your data, but you lose very much time if you want to retrieve the data.
Assume you want to read the data for a specific sensor and you know the name of the sensor.
Doing it your way using BLOBs you have to read about 50% of all records to find your sensor.
This is called a full table scan.
A very bad approach.

"generic" is right; you have a database and you should not missuse the database.
Blobs are good for pictures, documents or even files but not for structured data.

And BTW, it seems that your table doesn't have a primary key.
Primary keys are really important.
Tables without primary keys and only a blob field performs very bad.
Without a primary key you can't even delete a record, because the database doesn't know which record should be deleted.

My advice is: throw away all your code and design a clean database with normalized tables.
fork me on Github
  Mit Zitat antworten Zitat
 


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 17:46 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz