Download presentation

Presentation is loading. Please wait.

Published byAlejandro Hensley Modified over 4 years ago

1
Information Systems & Semantic Web University of Koblenz Landau, Germany Advanced Data Modeling Relational Data Model continued Steffen Staab with Simon Schenk TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AAA

2
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de2 Overview Relational algebra, named perspective Aggregates and grouping SQL Integrity constraints

3
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de3 Constant { { a 1 = v 11, …, a n = v 1n }, … …… { a 1 = v k1, …, a n = v kn } }

4
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de4 Union Let R1, R2 be relations with the same attributes. R1 [ R2 = { t | t 2 R 1 or t 2 R 2 }

5
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de5 Union, example AB ® 1 ® 2 ¯ 1 AB ® 1 ® 2 ¯ 1 ¯ 3 AB ® 2 ¯ 3 R1R1 R2R2 R 1 [ R 2

6
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de6 Renaming Let R be a relation whose set of attributes is a 1,…,a n, c 1,…,c m Let b 1, …, b n be distinct attributes such that {b 1, …, b n } Å { c 1, …, c m } = ; Then ½ a 1 ! b 1, …, a n ! b n (R) = {{b 1 = v 1, …, b n =v n, c 1 =w 1, …, c m =w m } | {a 1 = v 1, …, a n =v n, c 1 =w 1, …, c m =w m } 2 R}

7
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de7 Set difference Let R 1, R 2 be relatations with the same attributes. R 1 – R 2 = { t | t 2 R 1 and t R 2 }

8
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de8 Set difference, example AB ® 1 ® 2 ¯ 1 AB ® 1 ¯ 1 AB ® 2 ¯ 3 R1R1 R2R2 R 1 - R 2

9
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de9 SQL SQL is based on set and relational operations with certain modifications and enhancements A typical SQL query has the form: select a_1, …, a_n from R_1, …, R_m where P This query is equivalent to relational algebra expression: ¼ a 1,…, a n ( ¾ P (R 1 £ … £ R m )) The result of an SQL query is a relation. Exceptions?

10
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de10 Integrity constraints Domain constraints. Key constraints. Foreign key constraints. More general, defined constraints.

11
ISWeb - Information Systems & Semantic Web Steffen Staab staab@uni-koblenz.de11 Query language Allow one to define: Relation and database schemas; Relations through our relations; Integrity constraints; Updates.

Similar presentations

OK

International Computer Institute, Izmir, Turkey SQL Asst.Prof.Dr.İlker Kocabaş UBİ502 at

International Computer Institute, Izmir, Turkey SQL Asst.Prof.Dr.İlker Kocabaş UBİ502 at

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Download free ppt on active and passive voice Ppt on statistics and probability for dummies Ppt on ic fabrication steps Ppt on column chromatography videos Ppt on advanced construction materials and techniques Ppt on idiopathic thrombocytopenic purpura definition Ppt on statistics and probability worksheets Ppt on cross-sectional study psychology Ppt on microcontroller based home security system Ppt on rural livelihood in india