Cara Mengunduh & Menginstal SQLite on Windows

โšก Ringkasan Cerdas

SQLite delivers a lightweight, serverless database engine that runs across Windows, Linux, dan macOS. This walkthrough explains how to download installer packages, set up the command-line shell, install a graphical manager, and build a sample database.

  • ๐Ÿ”˜ Installation Package: Resmi SQLite packages support Windows, Linux, macOS, Windows Phone 8, .NET, and source code distributions.
  • โ˜‘๏ธ CLP Tool: The Command-Line Program ships as sqlite3.exe, enabling database creation, schema management, and SQL execution from a terminal.
  • โœ… Sample Database: A TutorialsSampleDB schema with Departments, Students, Tests, and Marks demonstrates foreign keys and seed data.
  • ๐Ÿงช GUI Manager: SQLite Studio is a portable, open-source manager that imports and exports CSV, HTML, PDF, and JSON.
  • ๏ธ Lintas Platform: Precompiled binaries for Linux, Mac OS X, .NET, and Windows Runtime support broad deployment scenarios.

Cara Mengunduh dan Menginstal SQLite

SQLite offers many installation packages depending on the operating system. It also provides APIs for a wide range of programming languages.

Unduh & Pasang SQLite Penginstal Paket

Paket instalasi tersedia untuk Windows 10 pengguna:

Dari SQLite situs resmi, open the download section. The following screenshot shows the different SQLite installation packages for Windows:

Download dan Install SQLite

Program shell baris perintah:

Paket unduhan yang disorot disebut Program Baris Perintah (CLP). CLP is a command line application that lets you access the SQLite database management system and all the features of SQLite. Dengan menggunakan CLP, Anda dapat membuat dan mengelola SQLite database, and it is the tool used throughout this walkthrough.

  • DLL 32-bit (x86): Itu SQLite database system core library for x86 platforms.
  • DLL 64-bit (x64): Itu SQLite database system core library for x64 platforms.

Menginstal Program Baris Perintah (CLP) pada mesin Anda

The following steps show how to install the Command-Line Program (CLP) on your machine:

Langkah 1) Download the highlighted package from the previous image to your PC. It is a zip file.

Langkah 2) Extract the zip file. You will find sqlite3.exe in the extracted folder, as shown below:

Menginstal Program Baris Perintah

Langkah 3) Open My Computer, and double-click partition "C" untuk menavigasi ke sana:

Menginstal Program Baris Perintah

Langkah 4) Create a new directory named sqlite:

Menginstal Program Baris Perintah

Langkah 5) Copy sqlite3.exe into it. This is the executable used to run SQLite pertanyaan:

Menginstal Program Baris Perintah

There are additional packages for different purposes. They are not required, but you might need them on operating systems other than Windows. You can obtain the Linux atau versi Mac OS SQLite sesuai kebutuhan.

You can also fetch the documentation or source code from the same page. APIs are available for Windows Phone 8, .NET, and other bahasa pemrograman.

Here are some additional packages for different purposes:

  • Sumber Code and alternative Source Code Formats โ€“ the complete source that makes up SQLite.
  • The documentation โ€“ SQLite documentation as HTML pages. It is the same online documentation, but downloadable so you can read it offline.
  • Biner yang telah dikompilasi untuk Linux.
  • Biner yang telah dikompilasi untuk Mac OS X (x86).
  • Biner yang telah dikompilasi sebelumnya untuk Windows Phone 8 โ€“ SDK and components for building Windows Phone 8 applications that use SQLite database.
  • Biner yang telah dikompilasi sebelumnya untuk Windows Runtime โ€“ SDK and components for building Windows Runtime applications that connect to SQLite database.
  • Precompiled Binaries for .NET โ€“ a set of DLLs and .NET libraries that you can use from .NET applications to connect to SQLite database.

SQLite Studio โ€“ Manajer dan Administrasi

Banyak SQLite management tools make working with SQLite databases easier. Instead of creating and managing databases from a command line, these tools provide a graphical interface for database creation and administration.

SQLite Studio: a portable application that does not require an installation. It supports both SQLite3 dan SQLite2. You can easily import and export data to formats such as CSV, HTML, PDF, and JSON. It is open source and supports Unicode.

SQLite Studio - Manajer dan Administrasi

Memperkenalkan Contoh Database

The following steps create the sample database that is referenced throughout the series:

Langkah 1) Buka berkas teks dan tempel perintah berikut ke dalamnya:

CREATE TABLE [Departments] (
    [DepartmentId] INTEGER  NOT NULL PRIMARY KEY,
    [DepartmentName] NVARCHAR(50)  NULL
);
INSERT INTO Departments VALUES(1, 'IT');
INSERT INTO Departments VALUES(2, 'Physics');
INSERT INTO Departments VALUES(3, 'Arts');
INSERT INTO Departments VALUES(4, 'Math');

