chapter 1 introduction l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Chapter 1 : Introduction PowerPoint Presentation
Download Presentation
Chapter 1 : Introduction

Loading in 2 Seconds...

play fullscreen
1 / 18

Chapter 1 : Introduction - PowerPoint PPT Presentation


  • 105 Views
  • Uploaded on

Chapter 1 : Introduction. BORDOLOI & BOCK . SQL. SQL, pronounced ‘Sequel’ or simply S-Q-L, is a computer programming language that was developed especially for querying relational databases using a non-procedural approach.

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 'Chapter 1 : Introduction' - denna


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
chapter 1 introduction

Chapter 1 : Introduction

BORDOLOI & BOCK

slide2
SQL
  • SQL, pronounced ‘Sequel’ or simply S-Q-L, is a computer programming language that was developed especially for querying relational databases using a non-procedural approach.
  • The term non-procedural means that you can extract information by simply telling the system what information is needed without telling how to perform the data retrieval. The RDBMS parses (converts) the SQL commands and completes the task.
slide3
SQL
  • Extracting information from the database by using SQL is termed querying the database.
  • SQL is a language that is fairly simple to learn, in terms of writing queries but it has considerable complexity because it is a very powerful language.
data and information
DATA AND INFORMATION
  • Information is derived from raw facts known as data.
  • Data has little meaning or usefulness to managers unless it is organized in some logical manner.
  • One of the most efficient ways to organize and manage data is through the use of database management system (DBMS).
slide5
DATA
  • Two types of data are stored within a database
  • User data : Data that must de stored by an organization.
  • System data: Data the database needs to manage user data to manage itself. This is also termed metadata, or the data about data.
slide6
SQL
  • Data is manipulated by RDBMS users through the use of special data manipulation language.
  • Database structures can also be defined by the use of data definition language.
  • SQL is the most popular database language and has commands that enable it to be used for both manipulation and definition of databases.
slide7
SQL
  • SQL is used by Oracle for all interaction with the database. SQL statements fall into the two major categories
  • Data Definition Language(DDL) : Set of SQL commands that create and define objects in a database
  • Data Manipulation Language(DML) : Set of SQL commands that allow users to manipulate the data in a database.
slide8
SQL
  • SQL is basically a free format language. This means that there are no particular spacing rules that must be followed when typing SQL commands.
  • In Oracle, you must end each individual SQL statement (irrespective of whether it is composed as a single or multiple lines of code) with a semi-colon (;). It is the “;” which ends an SQL statement and tellls Oracle to Execute it.
relational operations
RELATIONAL OPERATIONS
  • SQL operations for creating new tables, inserting table rows , updating table rows, deleting table rows, and querying databases are the primary means of interfacing with relational databases.
  • The SELECT statement is used primarily to write queries that extract information from the database which is a collection of related tables.
starting oracle sql plus
Starting Oracle SQL*PLUS
  • The most common types used are either the standard Oracle SQL*PLUS available for a Windows-type interface or by connecting to an Oracle database via a telnet session.
  • The following Log On session is a connection to an Oracle database stored on a Sun Microsystems server running the Unix O/S.
  • A SQL*PLUS session is begun by typing the command sqlplus at the command prompt($) and entering the username and password information .

contd

exiting sql plus
Exiting SQL*PLUS
  • The SQL*PLUS session can be ended by typing a command at the SQL prompt to terminate the session.
  • Two commands are available: exit or quit. Either one of these can be used to terminate a SQL*PLUS session.
running executing a command file
Running (Executing) a Command File
  • The command to run (execute) a command file is:

SQL> START filename.sql

  • A form of shorthand for the word “start” can be used when executing a command file by replacing “start” with the @ (“at” symbol).
syntax conventions
Syntax Conventions
  • Each select statement must follow precise syntactical and structural rules.
  • The following is the minimum structure and syntax required for an SQL SELECT statement.

SELECT [DISTINCT | ALL] {* | select_list}

FROM {table_name [alias] | view_name}

sql keywords
SQL Keywords
  • Keywords are words that have a predefined meaning in SQL.
  • In practice, keywords may be entered in upper or lower case letters.

SELECT *

FROM employee;

select *

from employee;

sql keywords16
SQL Keywords
  • In some cases keywords can be abbreviated.
  • The allowed abbreviation is shown in upper case letters with the remainder shown in lower case, which means either the full word or only the upper case part can be used.

DESCribe: can be entered as either DESC or DESCRIBE.

sql naming conventions
SQL Naming Conventions
  • Identifiers are the names given by information system developers or system users to database objects such as tables , columns, indexes, and other objects as well as the database itself.
  • There are several rules for naming database objects that must be followed.
  • Identifiers should contain between 1 and 30 characters.
  • The first character must be either alphabetic (a-z, A-Z) or the @ symbol or _ (underscore).
sql naming conventions18
SQL Naming Conventions
  • After the first character, digits, letters, or the symbols $,#, or _(underscore) must be used.
  • No embedded spaces are allowed in identifiers.
  • SQL keywords cannot be used as an identifier.