Kim Kardashian
Kim Kardashian

Reputation: 91

How to download and run sqlite3 on windows ? I need to use it with ruby on rails

Im trying to install Ruby on Rails on my Windows 10 PC. for this is also want sqlite3 So I downloaded a precompiled binary for Windows, from https://www.sqlite.org/download.html The downloaded zip contains only a sqlite3.dll and sqlite3.def file. There is no sqlite3.exe file. So how can I make sqlite3 run on windows ?

    C:\sqlite3>dir
    Volume in drive C is Windows-SSD
    Volume Serial Number is FCBE-9AF1

    Directory of C:\sqlite3

   27-03-2022  09:09    <DIR>          .
   27-03-2022  09:09    <DIR>          ..
   27-03-2022  08:53             6,391 sqlite3.def
   27-03-2022  08:53         2,450,432 sqlite3.dll
                  2 File(s)      2,456,823 bytes
                  2 Dir(s)  185,646,313,472 bytes free

   C:\sqlite3>sqlite3 --vesion
   'sqlite3' is not recognized as an internal or external command,
operable program or batch file.

How can I use the def and dll on windows ? Or how can i get sqlite3 exe ?

Upvotes: 2

Views: 2966

Answers (1)

Wisblade
Wisblade

Reputation: 1644

SQlite isn't a database engine running as a service, like MySQL. It's only a DLL, you link it to your program, you use the required primitives to open a database (a .db file) and only then you can send SQL to the engine.

SQlite is indeed way more evolved than a typed binary file, but it's not designed to be a shared database for multiple simultaneous clients. It's a way to save data to a "private" file and manipulate it very easily with SQL requests instead of seek, read and write system calls (plus a bunch of tricks to find data within the file). Obviously, this ease-of-use is at the cost of raw performances: you won't read data from SQlite at the same speed as a low-level file access. But you don't choose to use a local database for that, too.

Upvotes: 1

Related Questions