Page 7 of 14

Posted: Wed 28 Jan 2015, 06:54
by technosaurus
Here is some FYI on using your filesystem as a database:

Here is one example, but there are many ways to implement it

Code: Select all

-{ Databases
 | -{ Pet_Packages (each directory is a "database")
 |  | -{ Abiword (each subdirectory is a "record")
 |  |  | -pkg_name (contents of file is abiword-2.8.6.pet)
 |  |  | -version (contents of file is 2.8.6)
 |  |  | -dependencies (contents of file is gtk2,...)
....             
... you could always name the records as numbers like other databases do, but the flexibility is there

Here are some advantages:
- Ext4, btrfs and most other modern filesystems allow each small entry to be stored within the inode (Ext4 has the smallest limit of 60 bytes) so you get similar access to a database, but with the advantage that larger entities are still possible without modification
- You can use standard tools to query the "database" for example:
grep gtk2 $HOME/Databases/Pet_Packages/*/dependencies
- It is as scalable as the backing filesystem
- It is easy to share entries within and between databases with links
- The filesystem keeps track of mod and access time to make it easy to sync only changed entries (using rsync for example)

Posted: Wed 28 Jan 2015, 07:45
by dejan555
Regarding flat file databases, here's a little script, kinda like proof of concept for a simple data manager I did in bash/gtkdialog, there are ten columns which you can define names and visibility in preferences and then you can add/delete/edit/search entries or even load multiple databases (just type new name for database in the bottom input and hit add)
It uses numbers to manipulate entries (something like primary key autoincrement in databases) with sed, grep, etc...

I've made this originally for contacts so I named columns something like: Name, Surname, Phone, Cell_phone, Mail, Web, etc...

gunzip the script and make executable.

Also, sqlite3 is really light and included in every puppy I think it can be powerfull tool for creating desktop apps in combination with bash/gtkdialog, a simple one also I did is here, but I might share a different one made I've been making these days for tracking of bought/spent materials and cost if there's interest.

KDE 3.5.7 sfs (sfs4) needed for Tellico

Posted: Wed 28 Jan 2015, 10:55
by Pelo
dejan i am only a poor user, not a developer
here is now a great misunderstood nowadays in Puppy, there are still some users who do not develop, and don't want to... just use,
Nevertheless i keep somewhere structure of Tellico files. I will join them soon.
KDE 3.5.7 sfs (sfs4) needed for Tellico stored in my Google Drive
Old ? yes, old, but it works , and link is alive..
Tellico sucessful in Tahrpup 5.8.3 (merci Jejy69 and LXPUP team)

PS : i run depup sqeeze 5x 3.6.21.1 on an old laptop Acer. Good distro. No problem.
Merci Dejan too, for having considered our users needs.

Posted: Wed 28 Jan 2015, 10:57
by dejan555
Nothing wrong with that

Tellico again (with some help from developers)

Posted: Wed 28 Jan 2015, 16:49
by Pelo
Tellico ok under tahrpup ( Sfs KDE loaded on the fly).

Stuffkeeper (suggested by smokey)

Posted: Wed 28 Jan 2015, 16:53
by Pelo
Stuffkeeper (suggested by smokey)
I will check it, link seems died.
Death everywhere, since a long time,.. How many Linux programs left our world without any care. :( :x :cry: :!:
Ghost web sites were not cleant due lack of time , so many Puppies to born, like Barbie dolls.
Tellico installed ! yes. (see above)

Posted: Fri 13 Mar 2015, 23:30
by technosaurus
I came up with a way to make filesystem based databases take up significantly less space (at the expense of lookup speed) ... namely using empty files in the database directory for each field and then using appropriately named hardlinks for each value

Code: Select all

\_DATABASEDIR
 \_CONTACTS
   |-FirstName
   |-LastName
   |-NickName
   |-Address
   |-Phone
   \_Record 1
     |-Brad (hard link to ../FirstName)
     |-Conroy (hard link to ../LastName)
     |-technosaurus (hard link to ../NickName)
     }-...
The problem with this method is that it gets exponentially slower with each additional field because each entry has to be checked to see if it is the right field.

Code: Select all

for ENTRY in $somedir; do
[ "$FIELD" -ef "$ENTRY" ] && return "$ENTRY"
done
So only use this method if you have a large number of records with a small number of fields or if the max number of records/data is more important than the speed.

Posted: Sat 14 Mar 2015, 03:52
by musher0
technosaurus wrote:I came up with a way to make filesystem based databases take up significantly less space (at the expense of lookup speed) ... namely using empty files in the database directory for each field and then using appropriately named hardlinks for each value

Code: Select all

\_DATABASEDIR
 \_CONTACTS
   |-FirstName
   |-LastName
   |-NickName
   |-Address
   |-Phone
   \_Record 1
     |-Brad (hard link to ../FirstName)
     |-Conroy (hard link to ../LastName)
     |-technosaurus (hard link to ../NickName)
     }-...
The problem with this method is that it gets exponentially slower with each additional field because each entry has to be checked to see if it is the right field.

Code: Select all

for ENTRY in $somedir; do
[ "$FIELD" -ef "$ENTRY" ] && return "$ENTRY"
done
So only use this method if you have a large number of records with a small number of fields or if the max number of records/data is more important than the speed.
Hi.

Why am I associating zip or lzip with your idea? :) It came by itself! :)
Like in: unzip -> process - re-zip.

Also, way back when, a fixed file of x Kb's was allotted for the db, and
the db was structured any which way wthin that Kb allotment.

Don't pay attention, I'm just thinking out loud.

BFN.

musher0

Re: Stuffkeeper (suggested by smokey)

Posted: Sat 14 Mar 2015, 06:47
by smokey01
This link still works.
ftp://ftp.br.debian.org/pclinuxos/pclin ... 10.src.rpm
Pelo wrote:Stuffkeeper (suggested by smokey)
I will check it, link seems died.
Death everywhere, since a long time,.. How many Linux programs left our world without any care. :( :x :cry: :!:
Ghost web sites were not cleant due lack of time , so many Puppies to born, like Barbie dolls.
Tellico installed ! yes. (see above)

Posted: Mon 16 Mar 2015, 14:04
by Moose On The Loose
musher0 wrote: Why am I associating zip or lzip with your idea? :) It came by itself! :)
Like in: unzip -> process - re-zip.
Also with a squashed and layered file system, you could make the changes live in a different file system than the archived version. This way, you can make it so that if the system goes down at any point the most you lose is one day's work.

Posted: Tue 17 Mar 2015, 03:47
by technosaurus
Moose On The Loose wrote:
musher0 wrote: Why am I associating zip or lzip with your idea? :) It came by itself! :)
Like in: unzip -> process - re-zip.
Also with a squashed and layered file system, you could make the changes live in a different file system than the archived version. This way, you can make it so that if the system goes down at any point the most you lose is one day's work.
That is the one downside of hard links... they can't span filesystems.

Posted: Wed 18 Mar 2015, 02:55
by slavvo67
I have the stuffkeeper file hanging around, as well if anyone needs it.

Posted: Thu 12 Nov 2015, 22:02
by musher0
Hello everyone.

While waiting for our very own Puppy DB to be written, polished and
published, if you need to organize data, here's a link that you may
find useful, and which is quite interesting generally.

I don't know this person, but I thank him/her warmly for keeping some
very good stuff available. As it happens, (s)he is recommending
PuppyLinux on another page as one of the preferred support OS's to run
legacy apps on DOSBox and/or Wine.

Back to databasing needs, this means that you'll need to install DOSBox
(again, thanks to the DOSBox developer are in order) on your Puppy, but
it may be worth your while. Some of the database applications listed on
the manmrk page haven't been replicated and cannot be found to this day
on any other platform, even ours. This includes xbase, nanobase,
wampum, and any manner of collection that you can imagine, from
addresses to invoices to stamps to StarTrek to videos, etc.

Enjoy! :)

musher0

Posted: Sun 15 Nov 2015, 01:20
by tallboy
Thank you, musher0, looks very interesting.

tallboy

Posted: Tue 24 Nov 2015, 14:15
by rockedge
wow ...nice link. I learned dBase way way back when Hard drives in a PC did not exist. Dual 5.6 floppies with MS-DOS running off of drive A:

I recently installed DosBox on a high end Mac OSX machine for a machine tool company that uses to this day a MS-DOS database system A4V7RT. Funny thing is how fast DosBox runs this database on Puppy Linux. Blazes...but printing is a little challenging, the database itself when copied to DosBox virtual drive ran immediately. The client was ecstatic...the company has used this database since the 80's and after finally giving up the DOS machine after years of use and a final breakdown. Company upgraded the machines to Apple Mac, the advice of some IT firm. When the owner realized the true and tried database did not work he searched for somebody to get the thing going. I just happened on the case after none of the pros came up with a solution and told them there is a way...very inexpensive called DosBox....

Posted: Tue 24 Nov 2015, 14:49
by musher0
Hi rockedge.

Nice success story!

Yeah, although DOSBox was initially meant to keep old DOS games running,
it's doing a great job with the more serious stuff, too.

BFN.

musher0

Posted: Tue 24 Nov 2015, 17:03
by tlchost
Not trying to hijack the thread...but it seems there may be some folks on the forum that are old enough to remember a CP/M then DOS based flat file database called DataStar(InfoStar) made by MicroPro(The WordStar folks).

There was a 16 bit DOS version that should run under DOS-BOX, and you can do a lot with the application....If anyone has it, I'd love to experiment with it under DOS-Box in Puppy.

Posted: Tue 24 Nov 2015, 17:35
by amigo
Even better, throw together a nice bash program which would do the same...

Posted: Tue 24 Nov 2015, 18:32
by musher0
tlchost wrote:Not trying to hijack the thread...but it seems there may be some folks on the forum that are old enough to remember a CP/M then DOS based flat file database called DataStar(InfoStar) made by MicroPro(The WordStar folks).

There was a 16 bit DOS version that should run under DOS-BOX, and you can do a lot with the application....If anyone has it, I'd love to experiment with it under DOS-Box in Puppy.
Hi tichost!

I don't know about your DataStar/InfoStar, but DataPerfect is still
available! :) (And I still can't understand any of it!) :(

BFN.

musher0

Posted: Tue 24 Nov 2015, 20:00
by starhawk
@ tlchost -- try these --

https://winworldpc.com/product/micropro-datastar

...and, for CP/M-80 (3rd link down under "Text")...

http://pcsauro.altervista.org/CPM.PHP