29 NOV 2019

sql2

We got familiar with Data Base Management System (DBMS) and the Relational Data Base Management System (RDBMS). we explored what is SQL? and what is its purpose. we talked about the difference between SQL and noSQL databases. we downloaded the SQLite DB Browser and created our first DB using SQL queries.

nosql

SQL commands

  • Create Table:
    CREATE TABLE COMPANY(
       ID INT PRIMARY KEY     NOT NULL,
       NAME           TEXT    NOT NULL,
       AGE            INT     NOT NULL,
       ADDRESS        CHAR(50),
       SALARY         REAL
    );
  • Insert Row:
    INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY)
    VALUES (1, 'Paul', 32, 'California', 20000.00 );
  • Update Row(s):
    UPDATE COMPANY SET ADDRESS = 'Texas' WHERE ID = 6;
  • Delete Row(s):
    DELETE FROM COMPANY WHERE ID = 7;

    More SQLite – Tutorials point

sqlite.png

DB browser for SQLite – download link

More topics covered:

  • Advantages of using DBMS
  • Advantages of using RDBMS
  • DB in JSON format   { key : value }
  • DB normalization rules
  • Additional data bases: MySQL, MongoDB, PostgreSQL, etc.
  • noSQL usages
  • Auto Increment
  • Not-Null
  • SQLite data types

Links:

 

Leave a comment