Download presentation
Presentation is loading. Please wait.
Published byBeverley Whitehead Modified over 9 years ago
1
Digital Media Technology Week 12
2
□ Remaining SQL theory □ MySQL □ Data visualisation Today’s lecture
3
□ Database Design □ Data Retrieval □ Implementation □ Data Entry □ Data Visualisation
4
□ Relation model developed by E.F. Codd in 1970E.F. Codd □ SEQUEL implemented by Chamberlin and Boyce in 1974; Design driven by “the need for linear notation, and the need for readable programs that are easy to maintain and modify”. SEQUEL □ First SQL-based RDBS, Oracle, launched in 1979 □ ANSI-standard in 1986 and ISO- standard in 1987 SQL
5
Open standards □ Adopted and maintained by an authorised standisation organization □ Documentation is fully available □ No constraints on the use or the re- use of the standard (interoperability) Proprietary standards □ Risk of “vendor-lock in” □ Migration and system integration is often complicated Open vs. Proprietary Standards
6
The year of the oldest treasure in the database SELECT MIN(YEAR) FROM TREASURE ; 1560 Query: Result:
7
The number of countries in the table CREATOR SELECT COUNT( DISTINCT COUNTRY_BORN ) FROM CREATOR ; 8 Query: Result:
8
The number of persons for each country in the table CREATOR AT BE DE FR GB IE IT NL 1 1 1 1 1 2 2 1 SELECT COUNTRY_BORN, COUNT(*) FROM CREATOR GROUP BY COUNTRY_BORN ; Query:
9
Libraries that are represented by two or more treasures. SELECT LIBRARY, COUNT(*) FROM TREASURE GROUP BY LIBRARY HAVING COUNT(*) >= 2 ; 62 Query: Result:
10
Joining tables □ After “FROM”: Mention the two tables that you want to join □ After “WHERE”: Explain HOW the tables are related (PK = FK) □ INNER JOIN May result in a loss of information
11
Subjects that have been assigned to two or more treasures in the database SELECT S.SUBJECT, COUNT(*) FROM TREASURE T, SUBJECT S WHERE T.SUBJECT = S.CODE GROUP BY S.SUBJECT HAVING COUNT(*) > 1 Query: Result: Art and architecture4 History3
12
□ MySQL: open source RDBMS □ Extensive documentation on MySQL website □ Databases are built using SQL queries
13
□ MySQL may be used via command prompt; □ Database can also be accessed, for instance, via PHP (PHPmyAdmin)
14
PHP: Hypertext Preprocessor
15
HTML PHP http SERVER CLIENT HTML
17
PHP http MySQL SERVER CLIENT HTML db
18
Public interface
19
Visualisation code libraries □ D3.js □ Google charts
20
Visualisation of BTCP data □ Line charts Line charts □ Bar charts Bar charts □ Georeferencing Georeferencing
21
BTCP Database
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.