SlideShare a Scribd company logo
1 of 15
PSG COLLEGE OF TECHNOLOGY
Open Source DBMS Lab Report
R.H.S.BHARADWAJA
13Z245
BE-CSE-G1
Introduction to SQLite
 SQLite is a relational database management system contained in a
C programming library.
 In contrast to other database management systems, SQLite is not
implemented as a separate process that a client program running
in another process accesses. Rather, it is part of the using
program.
 SQLite is ACID-compliant and implements most of the SQL
standard, using a dynamically and weakly typed SQL syntax that
does not guarantee the domain integrity.[5]
 SQLite is a popular choice as embedded database for local/client
storage in application software such as web browsers.
 It is arguably the most widely deployed database engine, as it is
used today by several widespread browsers, operating systems,
and embedded systems, among others.[6]
SQLite has bindings to
many programming languages.
HISTORY
 D. Richard Hipp designed SQLite in the spring of 2000 while
working for General Dynamics on contract with the United States
NavY.
 Hipp was designing software used aboard guided missile
destroyers, which were originally based on HP-UX with an IBM
Informix database back-end.
 The design goals of SQLite were to allow the program to be
operated without installing a database management system or
requiring a database administrator.
 Hipp based the syntax and semantics on PostgreSQL 6.5
documentation.
 In August 2000, version 1.0 of SQLite was released, with storage
based on gdbm (GNU Database Manager). SQLite 2.0 replaced
gdbm with a custom B-tree implementation, adding support for
transactions. SQLite 3.0, was later developed by america online
adding manifest typing feature.
DESIGN
 Unlike client–server database management systems, the SQLite
engine has no standalone processes with which the application
program communicates.
 Instead, the SQLite library is linked in and thus becomes an
integral part of the application program.
 The library can also be called dynamically.
 The application program uses SQLite's functionality through
simple function calls, which reduce latency in database access:
function calls within a single process are more efficient than inter-
process communication.
 SQLite stores the entire database (definitions, tables, indices, and
the data itself) as a single cross-platform file on a host machine.
 It implements this simple design by locking the entire database
file during writing.
 SQLite read operations can be multitasked, though writes can
only be performed sequentially.
 SQLite uses PostgreSQL as a reference platform. “What would
PostgreSQL do”, is used to make sense of the SQL standard.
 One major deviation is that, with the exception of primary keys,
SQLite does not enforce type checking; the type of a value is
dynamic and not strictly constrained by the schema.
SYNTAX AND PURPOSE
SQLite Statements
All the SQLite statements start with any of the keywords like SELECT,
INSERT, UPDATE, DELETE, ALTER, DROP, etc., and all the statements
end with a semicolon (;).
SQLite ANALYZE Statement:
SYNTAX:
ANALYZE database_name.table_name;
OR
ANALYZE
OR
ANALYZE database_name
The ANALYZE command gathers statistics about tables and indices and
stores the collected information in internal tables of the database.
PURPOSE AND QUERY:
If no arguments are given, all attached databases are analyzed. If a
database name is given as the argument, then all tables and indices in
that one database are analyzed. If the argument is a table name, then
only that table and the indices associated with that table are analyzed.
If the argument is an index name, then only that one index is analyzed.
SQLite CREATETABLE Statement:
CREATE TABLE table_name(column1datatype,column2datatype,.......columnndatatype
PRIMARY KEY( one or more columns ));
Output:
PURPOSE AND QUERY:
The "CREATE TABLE" command is used to create a new table in an SQLite
database. A CREATE TABLE command specifies the following attributes of the
new table:
 The name of the new table.
 The database in which the new table is created. Tables may be created
in the main database, the temp database, or in any attached database.
 The name of each column in the table.
 The declared type of each column in the table.
 A default value or expression for each column in the table.
 Optionally, a PRIMARY KEY for the table. Both single column and
composite (multiple column) primary keys are supported.
SQLite ALTER TABLE Statement:
ALTER TABLE table_name ADDCOLUMN column_def...;
OUTPUT:
PURPOSE AND QUERY:
The ADD COLUMN syntax is used to add a new column to an existing
table. The new column is always appended to the end of the list of
existing columns. The column-def rule defines the characteristics of the
new column. The new column may take any of the forms permissible in
a CREATE TABLE statement, with the following restrictions:
 The column may not have a PRIMARY KEY or UNIQUE constraint.
 The column may not have a default value of CURRENT_TIME,
