ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.

Slides:



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

Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 22 – Database: SQL, MySQL, DBI and ADO.NET Outline 22.1 Introduction 22.2 Relational Database Model.
Chapter 8 Special-Purpose Languages. SQL SQL stands for "Structured Query Language". Allows the user to pose complex questions of a database. It also.
Introduction to Structured Query Language (SQL)
ASP.NET Database Connectivity I. 2 © UW Business School, University of Washington 2004 Outline Database Concepts SQL ASP.NET Database Connectivity.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
30-Jun-15 SQL A Brief Introduction. SQL SQL is Structured Query Language Some people pronounce SQL as “sequel” Other people insist that only “ess-cue-ell”
Chapter 04 How to retrieve data in a single table MIT 22033, Database Management System By: S. Sabraz Nawaz.
Chapter 5 Introduction to SQL. Structured Query Language = the “programming language” for relational databases SQL is a nonprocedural language = the user.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
ASP.NET Programming with C# and SQL Server First Edition
Intro to JDBC To effectively use Java Data Base Connectivity we must understand: 1.Relational Database Management Systems (RDBMS) 2.JDBC Drivers 3.SQL.
LOGO 1 Lab_02: Basic SQL. 2 Outline  Database Tables  SQL Statements  Semicolon after SQL Statements?  SQL DML and DDL  SQL SELECT Statement  SQL.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Structured Query Language. SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database systems.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
 Mysql – popular open-source database management system  PHP usually works with Mysql for web- based database applications  LAMP applications—Web-based.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
1 What is database 2? What is normalization? What is SQL? What is transaction?
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
SQL SQL Server : Overview SQL : Overview Types of SQL Database : Creation Tables : Creation & Manipulation Data : Creation & Manipulation Data : Retrieving.
Copyright © Curt Hill SQL The Intergalactic Standard Database Query Language.
MySQL Database Connection
Chapter 10: The Data Tier We discuss back-end data storage for Web applications, relational data, and using the MySQL database server for back-end storage.
Topic 1: Introduction to SQL. SQL stands for Structured Query Language. SQL is a standard computer language for accessing and manipulating databases SQL.
SQL Unit – 2 Base Knowledge Presented By Mr. R.Aravindhan.
Oracle & SQL Introduction. Database Concepts Revision DB? DBMS? DB Application? Application Programs? DBS? Examples of DBS? Examples of DBMS? 2Oracle.
Information Building and Retrieval Using MySQL Track 3 : Basic Course in Database.
1 DBS201: Introduction to Structure Query Language (SQL) Lecture 1.
SQL Basic. What is SQL? SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database.
SQL. คำสั่ง SQL SQL stands for Structured Query Language is a standard language for accessing and manipulating databases.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Visual Programing SQL Overview Section 1.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
PHP and Mysql Database. PHP and Database Mysql – popular open-source database management system PHP usually works with Mysql for web-based database applications.
Presentation On How To Create Connection To A Database.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
Relational Database Management System(RDBMS) Structured Query Language(SQL)
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
Introduction to Database SEM I, AY Department of Information Technology Salalah College of Technology Chapter No.3 SQL.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
SQL Structured Query Language. SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database.
 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications.
SQL Introduction SQL stands for “Structured Query Language” and can be pronounced as “SQL” or “sequel – (Structured English.
Fundamental of Database Systems
Aga Private computer Institute Prepared by: Srwa Mohammad
Web Systems & Technologies
Chapter 5 Introduction to SQL.
Advanced Accounting Information Systems
Oracle & SQL Introduction
Introduction to Structured Query Language(SQL)
PHP + MySQL Commands Refresher.
Structured Query Language (SQL) William Klingelsmith
SQL Tutorial.
Chapter 8 Working with Databases and MySQL
Workbench Data Definition Language (DDL)
مقدمة في قواعد البيانات
Database systems Lecture 3 – SQL + CRUD
SQL Queries Chapter No 3.
SQL .. An overview lecture3.
Structured Query Language
DATABASES WHAT IS A DATABASE?
Lecuter-1.
Presentation transcript:

ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases

Databases Defn: A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated.[1][1] Different types of databases i. Relational Database: Stores data in the form of related tables ii.Object Oriented Programming Database: This has the data defined in objects classes and sub classes. Some of the Databases in use: IBM's DB2, Microsoft's Access, MySQL, Postgresql and products from Oracle, Sybase, and Computer Associates. [1] [1]

Databases Continued For DBMS a record is collection of fields each field containing one entry In databases records are also known as tuples Recordset – collection of records returned which match the query entered.

Figure 1: Showing table in database

Figure2: Showing recordset returned for a query

Structured Query Language (SQL) A programming language, that allows access to a database. SQL Data Manipulation Language (DML) SQL Data Definition Language (DDL)

SQL Data Manipulation Language (DML) This allows us to either extract, insert, delete or update data in the database SELECT - extracts data from a database table UPDATE - updates data in a database table DELETE - deletes data from a database table INSERT INTO - inserts new data into a database table

SELECT SYNTAX SELECT column_name(s) FROM table_name WHERE clause: This allows us to conditionally select data from a table based upon some criteria SELECT column FROM table WHERE column operator value e.g. Select * from nur

UPDATE SYNTAX UPDATE table_name SET column_name = new_value WHERE column_name = some_value e.g. update #period# set period ='#period#', Primary='#form.Primary#',Last1='#form.Last1#', First1'#form.First1#',Last2='#form.Last2#',First2='#form.First2#',editor_last1='#editor_last1# where key=#form.key#

DELETE and INSERT SYNTAX DELETE FROM table_name WHERE column_name = some_value e.g. delete from nur where l_name='zincir' INSERT INTO table_name VALUES (value1, value2,....) e.g. insert into nur (l_name,f_name) values ('lastname1','firstname1')

SQL Data Definition Language (DDL) This allows us to create or delete tables in the database. CREATE TABLE - creates a new database table ALTER TABLE - alters (changes) a database table DROP TABLE - deletes a database table

DDL SYNTAX CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, ) ALTER TABLE table_name ADD column_name datatype ALTER TABLE table_name DROP COLUMN column_name

Database connection strings ODBC (Object Database Connectivity) – An application interface for accessing a database. Makes it possible to assess data from any application irrelevant of the underlying DBMS used. It carries out this task by inserting a middle layer known as a driver between the application and the DBMS. The role of this is to convert application's data queries into commands that the DBMS understands.[1] It is also language independent.[1] JDBC [1][1]

Connection String in Perl $dbh=DBI->connect( 'dbi:Oracle',$username,$password); DBI = Database Independent Module, allows for access to a supported SQL database

Using a database through the DBI module Connect to the database Prepare the SQL statement and return a statement handle Using the Statement handle, Execute the SQL statement If the SQL statement is a SELECT, use the Statement handle to get the SELECTed records Close the statement handle Close the connection

Useful Links