Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 15 Dec 2017, 04:38
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Puppy Database
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 10 of 18 [267 Posts]   Goto page: Previous 1, 2, 3, ..., 8, 9, 10, 11, 12, ..., 16, 17, 18 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4764
Location: Kingwood, TX

PostPosted: Wed 28 Jan 2015, 02:54    Post subject:  

Here is some FYI on using your filesystem as a database:

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

-{ 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 github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2798
Location: Montenegro

PostPosted: Wed 28 Jan 2015, 03:45    Post subject:  

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.
manager.sh.gz
Description  gunzip and make executable
gz

 Download 
Filename  manager.sh.gz 
Filesize  1.92 KB 
Downloaded  194 Time(s) 

_________________
puppy.b0x.me stuff mirrored HERE or HERE
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Wed 28 Jan 2015, 06:55    Post subject: KDE 3.5.7 sfs (sfs4) needed for Tellico
Subject description: dejan i am only a poor user, not a developer
 

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, 12:19; edited 8 times in total
Back to top
View user's profile Send private message Yahoo Messenger 
dejan555


Joined: 30 Nov 2008
Posts: 2798
Location: Montenegro

PostPosted: Wed 28 Jan 2015, 06:57    Post subject:  

Nothing wrong with that
_________________
puppy.b0x.me stuff mirrored HERE or HERE
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Wed 28 Jan 2015, 12:49    Post subject: Tellico again (with some help from developers)  

Tellico ok under tahrpup ( Sfs KDE loaded on the fly).
_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.

Last edited by Pelo on Sat 07 Feb 2015, 06:53; edited 3 times in total
Back to top
View user's profile Send private message Yahoo Messenger 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Wed 28 Jan 2015, 12:53    Post subject: Stuffkeeper (suggested by smokey)  

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. Sad Mad Crying or Very sad Exclamation
Ghost web sites were not cleant due lack of time , so many Puppies to born, like Barbie dolls.
Tellico installed ! yes. (see above)

_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
technosaurus


Joined: 18 May 2008
Posts: 4764
Location: Kingwood, TX

PostPosted: Fri 13 Mar 2015, 19:30    Post subject:  

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:
\_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:
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 github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 11274
Location: Gatineau (Qc), Canada

PostPosted: Fri 13 Mar 2015, 23:52    Post subject:  

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:
\_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:
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? Smile It came by itself! Smile
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
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2659
Location: South Australia

PostPosted: Sat 14 Mar 2015, 02:47    Post subject: Re: Stuffkeeper (suggested by smokey)  

This link still works.
ftp://ftp.br.debian.org/pclinuxos/pclinuxos/srpms/SRPMS.pclos/stuffkeeper-0.12.0-2pclos2010.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. Sad Mad Crying or Very sad Exclamation
Ghost web sites were not cleant due lack of time , so many Puppies to born, like Barbie dolls.
Tellico installed ! yes. (see above)

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 773

PostPosted: Mon 16 Mar 2015, 10:04    Post subject:  

musher0 wrote:

Why am I associating zip or lzip with your idea? Smile It came by itself! Smile
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.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4764
Location: Kingwood, TX

PostPosted: Mon 16 Mar 2015, 23:47    Post subject:  

Moose On The Loose wrote:
musher0 wrote:

Why am I associating zip or lzip with your idea? Smile It came by itself! Smile
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 github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
slavvo67

Joined: 12 Oct 2012
Posts: 1436
Location: The other Mr. 305

PostPosted: Tue 17 Mar 2015, 22:55    Post subject:  

I have the stuffkeeper file hanging around, as well if anyone needs it.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11274
Location: Gatineau (Qc), Canada

PostPosted: Thu 12 Nov 2015, 18:02    Post subject:  

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! Smile

musher0

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 821
Location: Oslo, Norway

PostPosted: Sat 14 Nov 2015, 21:20    Post subject:  

Thank you, musher0, looks very interesting.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 429
Location: Connecticut, United States

PostPosted: Tue 24 Nov 2015, 10:15    Post subject:  

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....
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 10 of 18 [267 Posts]   Goto page: Previous 1, 2, 3, ..., 8, 9, 10, 11, 12, ..., 16, 17, 18 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1711s ][ Queries: 14 (0.0206s) ][ GZIP on ]