Monday, March 10, 2025

#8.0 SQLite Installation

 Installing SQLite depends on your operating system. Hereโ€™s how to install it on Windows, macOS, and Linux.


๐Ÿ–ฅ๏ธ Windows

Step 1: Download SQLite

  1. Go to the official SQLite download page:
    ๐Ÿ‘‰ https://www.sqlite.org/download.html
  2. Scroll to the section "Precompiled Binaries for Windows".
  3. Download: https://www.sqlite.org/2025/sqlite-tools-win-x64-3490100.zip
    • (SQLite  +Tools  +  DLL ) 

Step 2: Extract and Setup

  1. Extract the SQLite Tools ZIP file into d:\sqlite (or any folder of your choice).
  2. Copy the full path of the extracted folder (e.g., d:\sqlite).

Step 3: Add to System PATH

  1. Open Start Menu and search for "Environment Variables".
  2. Click Edit the system environment variables.
  3. Under System Properties, click Environment Variables.
  4. In System variables, select Path โ†’ Click Edit.
  5. Click New, paste the path (d:\sqlite), and click OK.

Step 4: Verify Installation

  1. Open Command Prompt (cmd).
  2. Type:
    sqlite3
    
  3. You should see:
    SQLite version X.X.X
    Enter ".help" for usage hints.
    sqlite>
    
    If you see this, SQLite is installed successfully!

๐Ÿ macOS

Option 1: Install via Homebrew (Recommended)

  1. Open Terminal and run:
    brew install sqlite
    
  2. Verify the installation:
    sqlite3 --version
    
    If it returns a version number, SQLite is installed.

Option 2: Install Manually

  1. Download the macOS binary from SQLite Download Page.
  2. Extract and move it to /usr/local/bin:
    sudo mv sqlite3 /usr/local/bin/
    
  3. Set permissions:
    chmod +x /usr/local/bin/sqlite3
    
  4. Verify:
    sqlite3 --version
    

๐Ÿง Linux (Ubuntu, Debian, Fedora, etc.)

Install via Package Manager

For Ubuntu/Debian:

sudo apt update
sudo apt install sqlite3 libsqlite3-dev -y

For Fedora:

sudo dnf install sqlite sqlite-devel -y

For Arch Linux:

sudo pacman -S sqlite

Verify Installation

sqlite3 --version

If you see a version number, SQLite is installed successfully.


๐ŸŽฏ Next Steps

Now that SQLite is installed, you can:

  • Create a database:
    sqlite3 mydatabase.db
    
  • Create tables and insert data:
    CREATE TABLE employees (
        empid INTEGER PRIMARY KEY AUTOINCREMENT,
        name TEXT NOT NULL,
        email TEXT UNIQUE
    );
    INSERT INTO employees (name, email) VALUES ('John Doe', 'john@example.com');
    
  • View data:
    SELECT * FROM employees;
    

You're ready to use SQLite! ๐Ÿš€ Let me know if you need help.

No comments:

Post a Comment

#11 @Output

  Understanding @Output() in Angular 19 The @Output() decorator in Angular 19 is used to send data from a child component to a parent co...