Download presentation
Presentation is loading. Please wait.
Published byGyles Butler Modified over 9 years ago
1
Digital Media Technology Databases / SQL 2 Fleur Praal 17 November 2015 Leiden University. The university to discover.
2
recap from last week Leiden University. The university to discover. Databases, relational data model, data redundancy, RDBMS tables, rows, columns, records, fields IDValueExtraSurplusProfitSale 14374160Pete 281212913Cindy 3121175275Pete 49963642Eve table row / record column field
3
recap from last week Leiden University. The university to discover. Relations: one-to-one = look-up table one-to-many many-to-many CodeCountry_name BELBelgium NLDThe Netherlands GERGermany country_bornauthor subject must be converted into one-to-many relations via junction table referential integrity: FK = PK
4
use of databases Leiden University. The university to discover. database design implementation data entry data retrieval: querying
5
use of databases Leiden University. The university to discover. database PHP HTML http SQL server client
6
use of databases client-side interface made for you to practice with Leiden University. The university to discover.
7
SQL Structured Query Language special-purpose programming language, designed for data management in RDBMS designed at IBM, early 1970s adopted as standard 1986 (ANSI/ISO) ever since, changed for/in particular systems, heavily used in trade Leiden University. The university to discover.
8
SQL Statements semicolon (;) as delimiter – Queries most often occurring statements – Clauses: specific instructions in statements FROM, WHERE, GROUP BY, HAVING, ORDER BY Predicates: based on 3VL and Boolean operators – logically consistent – Operators: to define predicate conditions =; != or <>; ; =; BETWEEN … AND; LIKE ‘…%’; IN; IS (NOT) NULL. Leiden University. The university to discover.
9
SQL querying 1.Which table(s) contain(s) the information that you need? 2.Are you interested in all the records in this/these table(s)? 3.Are you interested in the actual contents of the records or in statistical information about the records in the table? If so, would you like to receive one answer for the entire table, or would you like to receive different answers for different types of records? 4.Which columns do you want to see? 5.Do you want to see duplicate values or are you only interested in different values? 6.Do the records in the result set need to be sorted in any particular way? Leiden University. The university to discover.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.