Structured Query Language - Buisness Management - Lecture Slides, Slides of Business Administration

Business Management is one of the most important subject in Management Sciences.Following are the key points discussed in these Lecture Slides : Structured Query Language, Reducing Training Costs, Increasing Productivity, Improve Application Portability, Increase Application Longevity, Single Vendors, Systems Communication, Reducing Training Costs, Specific Values Sought, Additional Syntax

Typology: Slides

2012/2013

Uploaded on 07/29/2013

devsena
devsena 🇮🇳

4.5

(14)

134 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Structured Query Language
used for defining and manipulating data in
Relational DBs
aimed at:
reducing training costs
increasing productivity
improve application portability
increase application longevity
reduce dependency on single vendors
enable cross systems communication
In practice, SQLs can be a bit different
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Structured Query Language - Buisness Management - Lecture Slides and more Slides Business Administration in PDF only on Docsity!

Structured Query Language

  • used for defining and manipulating data in Relational DBs
  • aimed at:
    • reducing training costs
    • increasing productivity
    • improve application portability
    • increase application longevity
    • reduce dependency on single vendors
    • enable cross systems communication
  • In practice, SQLs can be a bit different

Querying RDBs with SQL

  • use a form of pseudo english to retrieve data in a view (which looks like a table)
  • syntax is based on a number of “clauses”
  • Select: specifies what data elements will be included in the view
  • From: lists the tables involved
  • Where: specifies conditions to filter the data
    • specific values sought
    • links between tables

Example with a range

• find the movies that are classified as

adventure

Example with two tables

• List all movies with their associated

type

Use of a Search Condition -

nested queries

• find the name and address of the

customer(s) who has rented star wars

Additional syntax

  • Add computation in the “select” statement:
    • select SUM(price)
    • select AVG(price), MAX, MIN, COUNT
  • Simplify comparisons with a BETWEEN clause and LIKE clause (with *, ?)
  • Add sorting instruction after the where clause
    • ORDER BY name (alphabetical)
    • ORDER BY price (ascending)
  • Provide aggregate information by grouping data:
    • GROUP BY customer
  • find the average duration of the

movies for rent

  • find the average duration of all

completed rentals

  • find how much cash customer “Fred” has

generated in total