CURRENT_DATE, CURRENT_TIMESTAMP, or an expression in
parentheses.
 If a NOT NULL constraint is specified, then the column must have
a default value other than NULL.
SQLite DROP TABLE Statement:
Syntax:
Basic syntax of DROP TABLE statement is as follows. You can optionally
specify database name along with table name as follows:
DROP TABLE database_name.table_name;
Example:
Let us first verify COMPANY table and then we would delete it from the database.
sqlite>.tables
COMPANY test.COMPANY
This means COMPANY table is available in the database, so let us drop it as follows:
sqlite>DROPTABLECOMPANY;
sqlite>
Now, if you would try .TABLES command then you will not find COMPANY table anymore:
sqlite>.tables
sqlite>
PURPOSE AND QUERY:
 The DROP TABLE statement removes a table added with the
CREATE TABLE statement. The name specified is the table name.
 The dropped table is completely removed from the database
schema and the disk file. The table can not be recovered.
 All indices and triggers associated with the table are also deleted.
SQLite INSERT INTO Statement:
Syntax:
INSERT INTO table_name VALUES ( value1, value2....valueN);
OUTPUT:
PURPOSE AND QUERY:
 When inserting records into a table using the SQLite INSERT
statement, you must provide a value for every NOT NULL column.
 You can omit a column from the SQLite INSERT statement if the
column allows NULL values.
SQLite SELECT Statement:
SYNTAX:
SELECT * from table_name
Or
SELECT column1, column2....columnN FROM table_name;
OUTPUT:
PURPOSE AND QUERY:
 The SQLite SELECT statement is used to retrieve records from one
or more tables in SQLite.
 This SQLite SELECT example joins two tables together to gives us a
result set that displays the employee_id, last_name, and title
fields where the employee_id value matches in both the
employees and positions table. The results are sorted by title in
ascending order.
SQLite VACUUM Statement:
 The VACUUM command cleans the main database by copying its
contents to a temporary database file and reloading the original
database file from the copy.
 This eliminates free pages, aligns table data to be contiguous, and