CREATE TABLE [Students] (
    [StudentId] INTEGER  PRIMARY KEY NOT NULL,
    [StudentName] NVARCHAR(50) NOT NULL,
    [DepartmentId] INTEGER  NULL,
    [DateOfBirth] DATE NULL,
    FOREIGN KEY(DepartmentId) REFERENCES Departments(DepartmentId)
);
INSERT INTO Students VALUES(1, 'Michael', 1, '1998-10-12');
INSERT INTO Students VALUES(2, 'John', 1, '1998-10-12');
INSERT INTO Students VALUES(3, 'Jack', 1, '1998-10-12');
INSERT INTO Students VALUES(4, 'Sara', 2, '1998-10-12');
INSERT INTO Students VALUES(5, 'Sally', 2, '1998-10-12');
INSERT INTO Students VALUES(6, 'Jena', NULL, '1998-10-12');
INSERT INTO Students VALUES(7, 'Nancy', 2, '1998-10-12');
INSERT INTO Students VALUES(8, 'Adam', 3, '1998-10-12');
INSERT INTO Students VALUES(9, 'Stevens', 3, '1998-10-12');
INSERT INTO Students VALUES(10, 'George', NULL, '1998-10-12');

CREATE TABLE [Tests] (
    [TestId] INTEGER NOT NULL PRIMARY KEY,
    [TestName] NVARCHAR(50) NOT NULL,
    [TestDate] DATE NULL
);
INSERT INTO [Tests] VALUES(1, 'Mid Term IT Exam', '2015-10-18');
INSERT INTO [Tests] VALUES(2, 'Mid Term Physics Exam', '2015-10-23');
INSERT INTO [Tests] VALUES(3, 'Mid Term Arts Exam', '2015-10-10');
INSERT INTO [Tests] VALUES(4, 'Mid Term Math Exam', '2015-10-15');

CREATE TABLE [Marks] (
    [MarkId] INTEGER NOT NULL PRIMARY KEY,
    [TestId] INTEGER NOT NULL,
    [StudentId] INTEGER  NOT NULL,
    [Mark] INTEGER  NULL,
    FOREIGN KEY(StudentId) REFERENCES Students(StudentId),
    FOREIGN KEY(TestId) REFERENCES Tests(TestId)
);

INSERT INTO Marks VALUES(1, 1, 1, 18);
INSERT INTO Marks VALUES(2, 1, 2, 20);
INSERT INTO Marks VALUES(3, 1, 3, 16);
INSERT INTO Marks VALUES(4, 2, 4, 19);
INSERT INTO Marks VALUES(5, 2, 5, 14);
INSERT INTO Marks VALUES(6, 2, 7, 20);
INSERT INTO Marks VALUES(7, 3, 8, 20);
INSERT INTO Marks VALUES(8, 3, 9, 20);

Langkah 2) Simpan file sebagai TutorialsSampleDB.sql di direktori Bahasa Indonesia: C:\sqlite.

Langkah 3) Buka Windows Command Line tool (cmd.exe) from the Start menu by typing cmd dan menekan Enter.

Langkah 4) It opens in the default path, so navigate to the Bahasa Indonesia: C:\sqlite folder created earlier by running the command cd โ€œC:\sqliteโ€:

Memperkenalkan Contoh Database

Langkah 5) Jalankan perintah berikut:

sqlite3 TutorialsSampleDB.db < TutorialsSampleDB.sql

The command should complete successfully with no output, as shown in the following screenshot:

Memperkenalkan Contoh Database

Langkah 6) The database file TutorialSampleDB.db now appears in the directory Bahasa Indonesia: C:\sqlite:

Memperkenalkan Contoh Database

Pertanyaan Umum Demo Slot

Nomor SQLite ships as a portable zip archive. You simply extract sqlite3.exe and copy it to any folder such as C:\sqlite. No installer or elevated privileges are required, which makes SQLite easy to deploy in restricted environments.

The CLP is a command-line shell for running SQL statements directly against a database file. SQLite Studio is a graphical manager that lets you browse tables, edit data, and import or export to CSV, JSON, HTML, and PDF formats.

Yes. Modern AI coding assistants can produce SQLite DDL from a plain English description. They generate CREATE TABLE statements, suggest column types, add primary and foreign keys, and propose indexes. You should still review the output for correctness before running it in production.

AI assistants analyze SQL syntax errors, suggest EXPLAIN QUERY PLAN improvements, and rewrite slow queries. They identify missing indexes, recommend join order changes, and explain unexpected results from joins or aggregates, helping developers resolve issues much faster than manual inspection.

Any folder works, but C:\sqlite is a common convention. Placing the executable in a dedicated folder makes it easy to manage database files alongside the binary, and you can add the folder to PATH so sqlite3 is available from any command prompt.

Ringkaslah postingan ini dengan: