From owner-freebsd-database Fri Jun 26 10:30:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA17953 for freebsd-database-outgoing; Fri, 26 Jun 1998 10:30:42 -0700 (PDT) (envelope-from owner-freebsd-database@FreeBSD.ORG) Received: from misery.sdf.com (misery.sdf.com [204.244.213.32]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id KAA17814 for ; Fri, 26 Jun 1998 10:30:05 -0700 (PDT) (envelope-from tom@sdf.com) Received: from tom by misery.sdf.com with smtp (Exim 1.82 #3) id 0ypbo4-0003hs-00; Fri, 26 Jun 1998 09:57:00 -0700 Date: Fri, 26 Jun 1998 09:56:58 -0700 (PDT) From: Tom To: Steven Yang cc: "'freebsd-database@FreeBSD.org'" Subject: Re: gdbm, help! In-Reply-To: <839A86AB6CE4D111A52200104B938D435B4B@MOE> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk On Wed, 24 Jun 1998, Steven Yang wrote: > is the problem. I also looked into db, but it looks difficult to use > because it seems I need to feed it a hash function, or if I do B trees, > a comparator. Considering all of the time I have invested into GDBM, I There are defaults for all this stuff. However, if you need to tune your database for a specific purpose, supplying these things can really boost performance. > don't really want to spend hours of frustration trying to get db to work > for me. Does anybody have any simple source code that creates a simple > db database and does a lookup??? On that note, does anybody have any Are you serious? FreeBSD has tons of code that uses db. All the password stuff is db files. See pwd_mkdb code for a start. There is also cap_mkdb. Also, the YP utilities all use db heavily too (ypserv, yp_mkdb, etc). It is easy to get going with db. You can also use the ndbm compat macros (/usr/include/ndbm.h), which makes it really, really easy (API wise, ndbm is quite similar to gdbm). ... > Somebody suggested using DB (as opposed to db), but I don't know where > to get DB. DB is supposed to have a GDBM-like interface. They are the same thing. FreeBSD includes db 1.85. You can get db 2.x from www.sleepycat.com db 2.x has quite a different API, and is a bit more complex than db 1.85 .. > Oh, and an unrelated question: We have a firewall. With either my > FreeBSD machine or my NT machine, I can ping a domain and DNS gives me > the IP, but I also get a reply from a different IP that says There are better ways to lookup the IP. See host or nslookup. Just because you can lookup an IP for a hostname, doesn't mean you have connecitivity to that IP. > "destination unreachable." Will I have problems doing Internet uploads > of FreeBSD ports? If so, what's the solution? The firewall is probably blocking the ping and sending back a destination unreachable message (you don't mention whether the ping is successful, so I'm assuming it isn't). Tom To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message