otherwise cleans up the database file structure.
The VACUUM command may change the ROWID of entries in tables
that do not have an explicit INTEGER PRIMARY KEY.
The VACUUM command only works on the main database. It is not
possible to VACUUM an attached database file.
The VACUUM command will fail if there is an active transaction.
The VACUUM command is a no-op for in-memory databases.
As the VACUUM command rebuilds the database file from scratch,
VACUUM can also be used to modify many database-specific
configuration parameters.
Manual VACUUM
Following is simple syntax to issue a VACUUM command for the whole database from
command prompt:
$sqlite3 database_name "VACUUM;"
You can run VACUUM from SQLite prompt as well as follows:
sqlite> VACUUM;
You can also run VACUUM on a particular table as follows:
sqlite> VACUUM table_name;
BUILT IN FUNCTIONS IN SQLITE
A function that is available through a simple reference and specification
of arguments in a given higher-level programming language. Also
known as built-in procedure; intrinsic procedure; standard function.
SQLite has many built-in functions for performing processing on string or numeric
data. Following is the list of few useful SQLite built-in functions and all are case in-
sensitivewhich means you can use these functions either in lower-case form or in
upper-case or in mixed form. For more details, you can check official
documentation for SQLite:
S.N. Function & Description
1
SQLite COUNT Function
The SQLite COUNT aggregate function is used to count the number of rows
in a database table.
2
SQLite MAX Function
The SQLite MAX aggregate function allows us to select the highest
(maximum) value for a certain column.
3
SQLite MIN Function
The SQLite MIN aggregate function allows us to select the lowest (minimum)
value for a certain column.
4
SQLite SUM Function
The SQLite SUM aggregate function allows selecting the total for a numeric
column.
5
SQLite UPPER Function
The SQLite UPPER function converts a string into upper-case letters.
S.N. Function & Description
6
SQLite LOWER Function
The SQLite LOWER function converts a string into lower-case letters.
7
SQLite LENGTH Function
The SQLite LENGTH function returns the length of a string.
SQLite MAX Function
SYNTAX:
SELECT max( expression ) FROM tables WHERE conditions;
Example - With Single Expression
Let's look at some SQLite max function examples and explore how to use the max
function in SQLite.
For example, you might wish to know how the maximum salary of all employees.
SELECT max(salary) AS "HighestSalary"
FROMemployees;
In this max function example, we've aliased the max(salary) expression as
"HighestSalary".
SQLite UPPER Function:
The SQLite UPPER function converts a string into upper-caseletters.
The SQLite upper function converts all characters in the specified string
to uppercase. If there are characters in the string that are not letters,
they are unaffected by this function
SYNTAX:
“upper( string )”
Example:
Let's look at some SQLite upper function examples and explore how to
use the upper function in SQLite.
For example:
sqlite> SELECT upper('TechOnTheNet.com');
Result: 'TECHONTHENET.COM'
sqlite> SELECT upper('Techonthenet.com is as easy as 123.');
Result: 'TECHONTHENET.COM IS AS EASY AS 123.'
sqlite> SELECT upper(' Totn ');
Result: ' TOTN '
APPLICATIONS
A few of the better-known users of SQLite are shown below in
alphabetical order. There is no complete list of projects and companies
that use SQLite. SQLite is in the public domain and so many groups use
SQLite in their projects without ever telling us.
Adobe uses SQLite as the application file
format for their Photoshop Lightroom
product. SQLite is also a standard part of
the Adobe Integrated Runtime (AIR). It is
reported that Acrobat Reader also uses
SQLite.
Apple uses SQLite for many functions
within Mac OS X, including Apple Mail,
Safari, and in Aperture. Apple uses SQLite
in the iPhone and in the iPod touch and in
iTunes software.
The increasingly popular Dropbox file
archiving and synchronization service is
reported to use SQLite as the primary data
store on the client side.
Itis known that Google uses SQLite in their
Desktop for Mac, in Google Gears, in the Android
cell-phone operating system, and in the Chrome
Web Browser. Peopleare suspicious that Google
uses SQLite for lots of other things that we do
not know about yet. Engineers at Google have
made extensive contributions to the full-text
search subsystemwithin SQLite.
McAfee uses SQLite in its antivirus programs.
Mentioned here and implied here.
Itcan be inferred fromtraffic on the SQLite
mailing list that at least one group within
Microsoftis using SQLite in the development of a
game program. No word yet if this game has
actually been released or if they are still using
SQLite.
There are multiple sightings of SQLite in the
Skypeclient for Mac OS X and Windows.

More Related Content

What's hot

What's hot (17)

Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
 
Oracle SQL Part 3
Oracle SQL Part 3Oracle SQL Part 3
Oracle SQL Part 3
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Mysql database
Mysql databaseMysql database
Mysql database
 
View, Store Procedure & Function and Trigger in MySQL - Thaipt
View, Store Procedure & Function and Trigger in MySQL - ThaiptView, Store Procedure & Function and Trigger in MySQL - Thaipt
View, Store Procedure & Function and Trigger in MySQL - Thaipt
 
View & index in SQL
View & index in SQLView & index in SQL
View & index in SQL
 
Working with Databases and MySQL
Working with Databases and MySQLWorking with Databases and MySQL
Working with Databases and MySQL
 
SQL Server Views
SQL Server ViewsSQL Server Views
SQL Server Views
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
Introduction to embedded sql for NonStop SQL
Introduction to embedded sql for NonStop SQLIntroduction to embedded sql for NonStop SQL
Introduction to embedded sql for NonStop SQL
 
Sql views
Sql viewsSql views
Sql views
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
Oracle DBA interview_questions
Oracle DBA interview_questionsOracle DBA interview_questions
Oracle DBA interview_questions
 
Lab2 ddl commands
Lab2 ddl commandsLab2 ddl commands
Lab2 ddl commands
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 

Viewers also liked

Viewers also liked (12)

Ict kelompok 6
Ict kelompok 6Ict kelompok 6
Ict kelompok 6
 
Articles fr reflexions theoriques_5
Articles fr reflexions theoriques_5Articles fr reflexions theoriques_5
Articles fr reflexions theoriques_5
 
ExxonMobil and the Petroleum Industry
ExxonMobil and the Petroleum IndustryExxonMobil and the Petroleum Industry
ExxonMobil and the Petroleum Industry
 
