Digital Media Technology Week 13. Exercise 5, week 11.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizards Guide to PHP by David Lash.
Advertisements

Digital Media Technology Week 11. Implementation Database Design Retrieval Data entry.
Practice for SQL and Constraints (Product-PC-Laptop-Printer)
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.
Filegroup “Stage A” Filegroup “Stage A” Filegroup “A” Partition 1,2 Filegroup “B” Partition 3,4 Filegroup “C” Partition 5,6 Filegroup “D” Partition.
Keys, Referential Integrity and PHP One to Many on the Web.
COMP 3715 Spring 05. Working with data in a DBMS Any database system must allow user to  Define data Relations Attributes Constraints  Manipulate data.
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.
INTRODUCTION The Group WEB BROWSER FOR RELATION Goals.
Multiple Tiers in Action
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.
1 Introduction to Web Application Introduction to Data Base.
Databases Using MySQL Creating Tables Queries. Databases  A database is a collection of data organized for efficient access  A relational database is.
Chapter 7: SQL, the Structured Query Language Soid Quintero & Ervi Bongso CS157B.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
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
Digital Media Technology Week 8. Digital Lifecycle.
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.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Mark Dixon Page 1 23 – Web applications: Writing data to Databases using PhP.
Web Services Week 8 Aims: –Using web services as front ends to databases Objectives: –Review of relational databases –Connecting to and querying databases.
Final Exam Guide PHP NOTE: PHP CODE WILL BE BLUE, HTML IS BLACK EXAMPLE
Introduction to Internet Databases MySQL Database System Database Systems.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Association of Computing Activities Computer Science and Engineering Indian Institute of Technology Kanpur.
Structured Query Language Chris Nelson CS 157B Spring 2008.
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.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Nikolay Kostov Telerik Corporation
SQL Structured Query Language 1. Data Definition Language (DDL) is used to manage table and define data structure i.e. CREATE, ALTER, DROP Data Control.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
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.
SQL introduction 2013.
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.
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.
There are two types of MySQL instructions (Data Definition Language) DDL: Create database, create table, alter table,,,. (Data Manipulation Language) DML.
Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University.
Digital Media Technology Week 10: Introduction to Relational Databases Peter Verhaar.
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.
CREATE TABLE ARTIST ( ArtistID int NOT NULL IDENTITY (1,1), Namechar(25) NOT NULL, TEXT ERROR Nationality char (30) NULL, Birthdate numeric (4,0) NULL,
Drill Consider the following tables with the following fields: Student: FName, LName, StudentID, Age, Yr, Course Grades: ID, P1, P2, P3 1.Display the.
Digital Media Technology Week 14. xml xslt tei css html unicode erd ascii sql php marc/xml Artificial Intelligence Digital Humanities Semantic Web Medium.
Exam 2 Review. SQL – Create Table REMEMBER!! – Create table mxws.Contact ( ContactID INT(10) NOT NULL,.., primary key (contactID));
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.
 MySQL  DDL ◦ Create ◦ Alter  DML ◦ Insert ◦ Select ◦ Update ◦ Delete  DDL(again) ◦ Drop ◦ Truncate.
Using Structured Query Language (SQL) NCCS Applications –MS Access queries (“show SQL”) –SAS (PROC SQL) –MySQL (the new dataserver) –Visual Foxpro Other.
SQL Reminder Jiankang Yuan Martin Lemke. SQL Reminder - SELECT SELECT column_name1, column_name2, … FROM table_name SELECT * FROM table_name.
Big Data Yuan Xue CS 292 Special topics on.
Martin Kruliš, Jan Michelfeit
CS311 Database Management system
Digital Media Technology
אבטחת נתונים בסביבת SQL Data Security
Martin Kruliš, Jan Michelfeit
Data Access Layer (Con’t) (Overview)
SQL AUTO INCREMENT Field
Presentation transcript:

Digital Media Technology Week 13

Exercise 5, week 11

Exercise 6, week 11

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 ); Structured Query Language

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

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_LAST, 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

Digital Media Technology □ Many topics: XML, XHTML, CSS, TEI, XSLT, XPath, PHP, ERD, SQL □ Framework / General principles □ Way of thinking □ Lifecycle of digital objects

Digital Humanities