[HN Gopher] SQLite-Web: Web-based SQLite database browser writte...
       ___________________________________________________________________
        
       SQLite-Web: Web-based SQLite database browser written in Python
        
       Author : thunderbong
       Score  : 155 points
       Date   : 2024-02-08 03:43 UTC (19 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | SeriousM wrote:
       | That looks slick! May I express my feedback: the "content" tab
       | should show the data as grid and maybe have an inline editor.
       | Grid is the ultimate display of table data, at least for me.
       | Thanks for sharing!
        
       | 0x073 wrote:
       | Sad story, database could be native in browsers. Only because
       | every browser adapt the same technology sqlite and w3c said
       | no....
        
         | makapuf wrote:
         | Strange because if every browser adopts sqlite why not let
         | people use it ? W3c will not prevent people using some tech ?
         | Ofc it won't be standard, until it is? Soon, sqlite
         | implementations may even fork and then we would need
         | standardising.
        
         | maxxk wrote:
         | I think that the ultimate result (sqlite-wasm) is better than
         | what Web SQL database could provide. Today you can bundle your
         | own version with your own set of native extensions. In case of
         | standard Web SQL you would be forced to check the version and
         | figure out, is it finally possible to use RETURNING in queries.
        
       | dartharva wrote:
       | Non-IT guy here, can someone explain to me how good/bad of an
       | idea using this simple setup of SQLite + this interface as the
       | core DBMS in a commercial setting would be?
       | 
       | The interfaces I have used in my experience were built in-house
       | over Apache Spark and Microsoft SQL, and always felt
       | overengineered and more complicated than it needed to be. For the
       | record I have learnt data retrieval and analysis only on the job
       | and not from any formal training, apologies if I am missing
       | something fundamental.
        
         | virtue3 wrote:
         | if it's built in house it's probably got some business logic /
         | rules built into it.
         | 
         | This tool wont necessarily know about any specifics about how
         | the database relates to your business.
        
         | ocdtrekkie wrote:
         | SQLite can start to show weaknesses when you need a bunch of
         | people or processes writing to it at the same time. For small
         | applications or applications where you can tightly control what
         | is talking to it at any given time, SQLite is great. Enterprise
         | products tend to target larger organizations where a more
         | overengineered solution is likely commonly available anyways.
         | 
         | Generally though, I want developers to justify why SQLite isn't
         | good enough for their app before they build on something else.
         | In a lot of cases SQLite absolutely _is_ good enough, and it
         | removes an insane amount of complexity, especially from things
         | like database backups.
        
           | willsmith72 wrote:
           | i tend to lean the other way. postgres is just so easy. with
           | managed db services, you dont have to think about backups,
           | version upgrades, all the rest. you never have to worry about
           | running into a rough edge or missing feature. the maturity
           | and huge community make it hard to go wrong
        
             | tracker1 wrote:
             | Agreed... As soon as you need shared access to multiple
             | systems, PG it is, usually in Docker though if it doesn't
             | need a dedicated instance.
             | 
             | Though I have used Firebird when I needed to scale it
             | support local and remote data before. I don't think Figured
             | gets nearly enough attention.
        
           | tracker1 wrote:
           | I remember really pushing for SQLite for a specific
           | application that used MS SQL... The main data in practice has
           | requirements to be archived by event. And didn't need more
           | than a few dozen users with low transactions in practice.
           | Easy backup, archive etc.
           | 
           | In the end, there was a complex solution with a all the
           | business logic in stored procedures and functions. With a lot
           | of variability and difficulty supporting the application.
           | 
           | This was for a petition verification system. So each petition
           | could have easily fit into a SQLite database. Been portable
           | and easy to archive, backup, transport etc.
           | 
           | But no,. We _had_ to put all the logic in the database...
           | Because integritai...
        
         | input_sh wrote:
         | They have a page for this:
         | https://www.sqlite.org/whentouse.html
        
           | alex_suzuki wrote:
           | From the referenced page:
           | 
           | > SQLite does not compete with client/server databases.
           | SQLite competes with fopen().
        
             | bux93 wrote:
             | That page also doesn't mention that SQLite can act as a
             | gateway drug.
             | 
             | Store stuff in SQLite now, and use a RDBMS later when it
             | makes sense.
        
               | HPsquared wrote:
               | Similar to MS Access.
        
         | tracker1 wrote:
         | Well, there's Turso and Cloudflare D2 as examples of how you
         | can scale SQLite in practice.
         | 
         | In terms of a simple API over SQLite, it will depend on the
         | number of users, the overhead and the cache ability of tall
         | data in practice.
         | 
         | If you have a heavy transactional load, it may not go so well.
         | Similarly, any service may be better implemented in a single
         | connection with seriously requests, which will limit this but
         | reduce complexity.
         | 
         | Realistically, PostgreSQL in Docker is pretty much my baseline
         | for a shared database server. If other systems really need to
         | access it, it's going to be the easier path.
         | 
         | Even Firebird would likely be a better option for many lower
         | end use cases where a shared service is needed.
        
         | c16 wrote:
         | From my experience on a fun project, it's fine for running your
         | website, but if you need to edit data as values update, pulling
         | down the db, making changes then uploading the DB will
         | obviously not do. You'll need some sort of web interface like
         | phpliteadmin; and if you're not running php well now you are.
         | Unless you want to use a docker image, and now you're using
         | docker.
         | 
         | I wish there was a real simple way to connect to a remote db
         | like you do with postgres.
        
           | radiator wrote:
           | if you can SSH into the remote server where the .sqlite
           | database is saved, then you can do anything can't you?
           | Including editing the data without down/uploading the whole
           | DB. Perhaps also make use of sshfs, if you want to use a GUI
           | installed on your workstation.
        
         | adius wrote:
         | We think SQLite in a commercial setting is perfect and that's
         | why we built https://airsequel.com. A full fledged SQLite
         | hosting platform with an automatic GraphQL API, cloud
         | functions, dashboards, ... We totally agree that most
         | enterprise software is too complicated for "normal" businesses.
         | Those tools were often developed by the biggest fish for their
         | outsized problems.
        
           | toadlytoad wrote:
           | I think you think wrong.
        
       | rcarmo wrote:
       | This uses peewee, which is probably the nicest ORM I've ever used
       | anywhere.
        
       | IshKebab wrote:
       | I guess if you _need_ a web-based solution this looks nice.
       | Otherwise SQLiteStudio is definitely better.
        
       | koffiezet wrote:
       | This is something I was actually looking for a while ago and
       | settled for a linuxserver's docker image running vnc and
       | sqlitebrowser to inspect some databases on my homelab, which felt
       | like an unsatisfying solution - this looks a like a much nicer,
       | better and more lightweight solution.
        
       | ceeam wrote:
       | Any advantages over phpliteadmin, for example?
        
         | reacweb wrote:
         | hello, at work, I am not admin. I have developed a small flask
         | site using sqlite. Always using commandline was painful. I have
         | considered phpliteadmin, but this requires many tasks for
         | installation. My boss would not understand that I spend half a
         | day on this. I have discovered SQLite-web today. It took me
         | less than a minute to use it. This is exactly what I was
         | looking for.
        
           | tracker1 wrote:
           | I'd suggest spending a little time with Docker and compose..
           | even in small, single server applications it helps a lot to
           | smooth out application deployments.
           | 
           | It will reduce friction in practice.
        
       | lgxz wrote:
       | Suggestion: toggle to show/hide the sidebar (the table list) to
       | give more space for table contents.
        
       | creatonez wrote:
       | Here's one that works entirely clientside via Webassembly -
       | https://sqliteviewer.app/
       | 
       | Upload your bloated firefox `places.sqlite` and select
       | `moz_places` and it loads it without a hitch... if you trust the
       | website not to steal your browsing history.
       | 
       | Unfortunately sqliteviewer.app is not open source. This one
       | (https://inloop.github.io/sqlite-viewer/) is, though. But it uses
       | a JS reimplementation of sqlite rather than true sqlite in WASM.
        
         | hiccuphippo wrote:
         | Since it's webassembly, I wonder if it can be made to work
         | completely on the client with something like Orca
         | (https://orca-app.dev/) so you don't even need to trust the
         | website.
        
           | Snapstromegon wrote:
           | It already works completely clientside. The page makes no
           | requests to the server after putting your DB into it.
        
             | hiccuphippo wrote:
             | I meant without the browser as its own client. How can you
             | be sure the page won't change and upload your db the next
             | time you use it?
        
         | throwaway4aday wrote:
         | What about the official project?
         | https://sqlite.org/wasm/doc/trunk/index.md
        
         | allknowingfrog wrote:
         | I've had success using sql.js (https://sql.js.org) for small,
         | hobby projects. It's just SQLite compiled to WASM. They have a
         | link to an online demo at the top of the homepage, which may be
         | the exact tool that you're hoping for.
        
       | AriedK wrote:
       | Another great browser for SQLite - DB Browser for SQLite (DB4S)
       | project (https://github.com/sqlitebrowser/sqlitebrowser). An
       | amazing piece of software for interacting with SQLite databases.
       | Supports inspecting and modifying data, full query support,
       | integrated plotting functions.
        
       | adius wrote:
       | If you're interested in hosting your SQLite databases online for
       | sharing, collaboration, and as the backbone of your apps, please
       | check out https://airsequel.com. We've been working on it for the
       | last 2 years and our next release is going to be the 1.0! Let me
       | know what you think
        
       | zellyn wrote:
       | I usually just spin up datasette (hi, simonw) for this, although
       | this looks prettier in a "they just used bootstrap" kinda way
       | (not that I'm denigrating that... it made all our internal tools
       | at work look really nice for years!).
       | 
       | datasette's origin story orients it towards readonly access, and
       | it is strictly and overwhelmingly more powerful in that regard,
       | due to the 139 and growing plugins. The 46 (according to the
       | website) associated tools that datasette has should work equally
       | well with any sqlite-related tooling.
       | 
       | Also, datasette's completely automatic faceting (if your data is
       | sane-ish) is really nice.
       | 
       | Hmmm. They're both Python... maybe they should unite, Voltron
       | style! :-)
        
       | dkatz23238 wrote:
       | I think something like this for Duckb would also be amazing!
        
       | CyberDildonics wrote:
       | I understand why people want to write in python, but I don't
       | understand why anyone wants to use software written in python if
       | it might be sensitive to latency, performance or interactivity.
        
       | rmorey wrote:
       | Seems similar to Datasette: https://datasette.io
       | https://github.com/simonw/datasette/
        
       | jokoon wrote:
       | I don't understand, what's the point of writing this in python?
        
         | LVB wrote:
         | As opposed to? FWIW the author has many Python tools, including
         | a popular ORM (https://github.com/coleifer/peewee)
        
       | joewils wrote:
       | My favorite web-based SQL editor and browser:
       | https://www.adminer.org
       | 
       | Single PHP file. Super simple setup and configuration.
        
       ___________________________________________________________________
       (page generated 2024-02-08 23:02 UTC)