Primary Key:The PRIMARY KEY constraint is unique to each record in a table. This always allows a field to always contain a value, which means that we cannot insert a new record or update any record without adding a value to this field. Not Null:The NOT NULL constraint is a constraint o column and forces column not to accept NULL values. Hence we can create tables in our database. Not Null (NN), Primary Key (PK), AUTO INCREMENT (AI), UNIQUE (U) are available constraints. There are four constraints are available that we can used on our columns as per our requirement. I have created two columns named as “ id” and “ name” datatype used is INTEGER and TEXT. Here I have given my table as “ user” and by clicking on “ add field” we can add columns to our database. After clicking on create table below interface will open: Let’s start creating table, click on create table highlighted in yellow. Here we can see that we have 0 tables available in our database. After that you will see the below interface. Now select open database and move to the location where we have created our database file with. Now we will create table inside our database. Create Table:We have successfully created our database. Now move to the location where you have chosen to save your database file. for now you may skip that step and close all files. After that a new popup will open & it will ask you to enter your database name (anything) and also to choose file location where you want to save your file (file stored will be in. Open your DB Browser SQLite:Īfter opening DB browser, click on new database. Create Database: If we are working with DB Browser SQLite, that in this case the database file will be created inside our system with. We will learn following operation in details We will learn that how we can perform SQLite database operations from Python. Working with SQLite: The purpose of our this Python SQLite tutorial, to demonstrate how to we can develop Python database applications with the SQLite database. Next Working with SQLite in Python Programming
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |