Central Files - management of personal information
Central Files is management of personal information.
Any information that belongs to any person is managed in Central Files.
Everything relating to communication with any person that ever contacted the organization is managed in such collection.
It could be paper base.
Today, computers are used to manage such information in databases.
It is my opinion that every person shall be able to design the database as they think it gives them most benefits.
The pages about Central Files will hopefully help GNU Emacs users to design their own relational databases and edit information in a quick and efficient manner thus increasing productivity and communication quality and speed with related persons.
The name Central Files relates to administrative methods of management of personal information of any people who ever purchased something from the organization. The term has been borrowed from Scientology Administrative Technology as authored by L.Ron Hubbard and definitions of the words “Central Files”, where one, among several definitions, are mentioning “Central Files Folder” to be “that folder which contains all and everything that has been originated to an organization by an outside person”. It is used for mailing purposes.
In this specific sense we will use “Central Files” as the name of the methodology on how to keep information by using databases and simple programming. And we will keep in such database potential leads which never originated to the organization and also those which did originate to organization. Any information related to persons and groups is to be kept in Central Files.
Major principle by Gedafe is that every table shall have its table_id as the main field to work with. It is used for referencing by other relational tables within the database.
If we are to create
contacts table then we would make sure to have
contacts_id field which should be an unique integer number.
One of purposes of Central Files will be to send mailings to people. Such mailings could be letters, could be emails, could be faxes, could be SMS messages, it could be personal visits to their houses, it could be deliveries of packages by drone, right? It could be any kind of communication to people, including cold advertising and cold calls. For reasons of contacting people we will keep all of it in the database.
So let us repeat the principle to use as the base of work to create Central Files. You are invited to contribute your thoughts and thinking at any time and to propose any changes or modifications. You are anyway invited to take these principles of information management and use it themselves, and to re-use and modify, distribute any free software published here under the GNU Affero General Public License.
Principles of Work
Central Files is management of personal information. Any information that belongs to any person is managed in Central Files. Everything relating to communication with any person that ever contacted the organization is managed in such collection.
We will use PostgreSQL relational database. Install it in your
We will use GNU Emacs editor as main operating environment to manage the database. Install the editor.
We will use Emacs Lisp programming language to access and manage the database within the GNU Emacs as operating environment.
Every table in the database is to have first field as its unique ID, as for table named
examplethere will be field
example_idto accommodate the web interface by using Gedafe Generic Database Frontend. You do not need to install anything at this point, we will do everything from Emacs Lisp and web interface will become a bonus.
We will use emacs-libpq Emacs module to access the PostgreSQL database. Install the module.
First step is to create the database
You may create database by using standard PostgreSQL commands, such as
You can also use the Emacs module to create it within the Emacs as following:
;; first configure in the below line the path to the emacs-libpq module (add-to-list ‘load-path “~/Programming/git/emacs-libpq/”)
;; evaluate the followin, if it works, great! (require ‘pq)
;; figure out the name of your database, configure it in this line (defvar cf-db “cf”)
;; evaluate this line, if username and passwords are required, you could ;; add it as well such as username=somebody password=something ;; I can assume you have database template1 in PostgreSQL (defvar cf-pg-info (or (getenv “PG_CONNINFO”) “port=5432 dbname=template1”))
;; Evaluate the following to get the connection to the database (defvar cf (pq:connectdb cf-pg-info))
;; Now the database handle is cf in the next step you could create the database ;; It would evaluate with nil (pq:query cf “CREATE DATABASE cf”) ```
That would mean that the database handle
*cf* has been created, and
you may now be able to keep connection to the database and access it
from GNU Emacs operating environment.
Helper function to access database
Following function will be often used to access the database. We will
*cf* as global variable for the database handle to avoid
(defun rcd-sql (sql &optional handle)
"Send SQL queries to PostgreSQL database"
(let ((handle (if handle handle *cf*)))
(pq:query *cf* sql)
(if (string-match "^ERROR: syntax error" (cdr err))
(if (fboundp 'speak) (speak (cdr err)))
(message (cdr err)))
(signal (car err) (cdr err)))))))
On next pages we will start creating few meta tables and then design the basics for personal information management.
Next pages related to Central Files
- Central Files: creating the countries table for the SQL database
Here we are creating the `countries` table. Contacts are related to countries. Central Files is management of personal information. Any information that belongs to any person is managed in Central Files. Everything relating to communication with any person that ever contacted the organization is managed in such collection. Central Files may be managed within the GNU Emacs editor and computer operating environment.
- Central Files: Preparing the GNU Emacs skeleton for PostgreSQL tables
To easier create PostgreSQL database tables for personal information management system by the name Central Files we will use the built-in GNU Emacs feature named Skeleton.
- Central Files: meta_tables
Central Files is management of personal information. Any information that belongs to any person is managed in Central Files. Everything relating to communication with any person that ever contacted the organization is managed in such collection. The table `meta_tables` may help us in future to indicate if such table need to be hidden or handled in special manner.
- Central Files: meta_fields table
Central Files is management of personal information. Any information that belongs to any person is managed in Central Files. Everything relating to communication with any person that ever contacted the organization is managed in such collection. The table `meta_fields` is necessary requirement for Gedafe generic database frontend. We may have use of it.
Contact GNU.Support now. There is a simple rule at GNU.Support: if we can help you, we do, whenever and wherever necessary, and it's the way we've been doing business since 2002, and the only way we know