1 Pertemuan > Relational Model SQL DDL, SQL DML, Aljabar dan Kalkulus Matakuliah: >/ > Tahun: > Versi: >

Slides:



Advertisements
Similar presentations
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Advertisements

ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Tallahassee, Florida, 2014 COP4710 Database Systems Relational Model Fall 2014.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
Review Session ER and Relational –ER  Relational –Constraints, Weak Entities, Aggregation, ISA Relational Algebra  Relational Calculus –Selections/Projections/Joins/Division.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Book Chapter 3 (part 2 ) From ER to Relational Model.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke. Edited by Keith Shomper, The Relational Model Chapter 3.
COMP 5138 Relational Database Management Systems Sem2, 2007 Lecture 3 Relational Data Model.
CSC 411/511: DBMS Design 1 1 Dr. Nan WangCSC411_L3_Relational Model 1 The Relational Model (Chapter 3)
The Relational Model CMU SCS /615 C. Faloutsos – A. Pavlo Lecture #3 R & G, Chap. 3.
The Relational Model CMU SCS /615 C. Faloutsos – A. Pavlo Lecture #3 R & G, Chap. 3.
Database Management Systems 1 Raghu Ramakrishnan The Relational Model Chapter 3 Instructor: Mirsad Hadzikadic.
Pertemuan Entity Relationship Diagram
1 Pertemuan 26 Object Relational Database Management System (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 16 Object Query Language (Lanjutan bagian 3) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 23 Object database design (Lanjutan bagian 2) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
SPRING 2004CENG 3521 The Relational Model Chapter 3.
1 Pertemuan 14 Object Query Language (Lanjutan bagian 1) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 5 The structure part of object data model Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
The Relational Model 198:541 Rutgers University. Why Study the Relational Model?  Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle,
1 Data Modeling Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 Data Modeling Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 Minggu 2, Pertemuan 3 The Relational Model Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
1 Pertemuan 04 MODEL RELASIONAL Matakuliah: >/ > Tahun: > Versi: >
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
1 The Relational Model Chapter 3. 2 Objectives  Representing data using the relational model.  Expressing integrity constraints on data.  Creating,
The Relational Model Chapter 3
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 The Relational Model Chapter 3. 2 Why Study the Relational Model?  Most widely used model.  Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3 Modified by Donghui Zhang.
1 The Relational Model Chapter 3. 2 Why Study the Relational Model?  Most widely used model  Vendors: IBM, Informix, Microsoft, Oracle, Sybase  Recent.
 Relational database: a set of relations.  Relation: made up of 2 parts: › Instance : a table, with rows and columns. #rows = cardinality, #fields =
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
1 The Relational Model Chapter 3. 2 Why Study the Relational Model?  Most widely used model.  Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc.
1 The Relational Model Chapter 3. 2 Why Study the Relational Model?  Most widely used model.  Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc.
1.1 CAS CS 460/660 Relational Model. 1.2 Review E/R Model: Entities, relationships, attributes Cardinalities: 1:1, 1:n, m:1, m:n Keys: superkeys, candidate.
1 Database Systems ( 資料庫系統 ) October 4, 2005 Lecture #3.
1 Pertemuan 25 Object Relational Database Management System Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
The Relational Model Pertemuan 03 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 Database Systems ( 資料庫系統 ) October 4/5, 2006 Lecture #3.
CMPT 258 Database Systems The Relationship Model PartII (Chapter 3)
Lecture 3 Book Chapter 3 (part 2 ) From ER to Relational.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 3 The Relational Model.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
CMPT 258 Database Systems The Relationship Model (Chapter 3)
The Relational Model Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY.
ICS 421 Spring 2010 Relational Model & Normal Forms Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/19/20101Lipyeow.
CMPT 258 Database Systems Final Exam Review.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Mapping E/R to RM, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 Mapping E/R Diagrams to Relational Database Schemas Second Half of Chapter.
1 The Relational Model Chapter 3. 2 Why Study the Relational Model?  Most widely used model.  Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
1 The Relational Model Chapter 3. 2 Why Study the Relational Model?  Most widely used model.  Multi-billion dollar industry, $15+ bill in  Vendors:
COP Introduction to Database Structures
The Relational Model Lecture 3 INFS614, Fall
Database Systems (資料庫系統)
Presentation transcript:

1 Pertemuan > Relational Model SQL DDL, SQL DML, Aljabar dan Kalkulus Matakuliah: >/ > Tahun: > Versi: >

2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Mahasiswa dapat menggunakan Relational model SQL DDL, SQL DML, Aljabar, dan Kalkulus

3 Outline Materi Pengenalan Relational Model Relational Aljabar Relational Kalkulus SQL

4 PENGENALAN RELATIONAL MODEL BEBERAPA ISTILAH PENTING – RELATION SCHEMA – RELATION INSTANCE – FIELD / COLUMN / ATTRIBUTE – DOMAIN – TUPLE / RECORD – DEGREE / ARITY

5 PENGENALAN RELATIONAL MODEL Contoh : Cardinality = 3, degree = 5, all rows distinct

6 QUERY RELATIONAL DATA RELATIONAL DATABASE QUERY Relational database: a set of relations Relation: made up of 2 parts:  Instance : a table, with rows and columns. #Rows = cardinality, #fields = degree / arity.  Schema : specifies name of relation, plus name and type of each column. Contoh : Students(sid: string, name: string, login:string, age: integer, gpa: real).

7 QUERY RELATIONAL DATA QUERY LANGUAGES Contoh : Tampilkan pelajar yang berusia 18 th SELECT * FROM Students S WHERE S.age=18

8 DESAIN LOGIKAL DATABASE ENTITY SETS TO TABLES Employees ssn name lot

9 DESAIN LOGIKAL DATABASE RELATIONSHIP SETS TO TABLES (WITHOUT CONSTRAINT) TRANSLATING RELATIONSHIP SETS WITH KEY CONSTRAINT dname did since lot name ssn Manages Employees Departments budget

10 DESAIN LOGIKAL DATABASE TRANSLATING RELATIONSHIPS WITH PARTICIPATION CONSTRAINTS lot name dname budgetdid since name dname budgetdid since Manages since Departments Employees ssn Works_In

11 DESAIN LOGIKAL DATABASE TRANSLATING WEAK ENTITY SETS lot name age pname Dependents Employees ssn Policy cost

12 DESAIN LOGIKAL DATABASE TRANSLATING CLASS HIERARCHIES Contract_Emps name ssn Employees lot hourly_wages ISA Hourly_Emps contractid hours_worked

13 DESAIN LOGIKAL DATABASE TRANSLATING ER DIAGRAMS WITH AGGREGATION ER TO RELATIONAL

14 PENGENALAN VIEWS UPDATE DESTROYING DROP TABLE Students ALTERING ALTER TABLE Students ADD COLUMN firstYear: integer

15 RELASI ALJABAR SELECTION DAN PROJECTION SET OPERATIONS –UNION –INTERSECTION –SET DIFFERENCE –CROSS-PRODUCT RENAMING JOINS DIVISION

16 RELASI ALJABAR R1 S1 S2

17 RELASI ALJABAR

18 RELASI ALJABAR

19 RELASI ALJABAR A B1 B2 B3 A/B1A/B2A/B3

20 RELASI KALKULUS TUPLE RELATIONAL CALCULUS DOMAIN RELATIONAL CALCULUS

21 SQL QUERY DASAR DML DDL SELECT UNION, INTERSECT, AND EXCEPT

22 SQL QUERY LANJUTAN NESTED QUERIES AGGREGATE OPERATORS – GROUP BY – HAVING NULL VALUES TRIGGERS AND ACTIVE DATABASES DESIGNING ACTIVE DATABASES

23 > Dilanjutkan ke pert. 03 Pengembangan Aplikasi Basis Data