YAML files
- Like JSON, YAML is also collection of name value pairs
<name>: <value>
- If the value is of primitive type (text/number/boolean) we can directly write
- boolean in yaml can also be yes or no in addition to true/false
name: 'andy'
age: 27
online: yes
- If the value is a list or an object. Lets see list example
courses:
- python
- Django
- Flask
- DataScience
address:
building: Nilgiri Block
number: 209
landmark: Ameerpet Metro
SQLite3
- SQLite is a software library that provides a relational dbms. The lite in SQLlite means lightweight in terms of setup, database administration and required resources
- Download and install sqllite
- Download sqlite studio Refer Here
- pythons standard library for sqllite Refer Here
- For create table query Refer Here
- Create a products table
CREATE TABLE IF NOT EXISTS products (
id integer PRIMARY KEY,
name text NOT NULL,
price real NOT NULL,
quantity int
)
CREATE TABLE IF NOT EXISTS sales (
id integer PRIMARY KEY,
product_id integer,
quantity integer,
created_date text NOT NULL,
FOREIGN KEY (product_id) REFERENCES products(id)
)
- Refer Here for the sample code written to create tables from python
Like this:
Like Loading...