1302325 s1 2011 Advance Database Systems Week-2 Dr.Kwanchai Eurviriyanukul

Slides:



Advertisements
Similar presentations
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Advertisements

G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
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.
1 Lecture 13: Database Heterogeneity Debriefing Project Phase 2.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 3 Slides adapted from those used by Jeffrey Ullman, via Jennifer.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Module 17 Storing XML Data in SQL Server® 2008 R2.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
Web Application Development. Define ER model in QSEE Generate SQL Create Database mySQL Write Script to use TableEditor class Process to create A simple.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
CS 157B: Database Management Systems II May 8 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Copyright  Oracle Corporation, All rights reserved. 4 CMIS Powell Oracle Designer: Creating the Database Design CMIS Powell.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design.
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
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 MySQL Lab no. 10 Advance Database Management System.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
SQL 101 for Web Developers 14 November What is a database and why have one? Tables, relationships, normalization SQL – What SQL is and isn’t – CRUD:
JSTL, XML and XSLT An introduction to JSP Standard Tag Library and XML/XSLT transformation for Web layout.
ISM 4212 Lab Creating DB Tables 02 copyright Lars Paul Linden 2007.
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, Copyright © 2015, Fred McClurg, All Rights.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Advanced Database Management System
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Dec 8, 2003Murali Mani Constraints B term 2004: lecture 15.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
s1 201 Advance Database Systems Dr.Kwanchai Eurviriyanukul
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
ACIS Introduction to Data Analytics & Business Intelligence Database s Benefits & Components.
XML Extensible Markup Language. Introduction to XML Text based format As JSON it’s mainly intended for data interchange (transport & store) Also widely.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 560: Database System Concepts Lecture 24 of 42 Friday, 20 October 2006.
Advance Database S Week-5 Dr.Kwanchai Eurviriyanukul
CHAPTER 10 PHP MySQL Database
1 MySQL and SQL. 2 Topics  Introducing Relational Databases  Terminology  Managing Databases MySQL and SQL.
Advance Database S Week-6 Dr.Kwanchai Eurviriyanukul
IS6146 Databases for Management Information Systems Lecture 3: SQL III – The DDL Rob Gleasure robgleasure.com.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
1 Welcome! DBT544 students to the iSeries, DB2 Universal Database And SQL interface.
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.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Lab 3.21 MySQL Database Lab Developing the Tools May 5 th, 2004 Montréal, Québec Dominik Gehl Hôpital Ste-Justine, Montréal.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
XML 1. Chapter 8 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SAMPLE XML SCHEMA (XSD) 2 Schema is a record definition, analogous to the.
Web Services Dr.Kwanchai Eurviriyanukul The contents of this slide set are obtained from various sources including W3School, WIKIPEDIA.
XML: Extensible Markup Language
CS320 Web and Internet Programming SQL and MySQL
SQL: Schema Definition and Constraints Chapter 6 week 6
Database Processing with XML
Translation of ER-diagram into Relational Schema
Module 5: Implementing Data Integrity by Using Constraints
ISC440: Web Programming 2 Server-side Scripting PHP 3
Team Project, Part II NOMO Auto, Part II IST 210 Section 4
Paul Jacobs The iSchool University of Maryland Thursday, Oct. 5, 2017
CS3220 Web and Internet Programming SQL and MySQL
CS3220 Web and Internet Programming SQL and MySQL
Presentation transcript:

s Advance Database Systems Week-2 Dr.Kwanchai Eurviriyanukul

Week-1-Homework Marking criteria. 1.You have successfully created your database. (2.5 marks) 2.You have successfully populated your data into your big table. (2.5 marks) 3.You have successfully populated your data into your normalized tables (2.5 marks) 4.Your have demonstrated the enforcement of foreign key constraints for your database. (2.5 marks)

Homework-Week-2 1.Data Population (Normalization from last week) 2.HTML processing 3.Venn Diagram Creation

Homework-Week-2 1.Data Population (Normalization from last week)

Homework-Week-2 1.HTML processing Your DOM.php

HTML processing (Your DOM.php)

Homework-Week-2 1.Venn Diagram Creation

Homework-Week-2 1.Venn Diagram Creation

End of the homework

Goal Data Integration Systems for …

Contents Constraints Concurrency Controls XML Basics Venn Diagram Google Maps

Normalization

Create Table and Constraints CREATE TABLE `village` ( `vill_id` int(11) NOT NULL, `vill_moo` varchar(10) DEFAULT NULL, `vill_name` varchar(100) DEFAULT NULL, `tambon_tam_id` char(10) NOT NULL, PRIMARY KEY (`vill_id`), foreign key (tambon_tam_id) references tambon(tam_id)) ENGINE=innodb DEFAULT CHARSET=utf8;

Sync Workbench with DB Update model

Now We got an updated Model Don’t forget to drag a new table into a new model

We need to populate data into new tables

Select Data use advancedb54; select * from villagebigtable;

Closer Look

How many records we have in villageBigTable?

We need to populate data into new tables From where to where?

We need to populate data into new tables From where to where?

Let’s analyse village ID

How many digits is used for provinceID province-district_name-sub_district_name- moo เชียงใหม่ - จอมทอง - แม่สอย - หมู่ 13 => ห้วย พัฒนา เชียงใหม่ - แม่แจ่ม - ช่างเคิ้ง - หมู่ 2 => ต่อเรือ

