Digital Media Technology Week 7. □ Database □ DBMS □ Data vs. Information □ Data redundancy □ Tables, Rows, Columns, Records, Fields □ Relational data.

Slides:



Advertisements
Similar presentations
Information Systems Technology Ross Malaga B Copyright © 2005 Prentice Hall, Inc. B-1 WORKING WITH DATABASES.
Advertisements

Relational Database and Data Modeling
Digital Media Technology Week 11. Implementation Database Design Retrieval Data entry.
Information Systems Today: Managing in the Digital World
Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
Digital Media Technology Week 11. □ Implementation □ Database Design □ Retrieval □ Data entry.
Digital Media Technology Week 13. Exercise 5, week 11.
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Keys, Referential Integrity and PHP One to Many on the Web.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Relational Model (CB Chapter 4) CPSC 356 Database Ellen Walker Hiram College.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
THE RELATIONAL DATABASE MODEL & THE DATABASE DEVELOPMENT PROCESS Fact of the Week: According to a Gartner study in ‘06, Microsoft SQL server had the highest.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
1004INT Information Systems Week 10 Databases as Business Tools.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
5 Chapter 5 Structured Query Language (SQL1) Revision.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Database – Part 2a Dr. V.T. Raja Oregon State University.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Transforming Data Models into Database Designs
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Database Systems Lecture 5 Natasha Alechina
N. J. Taylor Database Management Systems (DBMS) 1.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Chapter 5 Database Processing.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
The Relational Model These slides are based on the slides of your text book.
Chapters 17 & 18 Physical Database Design Methodology.
Digital Media Technology Week 9. The import of books from Britain into the Netherlands between 1850 and 1879 increased from f 21,085 to f 161,925, or.
Digital Media Technology Week 11. Stylesheet languages vs. Querying languages.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Digital Media Technology Week 10. foreign key primary key TREASURE_IDTITLECREATORLIBRARYSUBJECTYEAR 1Sidereus Nuncius77SCI1610 2Requiem KV 62621MUS1791.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Introduction to Accounting Information Systems
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
Relational Database Management Systems. A set of programs to manage one or more databases Provides means for: Accessing the data Inserting, updating and.
DBMS Spring 2014 Database Integrity Sources: Security in Computing, Pfleeger and Pfleeger, Prentice Hall, 2003 Lecture Slides, CSE6243, MSU, Rayford B.
SQL Structured Query Language Programming Course.
10/17/2012ISC471/HCI571 Isabelle Bichindaritz 1 Technologies Databases.
1 The Relational Model. 2 Why Study the Relational Model? v Most widely used model. – Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. v “Legacy.
M1G Introduction to Database Development 2. Creating a Database.
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.
Microsoft Access Intro Class 6 Relationships.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
1 The Information School of the University of Washington Dec 1fit advdatabases © 2006 University of Washington Advanced Database Concepts INFO/CSE.
IST 220 – Intro to Databases Lecture 3 Database Design Guidelines.
Information Systems Today: Managing in the Digital World TB3-1 3 Technology Briefing Database Management “Modern organizations are said to be drowning.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
Digital Media Technology Databases / SQL 2 Fleur Praal 17 November 2015 Leiden University. The university to discover.
Digital Media Technology Week 12. □ Remaining SQL theory □ MySQL □ Data visualisation Today’s lecture.
Connecting (relating) Data Tables to get Custom Records (Queries) Database Basics.
Digital Media Technology Week 10: Introduction to Relational Databases Peter Verhaar.
Database Design Chapter 9 Part-1: Concepts & Foreign Keys 1.
Chapter 3: Relational Databases
Constraints Advanced Database Systems Dr. AlaaEddin Almabhouh.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Year 12 > 13 Applied GCE ICT Unit 7 Using Database Software.
Tables & Relationships
CHAPTER 7 DATABASE ACCESS THROUGH WEB
Digital Media Technology
Introduction to Database Systems
Translation of ER-diagram into Relational Schema
INFO/CSE 100, Spring 2005 Fluency in Information Technology
CS4222 Principles of Database System
Databases.
Presentation transcript:

Digital Media Technology Week 7

□ Database □ DBMS □ Data vs. Information □ Data redundancy □ Tables, Rows, Columns, Records, Fields □ Relational data model □ RDBMS

