Wikibooks: Ict-innovation/LPI/105.3

= 105.3 SQL Data Management = Candidates should be able to query databases and manipulate data using basic SQL commands. This objective includes performing queries involving joining of 2 tables and/or subselects. Key Knowledge Areas Use of basic SQL commands. Perform basic data manipulation. The Str...

Full description

Bibliographic Details
Format: Book
Language:English
Subjects:
DML
Online Access:https://en.wikibooks.org/wiki/Ict-innovation/LPI/105.3
Description
Summary:= 105.3 SQL Data Management = Candidates should be able to query databases and manipulate data using basic SQL commands. This objective includes performing queries involving joining of 2 tables and/or subselects. Key Knowledge Areas Use of basic SQL commands. Perform basic data manipulation. The Structured Query Language (SQL) is a database management programming language. SQL is a tool for accessing databases and more specifically relational databases and can be used with different database products. This chapter will prepare you to learn basic database management using this language. = Common SQL Implementations for Linux = Some of the more common choices in Linux include the following MySQL This SQL Implementation is owned by Suns and is released under the GPL. Most major Linux distributions will include MySQL in their package databases. PostgreSQL Released under the BSD license PostgreSQL was evolved from Ingres software. (PostgreSQL= post Ingres SQL). It’s available as multiple packages in most Linux distributions. SQLite – To implement SQL as a library you need SQLite. SQLite is intended to provide users and programs a way to store data using a SQL interface within the program. SQLite3 can be used to manipulate SQLite databases for major Linux distros. SQL Basics SQL is used to access relational databases. Each database contains more or less tables which in turn contain more or less rows and columns. Hereby a single row is seen as a separate object with features represented by the tables columns. To access a table s data you first have to connect to its database. 1. mysql u USERNAME p PASSWORD 2. use DATABASE = Basic SQL Commands = SELECT A SELECT statement retrieves zero or more rows from one or more database tables or database views. In most applications SELECT is the most commonly used Data Manipulation Language (DML) command. As SQL is a declarative programming language SELECT queries specify a result set but do not specify how to calculate it. The database translates the query into a query plan ...