PSQL: Syntax reference:
  • SQL: by name is Structured Query Language is a programming language, than a protocol, used in the communications between  clients and  servers.
    It is an ANSI (American National Standards Institute) standard which can query and retrieve data from a database. The database vendors adhere to this standards.
  • SQL provides a abstract view of data stored in the databases.
  • SQL client does not have to know how the data is organized in order to access it.  
  • Database Relational Model : The relational data model are based on the tuples, meaning unordered sets of known values with names.
    a=apple, b=banana, c=citrus
    a=axis, b= branch , c=cat.
    a=answer, b =boy, c= cow
    a b c
    apple banana citrus
    axis branch cat
    answer boy cow

    In the above three columns and rows, the contents have have some analytical or logical relationship. Usually a row contains a set of adjacent-fields which would represent properties of an item.

    First-name Last-Name Age
    John Doe 45
    Jane Lee 21
    Peter Pan 12

     In the above setup, each field in a column has logical pattern or arrangements, where as each field in a row has phenotypic relation. Each row collectively called a record and  segregated from another row with a rule of separation.

  • SQL is non procedural language: Unlike C/C++, Java or PHP , SQL is declarative and non-procedural language
  • A Virtual Table or View is a representation of actual table. : SQL language creates a temporary table with the data stored in a base table
Due to this relationship, emp1 table can't add any other values besides the ones used in dept -no attribute of dept table.

SQL Sandards :

Both ANSI and the ISO/IEC have accepted SQL as the standard language for relational databases.