We need to populate data into new tables From where to where? Let’s start with region table;

How to populate a region table?

We need to get the unique name of the region_name from villageBigTable; => How?

How to populate a region table? We need to get the unique name of the region_name from villageBigTable; => How? select distinct region_name from villagebigtable;

We need to automatic create id for region name ALTER TABLE `advanceDB54`.`region` CHANGE COLUMN `region_id` `region_id` INT(11) NOT NULL AUTO_INCREMENT

select distinct region_name from villagebigtable;

Concurrency control Google doc

How many digits is used for provinceID Village_ID => Province+district_name+sub_district_name+mo o

Course Details Course Description Relational database theory, object-oriented database system, distributed database system, active database, distributed object- oriented database system, data warehouse, data mining, digital library, dynamic database system, and reasoning management database system. Course Objectives After completing the course students should be able to 1.Understand the concepts for Advance Database System and XML. 2.Know and select tools for Advance Database Systems and XML. 3.Able to develop programs by using the knowledge from 1. And 2.

Course Outlines WeekTopicDateLabBrief Content 1Reviews of Database Management Systems3/11/2554Basic PHP Programming-file processingSQL and Query Evaluation 2XML10/11/2554Basic PHP Programming-functionIntroduction to XML technology XML XML How to use XML Tree XML Syntax XML Elements XML Attributes 3DTD17/11/2554DTD Construction and ValidationDTD Structure Elements Attributes Elements vs Attr alidation Examples 4XML Schema/ XML namespace24/11/2553XML Schema Consturction and Validation-Simple TypeHow to declare the XML schema. How to refer XML schema in your XML document. How to construct the XML schema How to construct the simpleType elements for XML schema How to use restriction on simpleType 5XML Schema1/12/2554XML Schema Consturction and Validation-Complex TypeComplex Types Elements Mixed Indicators Data Types 6Xpath8/12/2554PHP Implementation for XpathIntro Nodes Syntax 7Xpath-Advance15/12/2554PHP Implementation for Xpath-1Syntax cont. Axes Operators Examples 8Xquery22/12/2554XQuery Evaluation with Eclipse-1Intro Example FLWOR expression XQuery Syntax 9Mid-Term29/12/ Xquery-cont.5/01/2555XQuery Evaluation with Eclipse-2XQuery Add XQuery Select XQuery Functions 11XSLT12/01/2555XSLT programming with Eclipse and PHP-1XML Transformation XSLT Basic information XSLT Syntax and Running Example a. Template b. Value-of c. For-each 12XSLT-cont.19/01/2555XSLT programming with Eclipse and PHP-2Sort IF CHOOSE APPLY TEMPLATE XSL Element and XSL Attribute Processing XSL at server side Setting Webserver and PHP to support XSLT 13Web Services26/01/2555Remote Web Services InvocationWebservices Basic concept Webservices component WSDL Web Services cont.2/02/2555Implementation of Web Service PlatformsWSDL 2.0, SOAP, UDDI 15AJAX9/02/2555AJAX, Web Service, XML and Database Management SystemsCreate Object XHR Request XHR Response readyState AJAX ASP/PHP AJAX Database AJAX XML File 16Distributed Query Processing16/02/2555PHP and FQL implementationFacebook Query Language (FQL) Syntax, Function and Tables 17Final23/02/2555

Week-1 Lecture Reviews of Database Management Systems – SQL and Query Evaluation Lab – From Spreadsheets to the Web

Week-1:Lecture Reviews of Database Management Systems – SQL and Query Evaluation Introduction Data Modeling SQL

Exercise Let’s create an E-R for the following data (using a SQL statement) 39

Create a table

Show create table village

Village-ER

Village-ER => Normalization?

Why do we need normalization?

Village-ER => Normalization?

Now we need to populate the data

Week-1-Lab From Spreadsheets to the Web 1.Spreadsheets (MSExcel) to Relational DB (MySQL) 2.MySQL to Web (PHP) 3.Web (PHP) to WebService (Google Map)

Pre-requisite You need to have the following applications on your machine – Your local Web server (appserv) – Your IDE (Eclipse) – Mysql workbench Internet

Your local Web server (appserv) If you use appserv 2.6.x you might have a problem about calling phpMyAdmin You need to make a call to instead And you need to change the config file and reboot

From Spreadsheets to the Web 1.Spreadsheets (MSExcel) to Relational DB (MySQL) 1.Let’s see Thai version created by my advisees.

Villages in ChiangMai

In CVS

Use MySQL workbench to create your database

Create Your Database

Some time you need to synchronize your model with your localhost

Output at localhost

Let’s import data from excel

Error Why?

Wrong Selection => Select your table

Now Select a file to import

Error Again

Choose the right option

Don’t forget to set your encoding

Choose the right option

Week-1-Lab From Spreadsheets to the Web 1.Spreadsheets (MSExcel) to Relational DB (MySQL) 2.MySQL to Web (PHP) 3.Web (PHP) to WebService (Google Map)

PHP Code

Output

Your turn: I want sub_district_name 1.No duplicate

Your turn: I want sub_district_name 1.No duplicate select distinct sub_district_name from village;

Write Your program

Output

Fix it mysql-thai.html mysql-thai.html

Modify your code

Thai