Commit a294357
committed
docs(sqlite): add Creating Database in SQLite folder with examples and use cases
What
- Added `Creating Database In SQLite` folder documenting database creation process in SQLite.
- Explained step-by-step commands for creating a new database file.
- Provided examples using SQLite CLI and programmatic approaches (Java, Python).
- Included notes on SQLite’s file-based architecture.
Why
- SQLite is widely used in embedded systems, mobile apps (Android, iOS), and lightweight desktop applications.
- Developers new to SQLite often need clear instructions on creating and connecting to databases.
- Establishing a solid foundation in database creation helps in schema design, data management, and application integration.
How
- Documented creation via CLI:
- `sqlite3 mydatabase.db;`
- Demonstrated table creation post database initialization:
- `CREATE TABLE students (id INTEGER PRIMARY KEY, name TEXT, age INTEGER);`
- Showed programmatic creation:
- Java (JDBC `DriverManager.getConnection("jdbc:sqlite:mydb.db")`).
- Python (`sqlite3.connect("mydb.db")`).
- Highlighted SQLite’s zero-configuration and single-file nature.
Key notes
- SQLite automatically creates a database file if it does not exist.
- No need for a separate server process; DB is stored as a `.db` or `.sqlite` file.
- Use `:memory:` for in-memory databases (temporary and fast).
- Portable and lightweight, making it ideal for testing and small-to-medium apps.
Real-life applications
- Mobile apps (WhatsApp, Android apps) for local storage.
- Desktop apps storing user preferences.
- Prototyping or local testing before deploying to production DBMS.
- IoT devices and embedded systems due to small footprint.
Future improvements
- Add schema design best practices when creating a database.
- Document database versioning and migration strategies.
- Explore SQLite extensions (FTS, JSON1) for advanced features.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>1 parent 4f5d5b5 commit a294357
File tree
8 files changed
+0
-0
lines changed- Section28JDBCusingSQLite/Creating Database In SQLite
8 files changed
+0
-0
lines changed
0 commit comments