SqLite Syntex




SQLite
SQLite
SqLite Syntex

SqLite – A relational databases?

As we already discussed earlior sqlite is a relational database management system.

A relational database management system can have following elements.

  • Database – a collection of related records, organized into tables
  • Table – a set of data elements (values) organized by records (horizontal rows) and fields (vertical columns)
  • Record (or row) – a single, structured data item in a table
  • Field (or column) – a set of data values of a particular simple type, one for each row of the table

Let’s Consider an example to Understand Sqlite database syntex. I say we have a database called School. In the School database we have a table called Student. The Student table contains student information as shown below:

ID          NAME        SURNAME     AGE         ADDRESS
----------  ----------  ----------  ----------  ----------
1           Mark        Benson      21          Cologne
2           July        Tesar       25          Munich
3           John        Mankov      23          Berlin
4           Tom         Muller      30          Hamburg
5           Patrik      Nauer       24          Essen
6           Peter       Borse       32          Manheim
7           Carl        Rossman     36          Stuttgart

The table Student contains information of seven students in seven rows. The Student table also contains five columns. (ID, NAME, SURNAME, AGE, ADDRESS).

SqLite Statements

SqLite statements enables us to interact with the data in the database.For example if we want to Fetch all the data form the table Student, we can write the following statement.

SELECT * FROM Student;

SqLite – case sensitive

SqLite is not case sensitive, and neither is the SQL standard. It’s just common practice to write the commands upper-case.

Now, if we talk about table or column names, then yes they are, but not the commands themselves.

So

SELECT * FROM foo;

is the same as

select * from foo;

but not the same as

select * from FOO;

SqLite – List Of most frequently used keywords in SqLite

  • aggregate functions
  • ALTER TABLE
  • ANALYZE
  • ATTACH DATABASE
  • BEGIN TRANSACTION
  • comment
  • COMMIT TRANSACTION
  • core functions
  • CREATE INDEX
  • CREATE TABLE
  • CREATE TRIGGER
  • CREATE VIEW
  • CREATE VIRTUAL TABLE
  • date and time functions
  • DELETE
  • DETACH DATABASE
  • DROP INDEX
  • DROP TABLE
  • DROP TRIGGER
  • DROP VIEW
  • END TRANSACTION
  • EXPLAIN
  • expression
  • INDEXED BY
  • INSERT
  • keywords
  • ON CONFLICT clause
  • PRAGMA
  • REINDEX
  • RELEASE SAVEPOINT
  • REPLACE
  • ROLLBACK TRANSACTION
  • SAVEPOINT
  • SELECT
  • UPDATE
  • VACUUM
  • WITH clause

Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com





Be the first to comment

Leave a Reply

Your email address will not be published.


*