foreign key primary key TREASURE_IDTITLECREATORLIBRARYSUBJECTYEAR 1Sidereus Nuncius77SCI1610 2Requiem KV 62621MUS1791 3Rabbit Hunt, in the lower left Brueghel ART1560 4De antiquitate Britanicae Ecclesiae84ART1572 5Vedute di Roma con scene di costume66HIS1810 6Corrected page proofs of 'Les Fleurs du mal'12HIS1857 7Vinegar Hill, charge of the 5th Dragoon Guards45HIS1880 8Poster of "Internationale Ausstellung für Buchgewerbe und Graphik"59ART1914 9Fontana dei Fiumi a Piazza Navona96ART1734 CREATOR _ID NAME_LASTNAME_FIRSTYEAR_OF_BIRTHYEAR_OF_DEATHCOUNTRY_BORN 1BaudelaireCharles FR 2MozartWolfgang Amadeus AT 3Bruegel The ElderPieter BE 4SadlerWilliam IE 5TiemannWalter DE 6MacchiavelliGiacomo IT 7GalileiGalileo IT 8ParkerMatthew GB 9WittelCaspar van NL 10MolyneuxDaniel IE

FK = PK

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 );

Entity Relationship Diagrams

PERSON P_ID NAME PHONE DATE_OF_BIRTH Attributes PK is underlined

BOOK PERSON COMPANY

□ Cardinality of many is represented by a line ending in a crow's foot.

PERSON COMPANY many EMPLOYMENT P_IDC_ID P_ID C_ID E_ID many one many one

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

General principle: avoid fields which contain values which can be derived from other fields. PRICENo. ITEMS ORDERED TOTAL PRICE € 205 € 100 PLACEPOPULATIONLAND AREADENSITY New York city7,322, ,705

codename ukGreat Britain frFrance neThe Netherlands beBelgium A look-up table (based on ISO )

NameCountry_born Shelley, Percy ByssheGreat Britain Swinburne, Algernon Charles Britain Cowper, WilliamUnited Kingdom Coleridge, Samuel TaylorU.K.

NameCountry_born Shelley, Percy Byssheuk Swinburne, Algernon Charles uk Cowper, Williamuk Coleridge, Samuel Tayloruk

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.

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 );

□ Implementation □ Data entry □ Database Design

HTML http SQL SERVER CLIENT HTML db

□ SQL: Structured Query Language □ Supported by most RDBMSs. □ Makes use of regular English words

Interpretation continuum Data: relatively unstructured Information: very structured Source: Obrst and Liu, Knowledge representation, Ontological Engineering and Topic Maps, in: XML Topic Maps, 2003

foreign key primary key TREASURE_IDTITLECREATORLIBRARYSUBJECTYEAR 1Sidereus Nuncius77SCI1610 2Requiem KV 62621MUS1791 3Rabbit Hunt, in the lower left Brueghel ART1560 4De antiquitate Britanicae Ecclesiae84ART1572 5Vedute di Roma con scene di costume66HIS1810 6Corrected page proofs of 'Les Fleurs du mal'12HIS1857 7Vinegar Hill, charge of the 5th Dragoon Guards45HIS1880 8Poster of "Internationale Ausstellung für Buchgewerbe und Graphik"59ART1914 9Fontana dei Fiumi a Piazza Navona96ART1734 CREATOR _ID NAME_LASTNAME_FIRSTYEAR_OF_BIRTHYEAR_OF_DEATHCOUNTRY_BORN 1BaudelaireCharles FR 2MozartWolfgang Amadeus AT 3Bruegel The ElderPieter BE 4SadlerWilliam IE 5TiemannWalter DE 6MacchiavelliGiacomo IT 7GalileiGalileo IT 8ParkerMatthew GB 9WittelCaspar van NL 10MolyneuxDaniel IE

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 NAME_LAST, NAME_FIRST, (YEAR_OF_DEATH - YEAR_OF_BIRTH) AS AGE FROM CREATOR ; NAME_LASTNAME_FIRSTAGE BaudelaireCharles46 MozartWolfgang Amadeus 35 Bruegel The ElderPieter44 SadlerWilliam57 TiemannWalter75 MacchiavelliGiacomo55 GalileiGalileo78 ParkerMatthew71 WittelCaspar van81 MolyneuxDaniel64

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

Exercise 5

Exercise 6