arduino databse eeprom lib

im looking for a db lib
all dedicated solutions i found are broken on 1.0
roll my own?

http://www.arduino.cc/playground/Code/ExtendedDatabaseLibrary
http://www.arduino.cc/playground/Code/DatabaseLibrary

all dedicated solutions i found are broken on 1.0

So? Fix one of them.

You really don't have a lot of room for a database on an Arduino. 2K doesn't hold a lot of data.

ok, attached zip of extendeDb lib compiles under 1.0.1

EDB_1.0.1.zip (9.7 KB)

Thanks for sharing,

added a link on - Arduino Playground - ExtendedDatabaseLibrary - to this thread so people see your updated lib

thanks robtillaar, to make compatible i replaced WProgram.h with

 #if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"

actually i dont real like that lib, made me want to get closer to the metal.
anyways i did some benchmark using EEPROMEx lib, and was a bit shocked to find out the write speeds of EEPROM

Check how much time until EEPROM ready to be accessed
-----------------------------------------------------
Time to write 1 byte  (ms)                        : 0
Recovery time after writing byte (ms)             : 4
Time to write Long (4 bytes) (ms)                 : 10
Recovery time after writing long (ms)             : 4
Time to read Long (4 bytes) (ms)                  : 0
Recovery time after reading long (ms)             : 0
Time to write 7 byte array  (ms)                  : 20
Time to update 7 byte array with 7 new values (ms): 18
Time to update 7 byte array with 3 new values (ms): 10
Time to read 7 byte array (ms)                    : 0

so i've been thinking about moving over to PROGMEM land (using this FLASH lib).

my db is about 510 bytes.
is flash memory a better path?
not just for speed. any cons?

so i've been thinking about moving over to PROGMEM land (using this FLASH lib).

my db is about 510 bytes.
is flash memory a better path?
not just for speed. any cons?

Besides being read-only? Nope. Can't think of any.

:slight_smile:

dont get it, eeprom is also technically "read only"
http://www.arduino.cc/playground/Learning/Memory

i've seen text that mentioned you can not use progmem to write variables.
but the learning page is a bit slim on details.

Where does it say that EEPROM is read-only? It says

EEPROM is memory space that programmers can use to store long-term information.

and

...EEPROM memory are non-volatile (the information persists after the power is turned off).

Neither of which imply read-only.

Electrically Erasable Programmable Read-Only Memory

yair:
Electrically Erasable Programmable Read-Only Memory

I know what it means. It's a bit of a misnomer really though.

wrt performance issues:

The database code does not take into account that EEPROM writes are often done in pages (chucks of bytes, powers of 2, 16/32/64 etc)
If you need to updat 7 vars in 1 page you can do that in 7 writes but also in 1.
Seems that you did it per byte.

thanks for the tip,

so:

Flash | Arduiniana
PROGMEM (Flash) data region can only be populated at program burn time. You can’t change the values in the flash after the program has started running.

i think its worth mentioning in the learning.Memory section.

note added