Puppy Database

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#136 Post 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)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#137 Post 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.
Attachments
manager.sh.gz
gunzip and make executable
(1.92 KiB) Downloaded 271 times
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

Pelo

KDE 3.5.7 sfs (sfs4) needed for Tellico

#138 Post 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.
Last edited by Pelo on Tue 24 Nov 2015, 16:19, edited 8 times in total.

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#139 Post by dejan555 »

Nothing wrong with that
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

Pelo

Tellico again (with some help from developers)

#140 Post by Pelo »

Tellico ok under tahrpup ( Sfs KDE loaded on the fly).
Last edited by Pelo on Sat 07 Feb 2015, 10:53, edited 3 times in total.

Pelo

Stuffkeeper (suggested by smokey)

#141 Post 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)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#142 Post 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.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#143 Post 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
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

Re: Stuffkeeper (suggested by smokey)

#144 Post 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)

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

#145 Post 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.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#146 Post 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.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#147 Post by slavvo67 »

I have the stuffkeeper file hanging around, as well if anyone needs it.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#148 Post 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
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#149 Post by tallboy »

Thank you, musher0, looks very interesting.

tallboy
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#150 Post 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....

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#151 Post 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
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#152 Post 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.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#153 Post by amigo »

Even better, throw together a nice bash program which would do the same...

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#154 Post 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
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#155 Post 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

Post Reply