From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Tue, 07 Dec 2021 00:12:15 +1100 Message-ID: <87a6hdc1p7.fsf@gmail.com> References: <87tufmjyai.fsf@gnus.org> <875ys2lyt0.fsf@yahoo.com> <87wnkhlxb9.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13144"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.5; emacs 28.0.90 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 06 14:20:36 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muDv2-0003DC-6l for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 14:20:36 +0100 Original-Received: from localhost ([::1]:35138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muDv1-00013A-4O for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 08:20:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muDs3-0006L5-LJ for emacs-devel@gnu.org; Mon, 06 Dec 2021 08:17:31 -0500 Original-Received: from [2607:f8b0:4864:20::431] (port=44793 helo=mail-pf1-x431.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muDs2-0006NI-0h for emacs-devel@gnu.org; Mon, 06 Dec 2021 08:17:31 -0500 Original-Received: by mail-pf1-x431.google.com with SMTP id k64so1939592pfd.11 for ; Mon, 06 Dec 2021 05:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=oNf0Rfm92+Rn7y75XA9udzRTSMKj30mqm/RcRXRnK8A=; b=Nzg4QG0Yia+Y5OeMDta/nx4/Sf4gxgtw4cxakkrz2yaMJWM8Ozwgl59uC8qPMj+fl+ Q5CSIz/ne8ZT8JRvXe2mZccRZ5qRCcgUY42rSkFqrxqsFbBLA7cLmGUQ4UlphhtVlrkH yZuxMC1kRUHPS5MO2JmxAYOm6VqUZo7cOmpQoImlhO9dmRxkpJW5SlFcbogHLHDgKrfb VOuYG0aB0KCW3PadzbJJ+54B5HEEeEq03nitS9EpNnlOhn1xh/9PJXkWrhCI11i1kzBk 0jBdhDhGJIHXUIG4F244eEsce1sHGG7Gs+9qyGcVTzs71esI/QUK5zZpTA9XmQRfeoVk C2Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=oNf0Rfm92+Rn7y75XA9udzRTSMKj30mqm/RcRXRnK8A=; b=GohZdhu+96lEZE1h33n976r1jEkO0qcIE3PPuOAIyEctBnShMBsM+MEmvMiBgq9Wp2 Z0S8nUkOUCp1Rj7rEzC0zzICv+r1ozxlwNoGPud6KcY4amW41p+5eIgMB6qHLJ9wpYM7 mjhyOyA/gwzDI72y+zZYc47F6avx2NwjPemL3tTj7vbYvw56RaI1qe8GkE5HnVklHw/4 qEtpWcmmbSGRY81H5L4jZ9XRx3ckTMDNryxKBywgWOHkN9G1RFvY8v2g13af3fzrVKqg 2n/CRCgMbbGYtJPFSqW+V7W748P71jvVxfNpTbFiyaA5q2Q812/feDWIbQgfizJtvOwr e4Dw== X-Gm-Message-State: AOAM533tyY5ek1i6GoPtfAJOFuF3ky64KO0OW0PUFO5nllqJ37i/Py7K ZBY7RwIbcgoZwn6HObreOW5Pzw4etEM= X-Google-Smtp-Source: ABdhPJygec0td/u+HGV0/sXAqUGnlZz4nQn5uoPs35fMwVakvPbe6JXR9V5JIpcGIv0It8J73mxknA== X-Received: by 2002:a05:6a00:114d:b0:4a2:87bd:37f with SMTP id b13-20020a056a00114d00b004a287bd037fmr36604391pfm.82.1638796648311; Mon, 06 Dec 2021 05:17:28 -0800 (PST) Original-Received: from dingbat (2001-44b8-31f2-bb00-1567-b2de-f45a-a20e.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:1567:b2de:f45a:a20e]) by smtp.gmail.com with ESMTPSA id np1sm14583532pjb.22.2021.12.06.05.17.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Dec 2021 05:17:27 -0800 (PST) In-reply-to: <87wnkhlxb9.fsf@yahoo.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::431 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x431.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281095 Archived-At: Po Lu writes: > Arthur Miller writes: > >> I suggested hashmap serialzied to/from file. I used such approach >> myself for key-value pairs. It worked fine for me, it was quite simple >> to read/write it. Currently I am testing a thing, and I use just assoc >> list to read/write it to a file, and it works fine for me too. > > I think the ideal choice would either be dbm (and the GNU variant, gdbm, > which improves upon it in every area) or recutils. > > Which still raises the other important question of how to serialize > data, and how to do it better than `read' and `print'. > >> Just because everyone uses sqlite is maybe not the best argument, but >> anyway, sqlite is maybe faster when serializing that reading/writing >> lisp objects. I don't know, I am not familiar so much with elisp vs >> sqlite. Also, there are many uses for relational databse than just >> persisting user settings. I am thinking of desktop applications a l=C3= =A1 >> Access/Excel and similar. > > What is special about the settings of MS Access or MS Excel that warrant > a relational database for storing them? It probably wouldn't be particularly hard to define a layer which sits between the Emacs code and the 'database', which could be either sqlite3 or gdbm? users could decide which backend they prefer (either as a compile time option or possibly even as a user configuration option). However, I do agree with other comments about simply serialising lisp objects (i.e. hash maps) probably being sufficient for a majority of cases. Isn't this essentially what packages like bbdb and applications like vm (mail) did? In othe words, I don't know if we are really talking about a wholesale replacement and move towards sqlite3/gdbm, but instead perhaps providing an interface to (lets say sqlite3) which could be useful when you do need a more relational model and limited SQL support.