Variable aleatoria
Variable aleatoriaVariable aleatoria
Variable aleatoria
 
Flipping the classroom2.0
Flipping the classroom2.0Flipping the classroom2.0
Flipping the classroom2.0
 
05.05 Assignment_Rafay
05.05 Assignment_Rafay05.05 Assignment_Rafay
05.05 Assignment_Rafay
 
La « classe » en pédagogie des Mathématiques - Caleb Gattegno
La « classe » en pédagogie des Mathématiques - Caleb GattegnoLa « classe » en pédagogie des Mathématiques - Caleb Gattegno
La « classe » en pédagogie des Mathématiques - Caleb Gattegno
 
mac os (overview)
mac os (overview)mac os (overview)
mac os (overview)
 
7.09 presentation PSA's Save Lives
7.09 presentation PSA's Save Lives7.09 presentation PSA's Save Lives
7.09 presentation PSA's Save Lives
 
Chemistry XI - Koloid
Chemistry XI - KoloidChemistry XI - Koloid
Chemistry XI - Koloid
 
ExxonMobil and the Petroleum Industry
ExxonMobil and the Petroleum IndustryExxonMobil and the Petroleum Industry
ExxonMobil and the Petroleum Industry
 
Hero honda rural_initiatives
Hero honda rural_initiativesHero honda rural_initiatives
Hero honda rural_initiatives
 

Similar to Sq lite (20)

Introduction4 SQLite
Introduction4 SQLiteIntroduction4 SQLite
Introduction4 SQLite
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
 
Relational Database Language.pptx
Relational Database Language.pptxRelational Database Language.pptx
Relational Database Language.pptx
 
Database testing
Database testingDatabase testing
Database testing
 
Cursors, triggers, procedures
Cursors, triggers, proceduresCursors, triggers, procedures
Cursors, triggers, procedures
 
Sqlite
SqliteSqlite
Sqlite
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
Android sq lite-chapter 22
Android sq lite-chapter 22Android sq lite-chapter 22
Android sq lite-chapter 22
 
Dms 22319 micro project
Dms 22319 micro projectDms 22319 micro project
Dms 22319 micro project
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
 
Postgresql
PostgresqlPostgresql
Postgresql
 
My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
 
MSSQL_Book.pdf
MSSQL_Book.pdfMSSQL_Book.pdf
MSSQL_Book.pdf
 

Recently uploaded

Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一F La
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxBoston Institute of Analytics
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 

Recently uploaded (20)

Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 

