Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #197090

sqlite database

From Cousin Stanley <cousinstanley@gmail.com>
Newsgroups linux.debian.user
Subject sqlite database
Date 2018-07-01 19:20 +0200
Message-ID <w6OaZ-4Xf-5@gated-at.bofh.it> (permalink)
Organization Hohum Acres

Show all headers | View raw


  As an alternative to client-server database managers,
  such as mysql, mariadb, postgresql, etc. ,
  the  sqlite  embedded database manager is very useful .... 

    https://en.wikipedia.org/wiki/SQLite
    sqlite - wikipedia

    https://sqlite.org
    sqlite - home page

    https://sqlite.org/cli.html
    sqlite - command line interface

    http://zetcode.com/db/sqlite/
    sqlite - zetcode tutorial


  sqlite is readily available from the debian repositories .... 

    $ apt show sqlite3

    $ sudo apt install sqlite3

    $ apt policy sqlite3


    # create a database and a database table

      $ sqlite3 /tmp/atest.sql3
        sqlite> create table lookup
        ...> (
        ...>   id    integer ,
        ...>   value text
        ...> ) ;
       sqlite>
       sqlite> -- insert some data --
       sqlite>
       sqlite> insert into lookup( id , value ) values( 1 , 'line 1' ) ; 
       sqlite> insert into lookup( id , value ) values( 2 , 'line 2' ) ; 
       sqlite> insert into lookup( id , value ) values( 3 , 'line 3' ) ; 
       sqlite>
       sqlite> -- turn on column mode and headers --
       sqlite>
       sqlite> .mode columns
       sqlite> .headers on
       sqlite>
       sqlite> -- query the database --
       sqlite>
       sqlite> select id , value from lookup ;
       id          value
       ----------  ----------
       1           line one
       2           line two
       3           line tre
  

-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

sqlite database Cousin Stanley <cousinstanley@gmail.com> - 2018-07-01 19:20 +0200
  Re: sqlite database deloptes <deloptes@gmail.com> - 2018-07-01 22:30 +0200
    Re: sqlite database <tomas@tuxteam.de> - 2018-07-01 22:40 +0200
    Re: sqlite database Joe <joe@jretrading.com> - 2018-07-01 22:40 +0200
      Re: sqlite database David Wright <deblis@lionunicorn.co.uk> - 2018-07-02 01:10 +0200
        Re: sqlite database Joe <joe@jretrading.com> - 2018-07-02 11:30 +0200
          Re: sqlite database David Wright <deblis@lionunicorn.co.uk> - 2018-07-02 19:10 +0200
            Re: sqlite database Joe <joe@jretrading.com> - 2018-07-02 19:50 +0200
              Re: sqlite database David Wright <deblis@lionunicorn.co.uk> - 2018-07-02 21:10 +0200
            Re: sqlite database deloptes <deloptes@gmail.com> - 2018-07-02 20:00 +0200
              Re: sqlite database David Wright <deblis@lionunicorn.co.uk> - 2018-07-02 21:10 +0200
                Re: sqlite database Greg Wooledge <wooledg@eeg.ccf.org> - 2018-07-02 21:30 +0200
                Re: sqlite database Joe <joe@jretrading.com> - 2018-07-02 21:50 +0200
                Re: sqlite database David Wright <deblis@lionunicorn.co.uk> - 2018-07-03 18:20 +0200

csiph-web