SQLite study notes REVIEW

Disclaimer: This article is a blogger original article, please indicate the source: https://blog.csdn.net/qq_38182125/article/details/89485785

Outline

SQLite study notes part of the total is divided into 7 article about the use of both SQLite, SQLite not to conduct in-depth research. This series of reading notes are derived from two books: "SQLite Definitive Guide" and "SQL must know will be." The content of the following seven articles do a content summary:

  • SQLite study notes (a) : tells the story of what is SQL, how to create, delete, and modify tables, and SQLite data types and frequently used commands.

  • SQLite study notes (b) : The complete form of the SELECT command to do a comprehensive introduction.

  • SQLite study notes (c) : Comparison of the processing functions and built-in SQLite data type and a NULL value is introduced.

  • SQLite study notes (D) : The sub-queries, linking knowledge of multiple tables, aliases, a combination of query results and conditions.

  • SQLite study notes (five) : The INSERT, UPDATE, DELETE, and knowledge constraints.

  • SQLite study notes (VI) : The knowledge views, indexes, triggers, and affairs.

  • SQLite study notes (seven) : explains how to manipulate SQLite database and precautions in the use of some of Android's SQLite and optimization of Java code in Android is recommended.


About examples

All the examples in this series of more than 90% from "must know the SQL will be" a book, all the article data table will be involved as follows:

Products:

prod_id     vend_id     prod_name          prod_price  prod_desc
----------  ----------  -----------------  ----------  --------------------------------------------
BR01        BRS01       8 inch teddy bear  5.99        8 inch teddy bear, comes with cap and jacket
BR02        BRS01       12 inch teddy bea  8.99        12 inch teddy bear, comes with cap and jacke
BR03        BRS01       18 inch teddy bea  11.99       18 inch teddy bear, comes with cap and jacke
BNBG01      DLL01       Fish bean bag toy  3.49        Fish bean bag toy, complete with bean bag wo
BNBG02      DLL01       Bird bean bag toy  3.49        Bird bean bag toy, eggs are not included
BNBG03      DLL01       Rabbit bean bag t  3.49        Rabbit bean bag toy, comes with bean bag car
RGAN01      DLL01       Raggedy Ann        4.99        18 inch Raggedy Ann doll
RYL01       FNG01       King doll          9.49        12 inch king doll with royal garments and cr
RYL02       FNG01       Queen doll         9.49        12 inch queen doll with royal garments and c

Customers:

cust_id     cust_name     cust_address    cust_city   cust_state  cust_zip    cust_country  cust_contact  cust_email    
----------  ------------  --------------  ----------  ----------  ----------  ------------  ------------  ---------------------
1000000001  Village Toys  200 Maple Lane  Detroit     MI          44444       USA           John Smith    sales@villagetoys.com
1000000002  Kids Place    333 South Lake  Columbus    OH          43333       USA           Michelle Gre  NULL          
1000000003  Fun4All       1 Sunny Place   Muncie      IN          42222       USA           Jim Jones     jjones@fun4all.com
1000000004  Fun4All       829 Riverside   Phoenix     AZ          88888       USA           Denise L. St  dstephens@fun4all.com
1000000005  The Toy Stor  4545 53rd Stre  Chicago     IL          54545       USA           Kim Howard    NULL          

Orders:

order_num   order_date  cust_id
----------  ----------  ----------
20005       2012-05-01  1000000001
20006       2012-01-12  1000000003
20007       2012-01-30  1000000004
20008       2012-02-03  1000000005
20009       2012-02-08  1000000001

OrderItems:

order_num   order_item  prod_id     quantity    item_price
----------  ----------  ----------  ----------  ----------
20005       1           BR01        100         5.49
20005       2           BR03        100         10.99
20006       1           BR01        20          5.99
20006       2           BR02        10          8.99
20006       3           BR03        10          11.99
20007       1           BR03        50          11.49
20007       2           BNBG01      100         2.99
20007       3           BNBG02      100         2.99
20007       4           BNBG03      100         2.99
20007       5           RGAN01      50          4.49
20008       1           RGAN01      5           4.99
20008       2           BR03        5           11.99
20008       3           BNBG01      10          3.49
20008       4           BNBG02      10          3.49
20008       5           BNBG03      10          3.49
20009       1           BNBG01      250         2.49
20009       2           BNBG02      250         2.49
20009       3           BNBG03      250         2.49

Resources

Finally, attach the source code resources "SQLite Definitive Guide" and "SQL must know will be" e-book resources, and the book:

Links: https://pan.baidu.com/s/1bDFa1_ScGEiwv_2TKS32EQ extraction code: szd2

"SQLite Definitive Guide" official website: https://www.apress.com/cn

"SQL must know will be" site: http://www.forta.com/books/0672336073


In addition, because the author is limited, mistakes are inevitable article appeared, I hope the wing, private letter to me or leave a message in the comments section below the article are possible.

I hope this article to help you ~

Guess you like

Origin blog.csdn.net/qq_38182125/article/details/89485785