Database Fred Durao What is a database? A database is any organized collection of data. Some examples of databases you may encounter in.

Slides:



Advertisements
Similar presentations
Fundamentals of Database Design John Villamil-Casanova Executive Vice President & CIO The Aspira Association ext. 123
Advertisements

Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
DT211 Stage 2 Databases Lab 1. Get to know SQL Server SQL server has 2 parts: –A client, running on your machine, in the lab. You access the database.
Databases Using MySQL Creating Tables Queries. Databases  A database is a collection of data organized for efficient access  A relational database is.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
CSC 2720 Building Web Applications Database and SQL.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Microsoft Access Database software. What is a database? … a database is an organized collection of data. A collection of data of similar information compiled.
Chapter 12 Information Systems. Spreadsheets Databases 12-2.
CSCI 6962: Server-side Design and Programming
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Database Lecture # 1 By Ubaid Ullah.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
ASP.NET Programming with C# and SQL Server First Edition
CHAPTER 7 Database: SQL, MySQL. Topics  Introduction  Relational Database Model  Relational Database Overview: Books.mdb Database  SQL (Structured.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
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.
Introduction to SQL Steve Perry
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Simple Database.
Databases. Database A database is an organized collection of related data.
Unit 1.  Introduction  Syllabus  Questions  Database Systems Overview.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
PHP MySQL Introduction. MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Database: SQL and MySQL
Database and mySQL Week 07 Dynamic Web TCNJ Jean Chu.
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
SQL SQL Server : Overview SQL : Overview Types of SQL Database : Creation Tables : Creation & Manipulation Data : Creation & Manipulation Data : Retrieving.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Chapter 5 MYSQL Database. Introduction to MYSQL MySQL is the world's most popular open-source database. Open source means that the source code, the programming.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
# 1# 1 Creating Tables, Setting Constraints, and Datatypes What is a constraint and why do we use it? What is a datatype? What does CHAR mean? CS 105.
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.
Module Review Basic SQL commands: Create Database, Create Table, Insert and Select 2. Connect an SQL Database to PHP 3. Execute SQL Commands in.
>> Introduction to MySQL. Introduction Structured Query Language (SQL) – Standard Database Language – Manage Data in a DBMS (Database Management System)
What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, Many.
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,
There are two types of MySQL instructions (Data Definition Language) DDL: Create database, create table, alter table,,,. (Data Manipulation Language) DML.
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Databases and SQL CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
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.
Introduction to Database Programming with Python Gary Stewart
Introduction to Oracle. Before Computerized Database Organization use a set of data files to store each individual data. – The file contains individual.
 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.
3 A Guide to MySQL.
Web Systems & Technologies
Fundamentals of Database
CS311 Database Management system
Principles of Software Development
PHP + MySQL Commands Refresher.
Fundamentals of Database Design
CS1222 Using Relational Databases and SQL
Structured Query Language
SQL pepper.
CS3220 Web and Internet Programming SQL and MySQL
Presentation transcript:

Database Fred Durao

What is a database? A database is any organized collection of data. Some examples of databases you may encounter in your daily life are: a telephone book T.V. Guide airline reservation system papers in your filing cabinet files on your computer hard drive.

Why do we need a database? Keep records of our: Clients Staff Volunteers To keep a record of activities and interventions; Keep sales records; Develop reports; Perform research Longitudinal tracking

Database management system (DBMS) Software Programs which capable to: store, modify delete ask questions (or queries) about the data stored in the database and produce reports summarizing selected contents. Examples: MS/Access, FileMaker, Lotus Notes, Oracle, SQL Server and MySQL

Tables comprise the fundamental building blocks of any database. If you're familiar with spreadsheets, you'll find database tables extremely similar. The table above contains the employee information for our organization -- characteristics like name, date of birth and title. Fundamental building blocks

- A relational database is a collection of tables of data, each of which has one special column that stores the primary keys of the table -The rows are the input values for each column, sometimes called entities; - Usually tables contain PRIMARY KEY, which uniquely identify each row in a table. Relational Databases CPRNAMEAGE FRED THOMAS ULLA34 TABLE TEACHER CPR is the primary key of table teacher

CPRNAMEAGE FRED THOMAS ULLA34 TABLE TEACHER COURSE IDCOURSE_NAMECPR 111 WEB DESIGN SPANISH ENGLISH TABLE COURSE CPR is the COLUMN/FIELD which relates both tables Why Relational Databases?

MySql – A OpenSource Database A relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. MySQL is a popular choice of database for use in web applications. PHP based application, for instance can access MySQL to maintain data. MySQL provides a User Interface Application called MySQL Workbench. Users can visualize and manipulate data though MySQL Workbench. Starting MySQL Workbench in your Windows Machine: START -> Programs -> MySQL -> MySQL Workbench

MySql Workbench (1) Click to open a connection (2) Enter your credentials

-A standard language to create, query, and modify relational databases -More like structured English than a programming language -We will cover only six basic commands: -CREATE TABLE, - SELECT, - INSERT, - UPDATE, - DELETE, and -DROP SQL - Structured Query Language

- To create a database - General form: CREATE DATABASE database_name EX: CREATE DATABASE web; Hint: IF working on the same database use sql command: Use database_name EX: USE WEB; The CREATE DATABASE Command

- To create tables in the database - General form: CREATE TABLE table_name ( column_name 1 data_type constraints ) EX: CREATE TABLE `teacher` ( `cpr` INT NOT NULL PRIMARY KEY, `name` VARCHAR(45), `age` INT ); The CREATE TABLE Command

- Used to insert data into the table - Three clauses: SELECT, FROM, and WHERE - General form: INSERT INTO table name (column names ) VALUES (values) - The correspondence between column names and values is positional EX: INSERT INTO TEACHER(CPR,NAME,AGE)VALUES( , 'JOHN', 17); INSERT INTO TEACHER(CPR,NAME,AGE)VALUES( , 'FRED', 24); INSERT INTO TEACHER(CPR,NAME,AGE)VALUES( , 'ULLA', 35); The INSERT Command

- Used to specify queries - Three clauses: SELECT, FROM, and WHERE - General form: SELECT column names FROM table name WHERE condition Ex: SELECT name FROM TEACHER; Ex: SELECT name FROM TEACHER WHERE age > 20; The SELECT Command

- To change/update/modify one or more values of a row in a table - General form: UPDATE table_name SET col_name 1 = value 1 WHERE col_name = value Ex: UPDATE TEACHER SET AGE=23 where CPR = ; The UPDATE Command

- To delete one or more values of a row in a table - General form: DELETE FROM table name where condition - The WHERE clause could specify more than one row of the table EX: DELETE FROM TEACHER WHERE NAME = 'FRED'; The DELETE Command

-To drop a table in the database - General form: DROP TABLE table_name EX: DROP TABLE TEACHER The DROP TABLE Command

- To drop a existing database - General form: DROP database_name EX: DROP DATABASE WEB; The DROP DATABASE Command