Design and Implementation

Slides:



Advertisements
Similar presentations
Basic SQL Introduction Presented by: Madhuri Bhogadi.
Advertisements

Presenting a Technical Report Copyright, 1996 © Dale Carnegie & Associates, Inc. TIP For additional advice see Dale Carnegie Training® Presentation Guidelines.
Brad Lloyd & Michelle Zukowski 1 Design and Implementation CIS 400 Final Project Dr. Bruce Maxim SQL.
Pavel Titenkov © SQL. Pavel Titenkov © Общий обзор англ. Structured Query Language — «язык структурированных запросов»англ. Это наиболее часто используемый.
1 Section 10 - Embedded SQL u Many computer languages allow you to embed SQL statements within the code (e.g. COBOL, PowerBuilder, C++, PL/SQL, etc.) u.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Programming Constructs
Fundamentals of DBMS Notes-1.
Restoration and Regulation Discussion
Properties of Living things
With Remote Capabilities by Justin Dansby
Restoration and Regulation Discussion
All State Agencies Recycle (All StAR) Recycling Coordinator Training
AND TELECOMMUNICATIONS BUSINESS
PGT(CS) ,KV JHAGRAKHAND
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
Restoration and Regulation Discussion
Copyright © Dale Carnegie & Associates, Inc.
Properties of Living things
Chapter 4 Relational Databases
Rutherford County Schools
EHPV® Technology Sponsored by HUSCO Intl. & the FPMC Center
Network Design Overview
Fed Funds Rate Chris Lamoureux 9/23/2018
CIS 336 Competitive Success/snaptutorial.com
CIS 336 Education for Service-- snaptutorial.com.
CIS 336 STUDY Lessons in Excellence-- cis336study.com.
CIS 336 Teaching Effectively-- snaptutorial.com
Copyright 2004 © James H. Redin
The Misappropriation of Public Funds in Our Education System
CIRCUIT INTEGRITY WIRE & CABLE: DESIGNED FOR LEGACY & FUTURE SYSTEMS SURVIVAL Frequently, presenters must deliver material of a technical nature to an.
Chapter 2 Database Environment.
The Use of Artificial Life and Culture in Gaming As a Tool for Education Jared Witzer Frequently, presenters must deliver material of a technical nature.
Rutherford County Schools
Database Fundamentals
An ANN Approach to EEG Scoring
SQL OVERVIEW DEFINING A SCHEMA
Brief Review of Proof Techniques
AOE/ESM 4084 Engineering Design Optimization
Technology Update Kris Young Director of Technology
Technology Update Kris Young Director of Technology
Erlang in Banking & Financial Switching
Copyright © Dale Carnegie & Associates, Inc.
Presenting a Technical Report
Numerical Methods Charudatt Kadolkar 12/9/2018
Summer Success Academy Program Analysis Spring 2016
Some ideas on how to present your topic
CMPT 354: Database System I
Design and Implementation
Engineering Services & Software introduces SuperFractionate/Ponchon
Properties of Living things
Contents Preface I Introduction Lesson Objectives I-2
2015/16 Evaluation Summary October 4, 2016 Jordan Harris
2016 State Assessment Results
Business Services Update Board of Education Workshop December 1, 2015
CIET,LAM,DEPARTMENT OF MECHANICAL ENGINEERING
TROY SCHOOL DISTRICT ENROLLMENT PROJECTIONS February 7, 2017
All State Agencies Recycle (All StAR) Recycling Coordinator Training
Wireless Technology Extending the Library Network to M-Commerce
2015/16 Evaluation Summary October 18, 2016 Jordan Harris
Properties of Living things
PSoup: A System for streaming queries over streaming data
Structured Query Language Path from Unorganized to Organized….
Final Budget Amendment and Proposed Budget
Restoration and Regulation Discussion
Restoration and Regulation Discussion
Restoration and Regulation Discussion
Business Services Update Board of Education Workshop March 7, 2017
Binhai Zhu Computer Science Department, Montana State University
Binhai Zhu Computer Science Department, Montana State University
Presentation transcript:

