Day 1: Introduction to SQLite

🎯 Objective

Learn what SQLite is, why it’s useful, and how to use it. By the end of this lesson, you will have created your first SQLite database!


What is SQLite? πŸ“¦βœ¨

SQLite is a database, which is like a container for storing and organizing information.

πŸ› οΈ What Makes SQLite Special?

  • 🚫 No server needed: Unlike other databases, SQLite doesn’t need extra software or servers.
  • πŸ“‚ All in one file: Everything is saved in a single file on your device.
  • 🌟 Easy to use: Perfect for beginners and small projects.

Why Use SQLite? βœ…πŸŽ‰

  1. πŸ› οΈ Simple: Just download it and start using it.
  2. πŸ“ Lightweight: Small but powerful.
  3. 🚚 Portable: Easily move the database file anywhere.
  4. ⚑ Fast: Ideal for small to medium-sized tasks.

Where Is SQLite Used? 🌍

  • πŸ“± Mobile Apps: Stores data like app settings or game progress.
  • 🌐 Web Browsers: Chrome and Firefox use SQLite for saving history and bookmarks.
  • πŸ› οΈ Smart Devices: Found in smart TVs, washing machines, and other devices.

What is SQL? πŸ’¬βœ¨

SQL stands for Structured Query Language, the language used to talk to databases.

Here’s what you can do with SQL:

  • 🧐 Ask questions: “Show me the list of students in a class.”
  • βž• Add new data: “Add a new student to the database.”
  • ✏️ Update data: “Change a student’s phone number.”
  • ❌ Delete data: “Remove a student from the list.”

Hands-On Activity πŸ–οΈπŸ’»

Let’s set up SQLite and create your first database!

Step 1: Download SQLite πŸ“₯

For Windows 10 Follow the Steps :

  1. Press Win + R, type msinfo32, and hit Enter.

2) Look for System Type:
If it says x86-based PC, your system is 32-bit.
If it says x64-based PC, your system is 64-bit.

So My System says x64-based PC, My system is 64-bit.

3) Visit the official SQLite website.

4) For 64-bit Windows (x64)> Right Click sqlite-tools-win64-3480000.zip> Save into D:\ (or) E:\ your choice


5) Extract the Folder as per below screen


6) Right Click the following folder Rename it named sqlite

7) Now Folder Path : d:\sqlite

8) Now Press Windows Key + S > Type environ

9) Click Here Edit the System Environment Variable

10)Click Here Environment Variables


11) Click Path 12) Click Edit

13) Click New

14) Enter D:\sqlite > Click OK in Edit Environment Variable Screen

15) Again OK in Environment Variables Screen
16) Again OK in System Properties Window

17) Now Press Win Key + R (to Open Run Window)

18)To Check SQLite Installation βœ… :
Type CMD and Press Enter or Click OK to Open Command Prompt

19) Now Type: sqlite3 in Command Prompt
If you see sqlite> you’ve installed SQLite successfully! πŸŽ‰
to Exit SQLite by typing: .exit

20) To Create Your First Database πŸ“‚

  • Now Create a New Folder named mydb in D:\ or E:\ or F:\ your choice any drive

21) Now go to command prompt >

22) Next Enter sqlite3 myschool.db (This line create the Database)

23)
To Create Table follow the steps;;

sqlite> create table students(id,name,age); (Press Enter)

To Insert Records
sqlite> insert into students(id,name,age) values(101,’Raja’,20); (Press Enter)

sqlite> insert into students(id,name,age) values(102,’Kumar’,21);

To View Records

sqlite> select * from students;


Key Points to Remember 🧠✨

  • SQLite is a simple, portable database system that works without a server.
  • It’s lightweight and perfect for small projects like apps or personal data.
  • SQL is the language we use to give instructions to the database.

πŸŽ‰ By the end of today, you’ve created your first SQLite database. Great job! Keep practicing and exploring more about SQLite!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *