Re: sleepycat db VS MySQL or postgres

2013-07-02 Thread Ivan Voras
On 01/07/2013 22:28, Jim Pazarena wrote:
 I have a rather extensive series of databases created and in use all
 with the very old sleepycat db3. I believe in the addage don't fix
 what ain't broken, but in the case of db3, it IS broken and my db
 files get corrupted on occasion.
 
 I could move to db5 or db6 OR MySQL, or even postgres.
 
 I use simple primary key files, most entries are added from a CLI
 or termcap/curses screen. Some programatically. With about the same
 number of sequential dumps vs indexed random reads.
 
 I have no experience with the c interface for postgres or mysql, but
 also, do not know how much the c interface has changed for sleepycat
 5/6 compared to the c interface for db3, which I understand quite well.
 So I am prepared for a learning curve irrespective of which platform
 I select. Records do not exceed much more than 10-20,000, with key sizes
 not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various
 smaller key sizes.
 
 Suggestions would be very much appreciated.

Well, this is essentially a bikeshed thread... so why not chip in :)

I'd say it depends on what is your priority or what do you want to
achieve by switching databases.

If you want it to be as easy as possible, switch to DB5 and you'll be ok.

If you want to learn something interesting, try one of the recent NoSQL
databases, such as Redis, MongoDB or CouchDB - they're like DBx but with
significantly more powerful query capabilities.

If you want to get a feel of how SQL databases work, go with PostgreSQL,
but be aware that to really use a SQL database the way they're made to
be used, you'll need to properly design a relational schema. Using them
to store 20 KiB blobs indexed by a single key is way too simplistic and
probably much slower than what you could get with a simple DBx engine.
Also, SQL databases usually work with SQL queries, which are text, so
you'll have a non-trivial task of fitting C structs in their text/blob
field types - it's best to avoid it. Also, you'll need to learn how to
tune and maintain proper database servers.

If you want to just try SQL but without bothering with tuning and
maintainance, try SQLite, but beware it is basically limited to a single
writer (and inifinite reader) clients in the best case (with WAL
journalling).




signature.asc
Description: OpenPGP digital signature


Re: sleepycat db VS MySQL or postgres

2013-07-02 Thread Mark Felder

On Tue, 02 Jul 2013 05:45:47 -0500, Ivan Voras ivo...@freebsd.org wrote:


Well, this is essentially a bikeshed thread... so why not chip in


I disagree; all of these databases have distinctly different uses.

MySQL/PostgreSQL: pick your poison. Relational databases. Will you have  
multiple users connecting to the database? Will there be lots of updates  
to the data? These are what you want. If you care about data integrity,  
I'd choose Postgres.


SQLite: Do you want a relational database without needing a daemon to be  
running and will only have a single user/process accessing the database at  
one time? This is what you want.


NoSQL: Do you want to dabble with the mess that is NoSQL so you can build  
your cloud? Don't care if other nodes aren't guaranteed to get the  
latest copy of the data? This is what you want.


SleepyCat/BerkleyDB: Is your data WORM? (Write Once Read Many) If so, this  
is *ABSOLUTELY* what you want.




If twitter was built upon a WORM database instead of MySQL they could host  
the entirety of twitter on a handful of servers instead of the gross  
MySQL+Cassandra mess they're fighting with today.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sleepycat db VS MySQL or postgres

2013-07-02 Thread Ivan Voras
On 02/07/2013 13:55, Mark Felder wrote:

 If twitter was built upon a WORM database instead of MySQL they could
 host the entirety of twitter on a handful of servers instead of the
 gross MySQL+Cassandra mess they're fighting with today.

I'd say their problem is not exactly solvable by only choosing a database :D
They, like Facebook, have the problem of fanout, where a single piece
of data goes into thousands of different user pages. Whatever they save
in the raw data access operations will probably be relatively small
compared to the horsepower needed to combine pages from all these
fleeting data pieces.

But yes, obviously a database designed specifically for one thing will
be optimized for that thing.



signature.asc
Description: OpenPGP digital signature


Re: sleepycat db VS MySQL or postgres

2013-07-02 Thread Mark Felder

On Tue, 02 Jul 2013 07:12:37 -0500, Ivan Voras ivo...@freebsd.org wrote:


On 02/07/2013 13:55, Mark Felder wrote:


If twitter was built upon a WORM database instead of MySQL they could
host the entirety of twitter on a handful of servers instead of the
gross MySQL+Cassandra mess they're fighting with today.


I'd say their problem is not exactly solvable by only choosing a  
database :D

They, like Facebook, have the problem of fanout, where a single piece
of data goes into thousands of different user pages. Whatever they save
in the raw data access operations will probably be relatively small
compared to the horsepower needed to combine pages from all these
fleeting data pieces.



Good point :) I'm still sure it would work much, much better though.  
However, I'm just glad that's not *my* problem to fix.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


sleepycat db VS MySQL or postgres

2013-07-01 Thread Jim Pazarena

I have a rather extensive series of databases created and in use all
with the very old sleepycat db3. I believe in the addage don't fix
what ain't broken, but in the case of db3, it IS broken and my db
files get corrupted on occasion.

I could move to db5 or db6 OR MySQL, or even postgres.

I use simple primary key files, most entries are added from a CLI
or termcap/curses screen. Some programatically. With about the same
number of sequential dumps vs indexed random reads.

I have no experience with the c interface for postgres or mysql, but
also, do not know how much the c interface has changed for sleepycat
5/6 compared to the c interface for db3, which I understand quite well.
So I am prepared for a learning curve irrespective of which platform
I select. Records do not exceed much more than 10-20,000, with key sizes
not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various
smaller key sizes.

Suggestions would be very much appreciated.
--
Jim Pazarena fqu...@paz.bz
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sleepycat db VS MySQL or postgres

2013-07-01 Thread Kevin Wilcox
On 1 July 2013 16:28, Jim Pazarena fqu...@paz.bz wrote:

 I could move to db5 or db6 OR MySQL, or even postgres.

snip

 I have no experience with the c interface for postgres or mysql, but
 also, do not know how much the c interface has changed for sleepycat
 5/6 compared to the c interface for db3, which I understand quite well.
 So I am prepared for a learning curve irrespective of which platform
 I select. Records do not exceed much more than 10-20,000, with key sizes
 not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various
 smaller key sizes.

 Suggestions would be very much appreciated.

Jim - ultimately I'd recommend deciding which of the three you WANT to
learn and then use it.

I know nothing about db* but I use both MySQL and PostGreSQL on a
regular basis. I like them both. I prefer the licence used by
PostGreSQL, I prefer the PostGreSQL replication but I use whichever
suits my needs. Some people are fanatical about one or the other, I
say pick whichever you're more interested in and learn how to use it.

kmw
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sleepycat db VS MySQL or postgres

2013-07-01 Thread Bruce Ferrell

On 07/01/2013 01:28 PM, Jim Pazarena wrote:

I have a rather extensive series of databases created and in use all
with the very old sleepycat db3. I believe in the addage don't fix
what ain't broken, but in the case of db3, it IS broken and my db
files get corrupted on occasion.

I could move to db5 or db6 OR MySQL, or even postgres.

I use simple primary key files, most entries are added from a CLI
or termcap/curses screen. Some programatically. With about the same
number of sequential dumps vs indexed random reads.

I have no experience with the c interface for postgres or mysql, but
also, do not know how much the c interface has changed for sleepycat
5/6 compared to the c interface for db3, which I understand quite well.
So I am prepared for a learning curve irrespective of which platform
I select. Records do not exceed much more than 10-20,000, with key sizes
not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various
smaller key sizes.

Suggestions would be very much appreciated.


Jim,

I'm a lazy bugger and what I'd do is knock together a small perl program using 
DBI and the DBD for Berkeley DB (sleepcat) and either MySQL or Postgres (pick 
your religion).

You could grap the records out of one table and insert them into another as 
though they are the same db... LIke I say, I'm lazy.

No, it's not shiney and new (may EVEN be deprecated)

If you'd like assistance, I'll be happy to hold hands

Bruce Ferrell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sleepycat db VS MySQL or postgres

2013-07-01 Thread Walter Hurry
On Mon, 01 Jul 2013 13:28:59 -0700, Jim Pazarena wrote:

 I have a rather extensive series of databases created and in use all
 with the very old sleepycat db3. I believe in the addage don't fix what
 ain't broken, but in the case of db3, it IS broken and my db files get
 corrupted on occasion.
 
 I could move to db5 or db6 OR MySQL, or even postgres.
 
 I use simple primary key files, most entries are added from a CLI or
 termcap/curses screen. Some programatically. With about the same number
 of sequential dumps vs indexed random reads.
 
 I have no experience with the c interface for postgres or mysql, but
 also, do not know how much the c interface has changed for sleepycat 5/6
 compared to the c interface for db3, which I understand quite well. So I
 am prepared for a learning curve irrespective of which platform I
 select. Records do not exceed much more than 10-20,000, with key sizes
 not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various
 smaller key sizes.
 
 Suggestions would be very much appreciated.

If you have to make a change, I'd recommend switching to Postgres. Worth 
the effort in the long run, and Postgres is not at all difficult if you 
have experience with any RDB.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sleepycat db VS MySQL or postgres

2013-07-01 Thread Mehmet Erol Sanliturk
On Mon, Jul 1, 2013 at 4:28 PM, Jim Pazarena fqu...@paz.bz wrote:

 I have a rather extensive series of databases created and in use all
 with the very old sleepycat db3. I believe in the addage don't fix
 what ain't broken, but in the case of db3, it IS broken and my db
 files get corrupted on occasion.

 I could move to db5 or db6 OR MySQL, or even postgres.

 I use simple primary key files, most entries are added from a CLI
 or termcap/curses screen. Some programatically. With about the same
 number of sequential dumps vs indexed random reads.

 I have no experience with the c interface for postgres or mysql, but
 also, do not know how much the c interface has changed for sleepycat
 5/6 compared to the c interface for db3, which I understand quite well.
 So I am prepared for a learning curve irrespective of which platform
 I select. Records do not exceed much more than 10-20,000, with key sizes
 not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various
 smaller key sizes.

 Suggestions would be very much appreciated.
 --
 Jim Pazarena fqu...@paz.bz



The following page may be useful :

http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems

MySQL is dropped from some Linux distributions due to its restrictions and
replaced by MariaDB :

http://en.wikipedia.org/wiki/MariaDB

Dropping of MySQL is continuing among Linux distributions for new releases .

The PostgreSQL would be best choice :

http://en.wikipedia.org/wiki/PostgreSQL

I am not using any one of them , but my PhD ( in 1996 ) subject is
A Multimedia Information Management System .


Thank you very much .

Mehmet Erol Sanlituk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org