Design and Implementation SQL Design and Implementation Frequently, presenters must deliver material of a technical nature to an audience unfamiliar with the topic or vocabulary. The material may be complex or heavy with detail. To present technical material effectively, use the following guidelines from Dale Carnegie Training®.   Consider the amount of time available and prepare to organize your material. Narrow your topic. Divide your presentation into clear segments. Follow a logical progression. Maintain your focus throughout. Close the presentation with a summary, repetition of the key steps, or a logical conclusion. Keep your audience in mind at all times. For example, be sure data is clear and information is relevant. Keep the level of detail and vocabulary appropriate for the audience. Use visuals to support key points or steps. Keep alert to the needs of your listeners, and you will have a more receptive audience. CIS 400 Final Project Dr. Bruce Maxim Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski An Overview of SQL SQL SQL stands for Structured Query Language. It is the most commonly used relational database language today. SQL works with a variety of different fourth- generation (4GL) programming languages, such as Visual Basic. In your opening, establish the relevancy of the topic to the audience. Give a brief preview of the presentation and establish value for the listeners. Take into account your audience’s interest and expertise in the topic when choosing your vocabulary, examples, and illustrations. Focus on the importance of the topic to your audience, and you will have more attentive listeners. Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski SQL is used for: SQL Data Manipulation Data Definition Data Administration All are expressed as an SQL statement or command. If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski SQL SQL Requirements SQL Must be embedded in a programming language, or used with a 4GL like VB SQL is a free form language so there is no limit to the the number of words per line or fixed line break. Syntax statements, words or phrases are always in lower case; keywords are in uppercase. In your opening, establish the relevancy of the topic to the audience. Give a brief preview of the presentation and establish value for the listeners. Take into account your audience’s interest and expertise in the topic when choosing your vocabulary, examples, and illustrations. Focus on the importance of the topic to your audience, and you will have more attentive listeners. Not all versions are case sensitive! Brad Lloyd & Michelle Zukowski

SQL is a Relational Database A Fully Relational Database Management System must: Represent all info in database as tables Keep logical representation of data independent from its physical storage characteristics Use one high-level language for structuring, querying, and changing info in the database Support the main relational operations Support alternate ways of looking at data in tables Provide a method for differentiating between unknown values and nulls (zero or blank) Support Mechanisms for integrity, authorization, transactions, and recovery If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski SQL Design SQL represents all information in the form of tables Supports three relational operations: selection, projection, and join. These are for specifying exactly what data you want to display or use SQL is used for data manipulation, definition and administration If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Brad Lloyd & Michelle Zukowski

Table Design Name Address Jane Doe 123 Main Street John Smith SQL Table Design Columns describe one characteristic of the entity Rows describe the Occurrence of an Entity Name Address Jane Doe 123 Main Street John Smith 456 Second Street Mary Poe 789 Third Ave If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Brad Lloyd & Michelle Zukowski

Data Retrieval (Queries) Queries search the database, fetch info, and display it. This is done using the keyword SELECT SELECT * FROM publishers pub_id pub_name address state 0736 New Age Books 1 1st Street MA 0987 Binnet & Hardley 2 2nd Street DC 1120 Algodata Infosys 3 3rd Street CA If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. The * Operator asks for every column in the table. Brad Lloyd & Michelle Zukowski

