Digital Media Technology Week 11. Implementation Database Design Retrieval Data entry.

Slides:



Advertisements
Similar presentations
Structured Query Language (SQL)
Advertisements

Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Digital Media Technology Week 11. □ Implementation □ Database Design □ Retrieval □ Data entry.
Digital Media Technology Week 7. □ Database □ DBMS □ Data vs. Information □ Data redundancy □ Tables, Rows, Columns, Records, Fields □ Relational data.
Digital Media Technology Week 13. Exercise 5, week 11.
Keys, Referential Integrity and PHP One to Many on the Web.
Copyright © by Royal Institute of Information Technology Introduction To Structured Query Language (SQL) 1.
NMED 3850 A Advanced Online Design February 25, 2010 V. Mahadevan.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
Databases Using MySQL Creating Tables Queries. Databases  A database is a collection of data organized for efficient access  A relational database is.
Structured Query Language Chapter Three (Excerpts) DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Database Systems More SQL Database Design -- More SQL1.
Structured Query Language Chapter Three DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
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.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Computer Science 101 Web Access to Databases SQL – Extended Form.
DATABASES AND SQL. Introduction Relation: Relation means table(data is arranged in rows and columns) Domain : A domain is a pool of values appearing in.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
MySql In Action Step by step method to create your own database.
SQL Basics. SQL SQL (Structured Query Language) is a special-purpose programming language designed from managing data in relational database management.
PHP1-1 PHP & SQL Xingquan (Hill) Zhu
1 IT420: Database Management and Organization SQL - Data Manipulation Language 27 January 2006 Adina Crăiniceanu
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Digital Media Technology Week 10. foreign key primary key TREASURE_IDTITLECREATORLIBRARYSUBJECTYEAR 1Sidereus Nuncius77SCI1610 2Requiem KV 62621MUS1791.
CS450 HW2Page 1 Homework #2  Due the midnight of April 15th.  100 Points  In this homework, you create an SQL script to build the MOVIES database according.
CSE314 Database Systems More SQL: Complex Queries, Triggers, Views, and Schema Modification Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Relational Database Management Systems. A set of programs to manage one or more databases Provides means for: Accessing the data Inserting, updating and.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
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.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Association of Computing Activities Computer Science and Engineering Indian Institute of Technology Kanpur.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Structured Query Language Chris Nelson CS 157B Spring 2008.
Using Special Operators (LIKE and IN)
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
Nitin Singh/AAO RTI ALLAHABAD 1 SQL Nitin Singh/AAO RTI ALLAHABAD 2 OBJECTIVES §What is SQL? §Types of SQL commands and their function §Query §Index.
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.
BY SATHISH SQL Basic. Introduction The language Structured English Query Language (SEQUEL) was developed by IBM Corporation, Inc., to use Codd's model.
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 6/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Nikolay Kostov Telerik Corporation
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
What’s a database? Data stored in a structured format that lends itself to easy manipulation and recall.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Advanced Accounting Information Systems Day 10 answers Organizing and Manipulating Data September 16, 2009.
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 7: SQL, the Structured Query Language Instructor’s name and.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
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,
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
Concepts of Database Management Seventh Edition Chapter 3 The Relational Model 2: SQL.
Digital Media Technology Databases / SQL 2 Fleur Praal 17 November 2015 Leiden University. The university to discover.
An Introduction to SQL For CS Overview of SQL  It is the standard language for relational systems, although imperfect  Supports data definition.
Digital Media Technology Week 12. □ Remaining SQL theory □ MySQL □ Data visualisation Today’s lecture.
1 MySQL and SQL. 2 Topics  Introducing Relational Databases  Terminology  Managing Databases MySQL and SQL.
© 2002 by Prentice Hall 1 Structured Query Language David M. Kroenke Database Concepts 1e Chapter 3 3.
WEEK# 12 Haifa Abulaiha November 02,
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Table Structures and Indexing. The concept of indexing If you were asked to search for the name “Adam Wilbert” in a phonebook, you would go directly to.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
MIDTERM REVIEW IST 210 Organization of Data IST210 1.
Using Structured Query Language (SQL) NCCS Applications –MS Access queries (“show SQL”) –SAS (PROC SQL) –MySQL (the new dataserver) –Visual Foxpro Other.
Introduction to Databases & SQL Ahmet Sacan. What you’ll need Firefox, SQLite plugin Mirdb and Targetscan databases.
Lec-7. The IN Operator The IN operator allows you to specify multiple values in a WHERE clause. SQL IN Syntax SELECT column_name(s) FROM table_name WHERE.
Big Data Yuan Xue CS 292 Special topics on.
3 A Guide to MySQL.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Database Keys and Constraints
Digital Media Technology
Contents Preface I Introduction Lesson Objectives I-2
SQL AUTO INCREMENT Field
Presentation transcript:

Digital Media Technology Week 11

Implementation Database Design Retrieval Data entry

XPath - SQL DTD/Schema - ERD Similarities betweeen techniques and concepts

Booktrade Database Indexes to transcriptions from the Bohn archivetranscriptions from the Bohn archive Relations between letters, persons, companies, titles

CREATE TABLE TREASURE ( TREASURE_ID INT (4) NOT NULL AUTO_INCREMENT, TITLE VARCHAR (150), CREATOR INT, LIBRARY CHAR(6), SUBJECT CHAR(3), YEAR INT (4), PRIMARY KEY (TREASURE_ID), FOREIGN KEY (CREATOR) REFERENCES CREATOR ON DELETE RESTRICT ON UPDATE CASCADE, FOREIGN KEY (LIBRARY) REFERENCES LIBRARY ON DELETE RESTRICT ON UPDATE CASCADE, FOREIGN KEY (SUBJECT) REFERENCES SUBJECT ON DELETE RESTRICT ON UPDATE CASCADE );

