Digital Media Technology
description
Transcript of Digital Media Technology
![Page 1: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/1.jpg)
Digital Media Technology
Week 10
![Page 2: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/2.jpg)
foreign keyprimary key
TREASURE_ID TITLE CREATOR LIBRARY SUBJECT YEAR
1 Sidereus Nuncius 7 7 SCI 1610
2 Requiem KV 626 2 1 MUS 1791
3 Rabbit Hunt, in the lower left Brueghel 1560. 3 3 ART 1560
4 De antiquitate Britanicae Ecclesiae 8 4 ART 1572
5 Vedute di Roma con scene di costume 6 6 HIS 1810
6 Corrected page proofs of 'Les Fleurs du mal' 1 2 HIS 1857
7 Vinegar Hill, charge of the 5th Dragoon Guards 4 5 HIS 1880
8 Poster of "Internationale Ausstellung für Buchgewerbe und Graphik" 5 9 ART 1914
9 Fontana dei Fiumi a Piazza Navona 9 6 ART 1734
CREATOR_ID NAME_LAST NAME_FIRST YEAR_OF_BIRTH YEAR_OF_DEATH COUNTRY_BORN
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
![Page 3: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/3.jpg)
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
);
![Page 4: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/4.jpg)
FK = PK
![Page 6: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/6.jpg)
Entity Relationship Diagrams
![Page 7: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/7.jpg)
PERSON
P_IDNAMEE-MAILPHONEDATE_OF_BIRTH
Attributes
PK is underlined
![Page 8: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/8.jpg)
BOOK
PERSON
COMPANY
![Page 9: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/9.jpg)
□ Cardinality: how many instances of the entity can be associated with one instance of the related entity?
BOOK COMPANY
![Page 10: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/10.jpg)
STUDENT COURSE
ENROLMENT
![Page 11: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/11.jpg)
PERSON COMPANY
many many
EMPLOYMENT
P_ID C_ID
P_IDC_ID
E_ID
many
one
many
one
![Page 12: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/12.jpg)
Making an ERD□ Identify entities□ Consider the cardinality of the relations
between these entities□ One-to-one relations must be removed –
these entitites can be combined in a single entity
□ Change many-to-many relations into one-to-many relations by making use of linking tables
□ Add attributes
![Page 13: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/13.jpg)
code nameuk Great Britainfr Francene The Netherlandsbe Belgium
A look-up table
(based on ISO 3166-1993 )
![Page 14: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/14.jpg)
Name Country_bornShelley, Percy Bysshe Great BritainSwinburne, Algernon Charles
Britain
Cowper, William United KingdomColeridge, Samuel Taylor U.K.
![Page 15: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/15.jpg)
Name Country_bornShelley, Percy Bysshe ukSwinburne, Algernon Charles
uk
Cowper, William ukColeridge, Samuel Taylor uk
![Page 16: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/16.jpg)
Referential Integrity
□ Each foreign key should correspond to an existing primary key.
□ Most DBMSs take measures to prevents users or applications from entering inconsistent data.
![Page 17: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/17.jpg)
CREATE TABLE BOOK( B_ID INT NOT NULL AUTO_INCREMENT,
TITLE VARCHAR (50), AUTHOR INT,LANGUAGE VARCHAR (40),PUBLISHER INT,EXTENT INT,YEAR INT(4),PRIMARY KEY (B_ID),FOREIGN KEY (AUTHOR) REFERENCES
PERSON ON DELETE RESTRICT ON UPDATE CASCADE,
FOREIGN KEY (PUBLISHER) REFERENCES COMPANY ON DELETE RESTRICT ON UPDATE CASCADE );
![Page 18: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/18.jpg)
Interpretation continuum
Data: relatively unstructured
Information: very structured
Source: Obrst and Liu, Knowledge representation, Ontological Engineering and Topic Maps, in: XML Topic Maps, 2003
![Page 19: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/19.jpg)
□ SQL: Structured Query Language
□ Supported by most RDBMSs.
□ Makes use of regular English words
![Page 20: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/20.jpg)
SELECT TITLE, YEARFROM TREASURE ;
TITLE YEARSidereus Nuncius 1610
Requiem KV 626 1791
Rabbit Hunt, in the lower left Brueghel 1560.
1560
De antiquitate Britanicae Ecclesiae 1572
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 Navona 1734
![Page 21: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/21.jpg)
SELECT * FROM TREASURE ;
treasure_id title year creator library subject1 Sidereus Nuncius 1610 7 7 SCI
2 Requiem KV 626 1791 2 1 MUS
3 Rabbit Hunt, in the lower left Brueghel 1560.
1560 3 3 ART
4 De antiquitate Britanicae Ecclesiae
1572 8 4 ART
5 Vedute di Roma con scene di costume
1810 6 6 HIS
6 Corrected page proofs of 'Les Fleurs du mal'
1857 1 2 HIS
7 Vinegar Hill, charge of the 5th Dragoon Guards
1880 4 5 HIS
8 Poster of "Internationale Ausstellung für Buchgewerbe und Graphik"
1914 5 8 ART
9 Fontana dei Fiumi a Piazza Navona
1734 9 6 ART
![Page 22: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/22.jpg)
SELECT TITLE, YEARFROM TREASUREORDER BY YEAR ;
TITLE YEARRabbit Hunt, in the lower left Brueghel 1560.
1560
De antiquitate Britanicae Ecclesiae 1572
Sidereus Nuncius 1610
Fontana dei Fiumi a Piazza Navona 1734
Requiem KV 626 1791
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
![Page 23: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/23.jpg)
SELECT NAME_LAST, NAME_FIRST, (YEAR_OF_DEATH - YEAR_OF_BIRTH) AS AGE FROM CREATOR ;
NAME_LAST NAME_FIRST AGEBaudelaire Charles 46
Mozart Wolfgang Amadeus
35
Bruegel The Elder Pieter 44
Sadler William 57
Tiemann Walter 75
Macchiavelli Giacomo 55
Galilei Galileo 78
Parker Matthew 71
Wittel Caspar van 81
Molyneux Daniel 64
![Page 24: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/24.jpg)
SELECT TITLE, YEARFROM TREASUREWHERE YEAR > 1800 ;
TITLE YEARVedute 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
![Page 25: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/25.jpg)
SELECT DISTINCT SUBJECTFROM TREASURE ;
SUBJECTART
HIS
MUS
SCI
![Page 26: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/26.jpg)
![Page 27: Digital Media Technology](https://reader034.fdocuments.in/reader034/viewer/2022051700/56816039550346895dcf5aad/html5/thumbnails/27.jpg)