Posts

SQL Queries Basic

Image
 SQL Queries Basic Tasks to accomplish with Todos table. Inserting database table(Todos) of below schema. Insert Query: insert into todos (title, description, priority, complete) values ('Go to store', 'To pick up eggs', 4, False);   insert into todos (title, description, priority, complete) values ('Haircut', 'Need to get length 1mm', 3, False) adding one record at a time. Until have all records inserted. Select Query: select * from todos; * -> Means all row and columns from table. select title from todos; -> for displaying only title column information. select title, description from todos; -> multi column selection at a time. It help to select column for display. Where clause: select * from todos where priority=5; It help to filter records by using condition. Update clause: update todos set complete=Ture where id=5; you have to filter the record for updating specific column of that record. update todos set complete=True where title='Learn...

SQLite3 Terminal installation in Windows

Image
 SQLite3 Terminal installation go to website named: www.sqlite.org Go to download tab to list of all versions of software for windows. Go to precompiled Binaries for Windows: Select win32-x86 version of the software for installation in your laptop. As this version will have everything in a bundle and will allow you to have all functionality of this software. Now extract the folder for software. After extraction please paste the folder in C drive of your system. Now rename the extracted folder to sqlite3. Set it's path in system environment. Modify it in system variable so that it will be available for all users in your windows. Else you can go for User environment modification under path variable. Verify installation by using cmd.

SQL Database Introduction and base files for coding

Image
 SQL Database Introduction Database Organized collection of structured information of data, which is stored in a computer system. The data can be easily accessed The data can be modified The data can be controlled and organized Many databases use a structured query language(SQL) to modify and write data Data can be related to just about any object. For example, a user on an application may have: Name Age Email Password A database is a collection of data Since data, on its own, is just data. A database allows management of this data Databases are organized in how data can be retrieved, stored and modified There are many types of Database Management Systems (DBMS) Some of the databases are: SQLite MySQL Postgres There are many more. SQL Pronounced either as S-Q-L or "See Quel" Standard language for dealing with relational databases SQL can be used to do different things with the database records: (CRUD) Create Read Update Delete Create and Install Database File We need to downl...

Project 3 overview

Image
 Project 3 Project three we will be switching our focus to TODOS instead of BOOKS New information will include: Full SQL Database SQLite - simple easy and embedded database application Postgres - Production RDBMS MySQL - Production RDBMS Authentication - by using JWT (able to create users with username and password for login) Authorization - Roles and Responsibilities according to user type. Hashing Passwords Creating a Todo Table We will create new TODO Table Models for our application We will be using these Todos to save records throughout this project. Architectural diagram for it:

Status Codes | HTTP Exceptions | Explicit Status Code Responses

Image
 Status Codes An HTTP Status Code is used to help the Client (the user or system submitting data to the server) to understand what happened on the server side application. Status Codes are international standards on how a Client/Server should handle the result of a request. It allows everyone who sends a request to know if their submission was successful or not. Status Codes Series and their meanings: 2xx Successful Status Codes: 4xx Client Errors Status Codes: 5xx Server Status Codes: There are many more error codes which can find and can understand their meanings above one are the most common one. HTTP Exceptions Here we will use HTTP Exception package to highlight the error of file not found and will terminate the application. Code: from fastapi import FastAPI , Path , Query , HTTPException from books3 import Book from datavalidatorhelper import BookRequest app = FastAPI () BOOKS = [     Book ( id = 1 , title = "DSA with Java" ,        ...