Database Management Systems
Course 236363 Faculty of Computer Science Technion – Israel Institute of Technology
Database Management Systems Course 236363 Lecture 1: Introduction - - PowerPoint PPT Presentation
Faculty of Computer Science Technion Israel Institute of Technology Database Management Systems Course 236363 Lecture 1: Introduction DATABASES 2 3 Modeling The real world: Objects - unique Relationships between objects at
Course 236363 Faculty of Computer Science Technion – Israel Institute of Technology
2
3
4
6
8
9
10
Student Name ID Phone Course Name Numbe r Lecturer Took Address
11
Student Name ID Phone Course Name Numbe r Took Address Semester Year Lecturer Gave Semester Year Name ID Phone Address emp#
12
Student Course Name Numbe r Took Semester Year Gave Semester Year Person Name ID Phone Address Lecturer emp# ISA ISA
13
sID sName sAddr cNum cName cLecturer grade 1234 Avia Haifa 363 DB Anna 95 1234 Avia Haifa 319 PL Barak 82 2345 Boris Nesher 319 PL Barak 73
Option 1: Single Table StudentCourseRegistry Drawbacks:
stored in each course she takes?
courses? Course w/o students?
update all records of relevant tuples; risk inconsistency or require more expensive controls
app will need to update its schema assumption
14
sID sName sAddr cNum cName cLecturer grade 1234 Avia Haifa 363 DB Anna 95 1234 Avia Haifa 319 PL Barak 82 2345 Boris Nesher 319 PL Barak 73
Option 1: Single Table Option 2: Multiple Tables
ID name addr 1234 Avia Haifa 2345 Boris Nesher
StudentCourseRegistry Student
number name lecturer 363 DB Anna 319 PL Barak
Course
sID cNum grade 1234 363 95 1234 319 82 2345 319 73
Took How can we formalize what “goodness” means? Need to understand the connection between sID and sName, etc. Drawback: join required more often...
15
16
17
ID name addr 1234 Avia Haifa 2345 Boris Nesher
Student
number name lecturer 363 DB Anna 319 PL Barak
Course
sID cNum grade 1234 363 95 2345 319 73
Took
18
Assembly Python
. . . m
r ax m
r di m
es s a ge , % r s i m
% r dx s ys c a l l m
r a x xor % r di , % r di . . . f or s i n S: f or c i n C: f or t i n T: i f s . s Nam e ==‘ Avi a ’ a nd s . I D==t . s I D a nd t . c Num == c . num be r : pr i nt c. na m e SELECT C. nam e FROM S, C, T W HERE S. nam e = ‘ Avi a’ AND S. I D = T. s I D AND T. c Num = C. num be r
SQL
Q( x) S( y, ‘ Avi a ’ , n) , C( z , x, l ) , T( y, z, g)
ID name addr 1234 Avia Haifa 2345 Boris Nesher
S
number name lecturer 363 DB Anna 319 PL Barak
C
sID cNum grade 1234 363 95 1234 319 82 2345 319 73
T Logic Programming (Datalog)
πC. na m
e( σS. na m e =‘ Avi a ’ , num be r =c Num , I D=s I D( S⨉C⨉T) ) )
Algebra (RA)
{⟨x⟩| ∃y, n, z , l , g [ S( y, ' Avi a ‘ , n) ∧C( z , x, l ) ∧T( y, z , g) ] }
Logic (RC)
19
20
21
<students> <student id="100026"> <name>Joe Average</name> <age>21</age> <major>Biology</major> <results> <result course="Math 101" grade="C-"/> <result course="Biology 101" grade="C+"/> <result course="Statistics 101" grade="D"/> </results> </student> <student id="100078"> <name>Jack Doe</name> <age>18</age> <major>Physics</major> <major>XML Science</major> <results> <result course="Math 101" grade="A"/> <result course="XML 101" grade="A-"/> <result course="Physics 101" grade="B+"/> <result course="XML 102" grade="A"/> </results> </student> </students>
100026 Joe Average Math 101 C
students student id name results result result student course grade
22
23
<?xml version="1.0" encoding="UTF-8"?> <!ELEMENT CustomerName (#PCDATA)> <!ELEMENT CustomerAddress (#PCDATA)> <!ELEMENT Customer (CustomerName, CustomerAddress)> <!ATTLIST Customer CustomerNum ID #REQUIRED Accounts IDREFS #IMPLIED> <!ELEMENT Customers (Customer)*> <!ELEMENT Balance (#PCDATA)> <!ELEMENT Account (Balance)> <!ATTLIST Account AccountNum ID #REQUIRED CustomerIn IDREFS #IMPLIED> <!ELEMENT Accounts (Account)*> XML Schema – a more sophisticated mechanism, separates tags and the data types they contain
24
25
26
http://geekandpoke.typepad.com/
27
28
29
30
31
32
Bachman
33
Edgar F. Codd (1923-2003)
– [E. F. Codd: Relational Completeness of Data Base
Edgar F. Codd (1923-2003)
35
36
Chamberlin
37
(1947-1974)
38
1980 1990 2000
Schema Design
forms, dependency
System Design
in-memory, recovery
Transaction & concur. Incompleteness (null) Query Languages
recursion, nesting
Logic
DB Performance
Data Models
Database Security System Optimization
Benchmarking Views
Heterogeneity
Data Models
Mining & Discovery
association rules
Analytics (OLAP)
* Based on SIGMOD session topics from DBLP
Schema Matching & Discovery Further XML
Database Privacy DB Uncertainty
cleaning
Data Models
DB & IR
Ranking & personalization Entity Resolution Information Extraction from Web/text Column Stores Social Networks & Social Media Cloud Databases Provenance/ lineage
Data Models
key-value)
DB & ML & AI Crowdsourcing
in databases
Data Exchange
39
40
41