Sq lite

  • 1. PSG COLLEGE OF TECHNOLOGY Open Source DBMS Lab Report R.H.S.BHARADWAJA 13Z245 BE-CSE-G1
  • 2. Introduction to SQLite  SQLite is a relational database management system contained in a C programming library.  In contrast to other database management systems, SQLite is not implemented as a separate process that a client program running in another process accesses. Rather, it is part of the using program.  SQLite is ACID-compliant and implements most of the SQL standard, using a dynamically and weakly typed SQL syntax that does not guarantee the domain integrity.[5]  SQLite is a popular choice as embedded database for local/client storage in application software such as web browsers.  It is arguably the most widely deployed database engine, as it is used today by several widespread browsers, operating systems, and embedded systems, among others.[6] SQLite has bindings to many programming languages. HISTORY  D. Richard Hipp designed SQLite in the spring of 2000 while working for General Dynamics on contract with the United States NavY.  Hipp was designing software used aboard guided missile destroyers, which were originally based on HP-UX with an IBM Informix database back-end.  The design goals of SQLite were to allow the program to be operated without installing a database management system or requiring a database administrator.  Hipp based the syntax and semantics on PostgreSQL 6.5 documentation.
  • 3.  In August 2000, version 1.0 of SQLite was released, with storage based on gdbm (GNU Database Manager). SQLite 2.0 replaced gdbm with a custom B-tree implementation, adding support for transactions. SQLite 3.0, was later developed by america online adding manifest typing feature. DESIGN  Unlike client–server database management systems, the SQLite engine has no standalone processes with which the application program communicates.  Instead, the SQLite library is linked in and thus becomes an integral part of the application program.  The library can also be called dynamically.  The application program uses SQLite's functionality through simple function calls, which reduce latency in database access: function calls within a single process are more efficient than inter- process communication.  SQLite stores the entire database (definitions, tables, indices, and the data itself) as a single cross-platform file on a host machine.  It implements this simple design by locking the entire database file during writing.  SQLite read operations can be multitasked, though writes can only be performed sequentially.  SQLite uses PostgreSQL as a reference platform. “What would PostgreSQL do”, is used to make sense of the SQL standard.  One major deviation is that, with the exception of primary keys, SQLite does not enforce type checking; the type of a value is dynamic and not strictly constrained by the schema.
  • 4. SYNTAX AND PURPOSE SQLite Statements All the SQLite statements start with any of the keywords like SELECT, INSERT, UPDATE, DELETE, ALTER, DROP, etc., and all the statements end with a semicolon (;). SQLite ANALYZE Statement: SYNTAX: ANALYZE database_name.table_name; OR ANALYZE OR ANALYZE database_name The ANALYZE command gathers statistics about tables and indices and stores the collected information in internal tables of the database. PURPOSE AND QUERY: If no arguments are given, all attached databases are analyzed. If a database name is given as the argument, then all tables and indices in that one database are analyzed. If the argument is a table name, then only that table and the indices associated with that table are analyzed. If the argument is an index name, then only that one index is analyzed.
  • 5. SQLite CREATETABLE Statement: CREATE TABLE table_name(column1datatype,column2datatype,.......columnndatatype PRIMARY KEY( one or more columns )); Output: PURPOSE AND QUERY: The "CREATE TABLE" command is used to create a new table in an SQLite database. A CREATE TABLE command specifies the following attributes of the new table:  The name of the new table.  The database in which the new table is created. Tables may be created in the main database, the temp database, or in any attached database.  The name of each column in the table.  The declared type of each column in the table.  A default value or expression for each column in the table.  Optionally, a PRIMARY KEY for the table. Both single column and composite (multiple column) primary keys are supported.
  • 6. SQLite ALTER TABLE Statement: ALTER TABLE table_name ADDCOLUMN column_def...; OUTPUT: PURPOSE AND QUERY: The ADD COLUMN syntax is used to add a new column to an existing table. The new column is always appended to the end of the list of existing columns. The column-def rule defines the characteristics of the new column. The new column may take any of the forms permissible in a CREATE TABLE statement, with the following restrictions:  The column may not have a PRIMARY KEY or UNIQUE constraint.  The column may not have a default value of CURRENT_TIME, CURRENT_DATE, CURRENT_TIMESTAMP, or an expression in parentheses.  If a NOT NULL constraint is specified, then the column must have a default value other than NULL.
  • 7. SQLite DROP TABLE Statement: Syntax: Basic syntax of DROP TABLE statement is as follows. You can optionally specify database name along with table name as follows: DROP TABLE database_name.table_name; Example: Let us first verify COMPANY table and then we would delete it from the database. sqlite>.tables COMPANY test.COMPANY This means COMPANY table is available in the database, so let us drop it as follows: sqlite>DROPTABLECOMPANY; sqlite> Now, if you would try .TABLES command then you will not find COMPANY table anymore: sqlite>.tables sqlite> PURPOSE AND QUERY:  The DROP TABLE statement removes a table added with the CREATE TABLE statement. The name specified is the table name.  The dropped table is completely removed from the database schema and the disk file. The table can not be recovered.  All indices and triggers associated with the table are also deleted.
  • 8. SQLite INSERT INTO Statement: Syntax: INSERT INTO table_name VALUES ( value1, value2....valueN); OUTPUT: PURPOSE AND QUERY:  When inserting records into a table using the SQLite INSERT statement, you must provide a value for every NOT NULL column.  You can omit a column from the SQLite INSERT statement if the column allows NULL values.
  • 9. SQLite SELECT Statement: SYNTAX: SELECT * from table_name Or SELECT column1, column2....columnN FROM table_name; OUTPUT: PURPOSE AND QUERY:  The SQLite SELECT statement is used to retrieve records from one or more tables in SQLite.  This SQLite SELECT example joins two tables together to gives us a result set that displays the employee_id, last_name, and title fields where the employee_id value matches in both the employees and positions table. The results are sorted by title in ascending order.
  • 10. SQLite VACUUM Statement:  The VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy.  This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure. The VACUUM command may change the ROWID of entries in tables that do not have an explicit INTEGER PRIMARY KEY. The VACUUM command only works on the main database. It is not possible to VACUUM an attached database file. The VACUUM command will fail if there is an active transaction. The VACUUM command is a no-op for in-memory databases. As the VACUUM command rebuilds the database file from scratch, VACUUM can also be used to modify many database-specific configuration parameters. Manual VACUUM Following is simple syntax to issue a VACUUM command for the whole database from command prompt: $sqlite3 database_name "VACUUM;" You can run VACUUM from SQLite prompt as well as follows: sqlite> VACUUM; You can also run VACUUM on a particular table as follows: sqlite> VACUUM table_name;
  • 11. BUILT IN FUNCTIONS IN SQLITE A function that is available through a simple reference and specification of arguments in a given higher-level programming language. Also known as built-in procedure; intrinsic procedure; standard function. SQLite has many built-in functions for performing processing on string or numeric data. Following is the list of few useful SQLite built-in functions and all are case in- sensitivewhich means you can use these functions either in lower-case form or in upper-case or in mixed form. For more details, you can check official documentation for SQLite: S.N. Function & Description 1 SQLite COUNT Function The SQLite COUNT aggregate function is used to count the number of rows in a database table. 2 SQLite MAX Function The SQLite MAX aggregate function allows us to select the highest (maximum) value for a certain column. 3 SQLite MIN Function The SQLite MIN aggregate function allows us to select the lowest (minimum) value for a certain column. 4 SQLite SUM Function The SQLite SUM aggregate function allows selecting the total for a numeric column. 5 SQLite UPPER Function The SQLite UPPER function converts a string into upper-case letters.
  • 12. S.N. Function & Description 6 SQLite LOWER Function The SQLite LOWER function converts a string into lower-case letters. 7 SQLite LENGTH Function The SQLite LENGTH function returns the length of a string. SQLite MAX Function SYNTAX: SELECT max( expression ) FROM tables WHERE conditions; Example - With Single Expression Let's look at some SQLite max function examples and explore how to use the max function in SQLite. For example, you might wish to know how the maximum salary of all employees. SELECT max(salary) AS "HighestSalary" FROMemployees; In this max function example, we've aliased the max(salary) expression as "HighestSalary".
  • 13. SQLite UPPER Function: The SQLite UPPER function converts a string into upper-caseletters. The SQLite upper function converts all characters in the specified string to uppercase. If there are characters in the string that are not letters, they are unaffected by this function SYNTAX: “upper( string )” Example: Let's look at some SQLite upper function examples and explore how to use the upper function in SQLite. For example: sqlite> SELECT upper('TechOnTheNet.com'); Result: 'TECHONTHENET.COM' sqlite> SELECT upper('Techonthenet.com is as easy as 123.'); Result: 'TECHONTHENET.COM IS AS EASY AS 123.' sqlite> SELECT upper(' Totn '); Result: ' TOTN '
  • 14. APPLICATIONS A few of the better-known users of SQLite are shown below in alphabetical order. There is no complete list of projects and companies that use SQLite. SQLite is in the public domain and so many groups use SQLite in their projects without ever telling us. Adobe uses SQLite as the application file format for their Photoshop Lightroom product. SQLite is also a standard part of the Adobe Integrated Runtime (AIR). It is reported that Acrobat Reader also uses SQLite. Apple uses SQLite for many functions within Mac OS X, including Apple Mail, Safari, and in Aperture. Apple uses SQLite in the iPhone and in the iPod touch and in iTunes software. The increasingly popular Dropbox file archiving and synchronization service is reported to use SQLite as the primary data store on the client side.
  • 15. Itis known that Google uses SQLite in their Desktop for Mac, in Google Gears, in the Android cell-phone operating system, and in the Chrome Web Browser. Peopleare suspicious that Google uses SQLite for lots of other things that we do not know about yet. Engineers at Google have made extensive contributions to the full-text search subsystemwithin SQLite. McAfee uses SQLite in its antivirus programs. Mentioned here and implied here. Itcan be inferred fromtraffic on the SQLite mailing list that at least one group within Microsoftis using SQLite in the development of a game program. No word yet if this game has actually been released or if they are still using SQLite. There are multiple sightings of SQLite in the Skypeclient for Mac OS X and Windows.