Data Retrieval (Queries) Queries can be more specific with a few more lines SELECT * from publishers where state = ‘CA’ pub_id pub_name address state 0736 New Age Books 1 1st Street MA 0987 Binnet & Hardley 2 2nd Street DC 1120 Algodata Infosys 3 3rd Street CA If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Only publishers in CA are displayed Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Data Input Putting data into a table is accomplished using the keyword INSERT Variable INSERT INTO publishers VALUES (‘0010’, ‘pragmatics’, ‘4 4th Ln’, ‘chicago’, ‘il’) Keyword pub_id pub_name address state 0010 Pragmatics 4 4th Ln IL 0736 New Age Books 1 1st Street MA 0987 Binnet & Hardley 2 2nd Street DC 1120 Algodata Infosys 3 3rd Street CA pub_id pub_name address state 0736 New Age Books 1 1st Street MA 0987 Binnet & Hardley 2 2nd Street DC 1120 Algodata Infosys 3 3rd Street CA If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Table is updated with new information Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski pub_id pub_name address state 0010 Pragmatics 4 4th Ln IL 0736 New Age Books 1 1st Street MA 0987 Binnet & Hardley 2 2nd Street DC 1120 Algodata Infosys 3 3rd Street CA Types of Tables There are two types of tables which make up a relational database in SQL User Tables: contain information that is the database management system System Tables: contain the database description, kept up to date by DBMS itself If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Relation Table Tuple Row Attribute Column Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL SQL statements can be embedded into a program (cgi or perl script, Visual Basic, MS Access) OR SQL statements can be entered directly at the command prompt of the SQL software being used (such as mySQL) If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. Brad Lloyd & Michelle Zukowski SQL Database

Brad Lloyd & Michelle Zukowski Using SQL To begin, you must first CREATE a database using the following SQL statement: CREATE DATABASE database_name Depending on the version of SQL being used the following statement is needed to begin using the database: If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience. USE database_name Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL To create a table in the current database, use the CREATE TABLE keyword CREATE TABLE authors (auth_id int(9) not null, auth_name char(40) not null) auth_id auth_name (9 digit int) (40 char string) Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL To insert data in the current table, use the keyword INSERT INTO INSERT INTO authors values(‘000000001’, ‘John Smith’) Then issue the statement SELECT * FROM authors auth_id auth_name 000000001 John Smith Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL If you only want to display the author’s name and city from the following table: auth_id auth_name auth_city auth_state 123456789 Jane Doe Dearborn MI 000000001 John Smith Taylor SELECT auth_name, auth_city FROM publishers auth_name auth_city Jane Doe Dearborn John Smith Taylor Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL To delete data from a table, use the DELETE statement: DELETE from authors WHERE auth_name=‘John Smith’ auth_id auth_name auth_city auth_state 123456789 Jane Doe Dearborn MI 000000001 John Smith Taylor Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL To Update information in a database use the UPDATE keyword UPDATE authors SET auth_name=‘hello’ auth_id auth_name auth_city auth_state 123456789 Jane Doe Dearborn MI 000000001 John Smith Taylor Hello Hello Sets all auth_name fields to hello Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL To change a table in a database use ALTER TABLE. ADD adds a characteristic. ALTER TABLE authors ADD birth_date datetime null Type Initializer auth_id auth_name auth_city auth_state 123456789 Jane Doe Dearborn MI 000000001 John Smith Taylor birth_date . ADD puts a new column in the table called birth_date Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL To delete a column or row, use the keyword DROP ALTER TABLE authors DROP birth_date auth_id auth_name auth_city auth_state 123456789 Jane Doe Dearborn MI 000000001 John Smith Taylor auth_state . DROP removed the birth_date characteristic from the table Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Using SQL The DROP statement is also used to delete an entire database. DROP DATABASE authors auth_id auth_name auth_city auth_state 123456789 Jane Doe Dearborn MI 000000001 John Smith Taylor DROP removed the database and returned the memory to system Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski Conclusion SQL is a versatile language that can integrate with numerous 4GL languages and applications SQL simplifies data manipulation by reducing the amount of code required. More reliable than creating a database using files with linked-list implementation Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose. Brad Lloyd & Michelle Zukowski

Brad Lloyd & Michelle Zukowski References “The Practical SQL Handbook”, Third Edition, Bowman. Brad Lloyd & Michelle Zukowski