[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Xy as database handler?
- Subject: Re: Xy as database handler?
- From: Paul Lagasse pglagasse@xxxxxxxx
- Date: Thu, 11 Jun 2009 07:53:33 -0400
Harry Binswanger wrote:
Being renewedly impressed with the extraction possibilities of things
of the form: , I'm considering using Xy to do primitive
database operations--probably using commas as field separators, and
as record separators.
But to do this, I'd have to have some nifty, economical way to change
the contents of a field. All I can think of, however, is a clunky DL
(define line) and series of SE/S /,/ followed by more defines.
Is there a better way?
If you want to use XyWrite for databaselike operations, I'd suggest
using some sort of markup to label your fields. I work with SGML text
files, and the tagging allows me to use XyWrite to find an individual
record (short article) that starts with "A" without knowing which of the
11 A files the record is located in and to run databaselike operations
(find all articles that are biographies, and list their titles or copy
the entire text). I've used XyWrite to massage databases and
databaselike tables and almost always add markup to avoid counting
commas and diminish the likelihood that I'll work on the wrong field.
Something like this, with as a field separator and two as record
separators:
If the field can contain a , I use a closing tag () to mark
the end of the field. It's easy enough to add the tags when setting up
the "database" using a CSV file or strip them out to export a CSV file.
Paul Lagasse