Re: OT: database advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/25/05, Duncan Lithgow <duncan@xxxxxxxxxxxxxxxxxx> wrote:
> On Sun, 2005-04-24 at 23:40 -0500, Bruno Wolff III wrote:
> > Actually csv (or tsv) is a reasonable way to represent the data in a
> > relational database. This won't capture information about the structure
> > of the database. This would include datatypes of the data, constraints and
> > triggers.
> I thought they give problems when the data includes commas? Is there
> some mechanism I don't understand? 

It's not that hard: on most systems there's the escape character
(usually \) which is used to define a character as a literal text
instead of a separator; if your field separator is a comma, \, would
mean a real comma. \\ would mean a real backslash.

> If I understand you correctly this
> way of taking a snapshot does not preserve structure, only data. So it
> would involve some scripting to put it back into a database. Is that
> right?

You'll also need to backup the table definitions of course.
Some databases have an import tool that's able to handle csv. The only
problem is you're going to end up with one file per table, so if you
have a lot of tables you need to import a lot of files...

Klaasjan


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux