(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 22 Sep 2020, 16:44
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
cli relational database
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
rufwoof


Joined: 24 Feb 2014
Posts: 3725

PostPosted: Wed 13 Nov 2019, 18:09    Post subject:  cli relational database  

https://spin.atomicobject.com/2019/06/16/unix-cli-relational-database/
_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Wed 13 Nov 2019, 22:08    Post subject:  

In the same line of thought, all Puppies also have sqlite3 and awk.
_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Mon 18 Nov 2019, 20:29    Post subject:  

I'll give this join function a try to see how fast it is:

https://linux.die.net/man/1/join

I want to add md5 sums to the puppy repo data bases.

https://gitlab.com/sc0ttj/Pkg/issues/75#note_246129899

If the join function is fast, then maybe putting this info in a separate table will work well Smile

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4878
Location: Blue Springs, MO

PostPosted: Tue 19 Nov 2019, 23:09    Post subject:  

Reminded me of this old thread
http://www.murga-linux.com/puppy/viewtopic.php?t=86146
Where I demonstrated 1 way to use your filesystem as a database using only a shell script... just a proof of concept

_________________
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 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Wed 20 Nov 2019, 00:09    Post subject:  

s243a wrote:
I'll give this join function a try to see how fast it is:

https://linux.die.net/man/1/join

I want to add md5 sums to the puppy repo data bases.

https://gitlab.com/sc0ttj/Pkg/issues/75#note_246129899

If the join function is fast, then maybe putting this info in a separate table will work well Smile


I was thinking about this and in theory a join command should be fast if the input data is sorted.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Wed 20 Nov 2019, 00:10    Post subject:  

technosaurus wrote:
Reminded me of this old thread
http://www.murga-linux.com/puppy/viewtopic.php?t=86146
Where I demonstrated 1 way to use your filesystem as a database using only a shell script... just a proof of concept


I thought about doing this but to know where near the same degree as you have implemented. I'll have to check this out later Smile

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Wed 20 Nov 2019, 00:39    Post subject:  

As a further thought, I bet you can replace the input files to join with process substitution:
Code:

<<(....)

http://tldp.org/LDP/abs/html/process-sub.html

and if you do this then the input files don't necessarily need to be text files. The input files to the join utility could actually be the output from different databases queries or alternatively we could have a custom binary file that has similar properties to a database such as fast searching and filtering capabilities.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
gcav


Joined: 25 May 2012
Posts: 105
Location: Ontario

PostPosted: Mon 16 Dec 2019, 20:29    Post subject: One of the first NoSQL's...  

NoSQL RDBMS

NoSQL is a shell-level relational database management system
for UNIX. Unlike most DBMS'es, NoSQL is not a single large program,
rather it is a set of small programs that are run from the shell.
This allows the user to utilize the full power of the UNIX shell
in coordination with NoSQL.

It uses the Operator/Stream DBMS paradigm described in "Unix
Review", March, 1991, page 24, entitled "A 4GL Language".
There are a number of "operators" that each perform a unique
function on the data. The "stream" is suplied by the UNIX
Input/Output redirection mechanism. Therefore each operator
processes some data and then passes it along to the next
operator via the UNIX pipe function. This tends to be rather
efficient as UNIX pipes are implemented in memory. NoSQL is
compliant with the "Relational Model". Read the document
"4gl.ps", included with the distribution, for further details.
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Mon 16 Dec 2019, 20:42    Post subject:  

Is this it?
http://www.strozzi.it/cgi-bin/CSA/tw7/I/en_US/NoSQL/Home%20Page

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Mon 16 Dec 2019, 21:12    Post subject:  

musher0 wrote:
Is this it?
http://www.strozzi.it/cgi-bin/CSA/tw7/I/en_US/NoSQL/Home%20Page


Thankyou for this gcav and musher0. I'm going to have to give it a try Smile

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2806
Location: UK

PostPosted: Wed 18 Dec 2019, 16:23    Post subject:  

NoSql tutorial: http://www.troubleshooters.com/lpm/200704/200704.htm
---

Also see this post about csvsql from the csvkit package: https://stackoverflow.com/a/44177446/5479837

And there is Miller: https://github.com/johnkerl/miller

Ans also something really cool called VisiData: https://visidata.org/

(I went to a workshop with the guy who made VisiData, he showed it off, it's great!)

Helpful link of theory of joins, unions etc, in shell: http://matt.might.net/articles/sql-in-the-shell/

_________________
Pkg, mdsh, Woofy, Akita, VLC-GTK, Search
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3475
Location: The Blue Marble

PostPosted: Wed 18 Dec 2019, 21:37    Post subject:  

Thanks for sharing the good find. Really appreciate it. Very Happy
_________________
Fatdog64 forum links: Latest version | Contributed packages | ISO builder
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1352

PostPosted: Thu 19 Dec 2019, 18:37    Post subject:  

https://rbql.org/
Quote:
...provides SQL-like language for data-transformation and data-analysis queries for structured data (like CSV or TSV files). RBQL query is executed using one of the available general-purpose "backend" languages (currently Python or JavaScript). RBQL allows to use non-SQL expressions inside SQL statements, e.g for JavaScript backend...

_________________
Fatdog64-810|+Packages|Kodi|gtkmenuplus
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Fri 20 Dec 2019, 06:48    Post subject:  

Thank you sc0ttman, VisiData seems like a real gem!
VisiData's author wrote:
I live in Seattle but the terminal is my home.
And that says a lot!
_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Fri 20 Dec 2019, 11:50    Post subject:  

Hello all.

I've been reading the VisiData docs. What's a "panda" ?
Not the black and white vegetarian bear, I suppose!
First time I've seen this word used in a data context.

TIA

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.1136s ][ Queries: 12 (0.0113s) ][ GZIP on ]