INSERT INTO CREATOR VALUES ('1','Baudelaire','Charles','1821','1867','FR'), ('2','Mozart','Wolfgang Amadeus','1756','1791','AT'), ('3','Bruegel The Elder','Pieter','1525','1569','BE'), ('4','Sadler','William','1782','1839','IE'), ('5','Tiemann','Walter','1876','1951','DE'), ('6','Macchiavelli','Giacomo','1756','1811','IT'), ('7','Galilei','Galileo','1564','1642','IT'), ('8','Parker','Matthew','1504','1575','GB'), ('9','Wittel','Caspar van','1655','1736','NL'), ('10','Molyneux','Daniel','1568','1632','IE') ; UPDATE CREATOR SET NAME_LAST='Charles Pierre' WHERE PID= 1 ;

DELETE DATABASE TREASURE ; DROP TABLE CREATOR ;

SELECT TITLE, YEAR FROM TREASURE ; TITLEYEAR Sidereus Nuncius1610 Requiem KV Rabbit Hunt, in the lower left Brueghel De antiquitate Britanicae Ecclesiae1572 Vedute di Roma con scene di costume 1810 Corrected page proofs of 'Les Fleurs du mal' 1857 Vinegar Hill, charge of the 5th Dragoon Guards 1880 Poster of "Internationale Ausstellung für Buchgewerbe und Graphik" 1914 Fontana dei Fiumi a Piazza Navona1734

SELECT * FROM TREASURE ; treasure_idtitleyearcreatorlibrarysubject 1Sidereus Nuncius161077SCI 2Requiem KV MUS 3Rabbit Hunt, in the lower left Brueghel ART 4De antiquitate Britanicae Ecclesiae ART 5Vedute di Roma con scene di costume HIS 6Corrected page proofs of 'Les Fleurs du mal' HIS 7Vinegar Hill, charge of the 5th Dragoon Guards HIS 8Poster of "Internationale Ausstellung für Buchgewerbe und Graphik" ART 9Fontana dei Fiumi a Piazza Navona ART

SELECT TITLE, YEAR FROM TREASURE ORDER BY YEAR ; TITLEYEAR Rabbit Hunt, in the lower left Brueghel De antiquitate Britanicae Ecclesiae1572 Sidereus Nuncius1610 Fontana dei Fiumi a Piazza Navona1734 Requiem KV Vedute di Roma con scene di costume 1810 Corrected page proofs of 'Les Fleurs du mal' 1857 Vinegar Hill, charge of the 5th Dragoon Guards 1880 Poster of "Internationale Ausstellung für Buchgewerbe und Graphik" 1914

SELECT TITLE, YEAR FROM TREASURE WHERE YEAR > 1800 ; TITLEYEAR Vedute di Roma con scene di costume 1810 Corrected page proofs of 'Les Fleurs du mal' 1857 Vinegar Hill, charge of the 5th Dragoon Guards 1880 Poster of "Internationale Ausstellung für Buchgewerbe und Graphik" 1914

SELECT DISTINCT SUBJECT FROM TREASURE ; SUBJECT ART HIS MUS SCI

SQL Functions COUNT ( ) ; SUM ( ) ; AVG ( ) ; MIN ( ) ; MAX ( ) ;

SELECT COUNT(*) FROM TREASURE ; 9

SELECT COUNTRY_BORN, COUNT(*) FROM CREATOR GROUP BY COUNTRY_BORN ; Query1 COUNTRY_BORN AT1 BE1 DE1 FR1 GB1 IE2 IT2 NL1

Query creator_ id name_lastname_first year _of_ birth year_of _death country _born 2MozartWolfgang Amadeus AT 3Bruegel The Elder Pieter BE 5TiemannWalter DE 1BaudelaireCharles FR 8ParkerMatthew GB 4SadlerWilliam IE 10MolyneuxDaniel IE 6MacchiavelliGiacomo IT 7GalileiGalileo IT 9WittelCaspar van NL

COUNTRY_BORN ie2 it2 SELECT COUNTRY_BORN, COUNT(*) FROM CREATOR GROUP BY COUNTRY_BORN HAVING COUNT(*) >= 2 ;

Joining tables SELECT NAME_FIRST, NAME_FIRST, TITLE FROM TREASURE, CREATOR WHERE CREATOR = CREATOR_ID ;

NAME_FIRSTNAME_LASTTITLE Charles Corrected page proofs of 'Les Fleurs du mal' Wolfgang Amadeus Requiem KV 626 Pieter Rabbit Hunt, in the lower left Brueghel William Vinegar Hill, charge of the 5th Dragoon Guards Walter Poster of "Internationale Ausstellung für Buchgewerbe und Graphik" Giacomo Vedute di Roma con scene di costume Galileo Sidereus Nuncius Matthew De antiquitate Britanicae Ecclesiae Caspar van Fontana dei Fiumi a Piazza Navona

HTML PHP http SQL SERVER CLIENT HTML db

1.Which table(s) contains the information that you need? 2.Are you interested in all the records in this/these table(s)? 3.Are you interested in the actual contents of the records or in statistical information about the records in the table? If so, would you like to receive one answer for the entire table, or would you like to receive different answers for different types of records? 4.Which columns do you want to see? 5.Do you want to see duplicate values or are you only interested in different values? 6.Do the records in the result set need to be sorted in any particular way? A structured approach to writing queries