introduction to sql l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Introduction to SQL PowerPoint Presentation
Download Presentation
Introduction to SQL

Loading in 2 Seconds...

play fullscreen
1 / 13

Introduction to SQL - PowerPoint PPT Presentation


  • 279 Views
  • Uploaded on

Introduction to SQL Using MySQL and JDBC Mujtaba Talebi 11/11/2005 The SQL Language Developed in 1970 Created by IBM, Donald D. Chamberlin, Raymond F. Boyce Uses Declarative paradigm – describes a problem rather than defining a solution.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Introduction to SQL' - arleen


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction to sql

Introduction to SQL

Using MySQL and JDBC

Mujtaba Talebi

11/11/2005

the sql language
The SQL Language
  • Developed in 1970
  • Created by IBM, Donald D. Chamberlin, Raymond F. Boyce
  • Uses Declarative paradigm – describes a problem rather than defining a solution.
  • The most popular language used to create, modify, and retrieve data from relational databases.

Applied Computing Technology Laboratory

sql advantages
SQL Advantages
  • Simple and easy to use.
  • There is a diverse array of SQL implementations.
  • Considered to be great for handling very large database needs.

Applied Computing Technology Laboratory

sql disadvantages
SQL Disadvantages
  • Porting SQL code from one major database to another is hard.
  • The SQL standard is large and complex, so most databases do not implement it fully.
  • Some areas of the SQL standards such as semantics are ambiguous.
  • It is possible to get stuck with a system.

Applied Computing Technology Laboratory

sql a true programming language
SQL a true programming language?
  • The debate rages on….
  • We have to ask ourselves, is the language Turing complete?
  • The answer to this question is no.
  • SQL is not a general programming language.
  • SQL is designed specifically to be used with databases.
  • People still argue about this question.

Applied Computing Technology Laboratory

mysql documentation
MySQL Documentation
  • Available here:http://dev.mysql.com/doc/refman/5.0/en/index.html
  • Discusses:
    • History
    • How to install and use
    • Standards compliance (ANSI/ISO)
    • Much more

Applied Computing Technology Laboratory

sql92 grammar
SQL92 Grammar
  • Not widely available:http://www.programmar.com/ex_sql2.htm
  • Example:

grammar SQL2 <IGNORECASE,

SPACE = space_symbol,

HIDELITERALS,

NOBACKTRACK>

{

start ::=

{direct_sql_stmt [";"] };

direct_sql_stmt ::=

direct_sql_data_stmt

| SQL_schema_stmt

| SQL_transaction_stmt

| SQL_connection_stmt

| SQL_session_stmt

;

Applied Computing Technology Laboratory

step 1 install mysql
Step 1: Install MySQL
  • Download MySQL from:

http://dev.mysql.com/downloads/

  • Read the installation instructions.
  • Run the installer and choose default choices.
  • Go back and read the installation instructions if you have trouble.

Applied Computing Technology Laboratory

step 2 install mysql administrator
Step 2: Install MySQL Administrator
  • MySQL Administrator is a graphical utility that lets you manage your MySQL server and databases.
  • Download & install from:http://www.mysql.com/products/tools/administrator/index.html
  • Run the installer and choose the default settings.
  • Example.

Applied Computing Technology Laboratory

step 3 install the mysql jdbc connector
Step 3: Install the MySQL JDBC Connector
  • Download from:

http://dev.mysql.com/downloads/

  • Unzip to a folder.
  • Copy the “mysql-connector-java-3.1.11-bin.jar” file to your JAVA library directory. For me it was here:

C:\Program Files\Java\jdk1.5.0_04\lib

Applied Computing Technology Laboratory

step 4 learn to use the command line
Step 4: Learn to use the command line.
  • Run the “MySQL Command Line Client from the Start Menu, it is under: Programs->MySQL->MySQL 5.0
  • Enter the root password.
  • You can now insert SQL statements and other commands.
  • Example.

Applied Computing Technology Laboratory

step 5 create a java program
Step 5: Create a JAVA program.
  • Create a JAVA program.
  • Import the java.sql package.
  • Load the JDBC driver.
  • Establish a connection to the database.
  • At this point, you can complete regular SQL queries like I showed you from before, within JAVA.
  • Example.

Applied Computing Technology Laboratory

learning more about sql
Learning more about SQL:
  • Beginning MySQL Tutorial
  • For good descriptions of SQL commands, please visit here.
  • SQL92 Grammar
  • MySQL Implementation
  • http://www83.homepage.villanova.edu/mujtaba.talebi/index.htm

Applied Computing Technology Laboratory