Chapter 1 Introduction to Database...

43
Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database Processing

Transcript of Chapter 1 Introduction to Database...

Page 1: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Fundamentals, Design, and Implementation, 9/e

Chapter 1Introduction to Database Processing

Page 2: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/2Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Başlangıçta Dosya İşleme Sistemleri Vardı

İlk iş bilgi sistemleri bilgiyi benzer verileri ayrı dosyalarda gruplayarak depoladı.

Page 3: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/3Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Dosya İşleme Sistemi

Page 4: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/4Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Dosya İşleme Sistemleriyle İlgili Sorunlar

Veriler birbirinden ayrı ve izole edilmişÇoğunlukla veri tekrarı varUygulama programına bağımlıBirbirine uymayan (incompatible) veri dosyalarıAnlaşılması zor

Page 5: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/5Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri tekrarı

Aynı veriyi farklı yerlerde depolarken tutarsızlık olasılığı çok yüksek.Gerçek ad ne?– Tablo 1: Benim adım Dan– Tablo 2: Benim adım Danielle – Tablo 3: Benim adım Daniel– Tablo 4: Benim adım Don

Page 6: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/6Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Niçin veri tabanı kullanalım?Bir veri tabanının amacı kişilere ve örgütlere nesnelerle ilgili kayıt tutmada yardımcı olmaktırVeri depolamak için liste kullanmanın getirdiği sorunlar– Veri tutarsızlıkları– Veri mahremiyeti/gizliliği: Bölümler bazı

verilerini paylaşmak isteyebilirler, ama tümünüdeğil

Veri tabanları tek konulu tablolarda verileri depolarTablolar ana ve yabancı anahtarlar aracılığıyla ilişkilendirilir

Page 7: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/7Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

VTYS’de Veri

Veri bütünleşikVeri tekrarı azaltılmışVeri programdan bağımsızVeriyi anlamak kolay

Page 8: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/8Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

VTYS

Page 9: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/9Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri tabanı kendi kendini tanımlar

Bir veri tabanı veri sözlüğü içerirVeri sözlüğü veri hakkında veridir (metadata)– Veri tabanında depolanan bilginin

yapısını ve biçimini tanımlar

Page 10: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/10Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Hiyerarşisi

Dosya işleme

VTYS

Page 11: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/11Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Depolanan Veri Türleri

Günümüzde daha yeni veri tabanlarının çoğu değişik türde veri depolayabiliyor . . .– Ölçek veri

• Adlar, tarihler, telefon no’ları– Resimler– Ses– Video

Page 12: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/12Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Lakeview Teçhizat Listesi

Page 13: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/13Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Tablolarda Teçhizat Verileri

Page 14: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/14Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

CONTRACTOR Tablosu

Page 15: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/15Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Tablolar Arasındaki İlişkiler

Page 16: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/16Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Bir Veri Tabanı Sisteminin Bileşenleri

Page 17: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/17Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Uygulama Programları

İşlevler:– Form yaratmak ve işlemek– Soru yaratmak ve iletmek– Rapor yaratmak ve işlemek– Uygulama mantığını yürütmek– Uygulamayı denetlemek

Page 18: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/18Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

VTYS

VTYS: Veri Tabanı Yönetim Sistemiİşlevler:– Veri tabanını, tabloları ve destek yapıları yaratmak– Veri tabanı verilerini okumak ve güncellemek– Veri tabanı yapılarını yaşatmak– Kuralları uygulamaya zorlamak– Tutarlılığı denetlemek– Güvenliği sağlamak– Veri tabanını yedeklemek ve gerektiğinde eski haline

döndürmek Örnek: Oracle, DB2, Microsoft Access, SQL Server

Page 19: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/19Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri tabanı

Veri tabanı ilgili kayıtların ya da tabloların kendi kendini tanımlayan bir koleksiyonuBileşenler:– Kullanıcı verileri– Metadata: veri tabanının yapısı hakkında veriler– Dizinler ve ilgili yapılar– Depolanmış yordamlar: veri tabanında

depolanmış program modülleri– Tetikleyiciler: belli bir veri etkinliği meydana

geldiğinde yürütülen yordam– Uygulama metadata’sı: formlar ya da raporlar

gibi uygulama ögelerini tanımlayan veriler

Page 20: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/20Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Tabanı Türleri

Kişisel veri tabanı– 1 kullanıcı; < 10 MB

Çalışma grubu veri tabanı– < 25 kullanıcı; < 100 MB

Örgütsel veri tabanı– Yüzbinlerce kullanıcı– >1 Trilyon bayt, muhtemelen birçok veri

tabanı

Page 21: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/21Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Tabanı Örneği 1Mary Richards Housekeeping

– Serbest girişimci– Tek kullanıcılı veri tabanı– 3 Tablo (Customers, Jobs, Source)– Veri gereksinimleri:

• Müşteri, iş ve referansların (tavsiyelerin) birbiriyle ilişkilerini izle

• İhale tahminlerini kaydet• Referans kaynaklarını izle• Adres etiketleri üret

Page 22: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/22Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Mary Richards Housekeeping

Page 23: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/23Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Tabanı Örneği 2

Treble Clef Music– Yerel ağ üzerinde çok kullanıcılı veri tabanı– 3 Tablo (Customers, Instruments, Rentals)– Veri gereksinimleri:

• Kiralanan enstrümanları izle• Birden çok kullanıcının sorunlarını hallet

Page 24: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/24Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Treble Clef Form 1

Page 25: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/25Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Treble Clef Form 2

Page 26: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/26Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Treble Clef Form 3

Page 27: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/27Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Tabanı Örneği 3

State Licensing & Vehicle Registration Bureau– 52 Merkez, 37 Ofis, Yüzlerce kullanıcı– 40 Tablo– Veri gereksinimleri:

• Ehliyetle ilgili sorunları izle– Trafik cezaları, kazalar, tutuklamalar, sınırlamalar

• Otomobil ruhsatlarıyla ilgili sorunları izle– Gelirler, yasa uygulama

• Birçok bölümün gereksinIntegrate the needs imlerini bütüneştir

Page 28: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/28Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Örnek:Örgütsel veri tabanı

Page 29: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/29Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Tabanı Örneği 4

Calvert Island Reservations Centre– Ticaret Odası– Verilere erişim sağlayan reklam (promosyon) veri tabanı– Müşteri ve yer ayırtma veri tabanı süreçleri– Veri gereksinimleri:

• Çokluortam verileri depola (fotoğraflar, video ve ses klipleri)• Web’den erişilebir olmalı• HTTP, DHTML, ve XML gibi web teknolojilerini kullanmalı

Page 30: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/30Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Farklı Veri Tabanlarının Özellikleri

Page 31: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/31Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Tabanı Sistemi Geliştirme

3 AşamaGerekirlik Aşaması: Bir veri modeli geliştirilir– Veri modeli veri tabanı yapısının mantıksal gösterimidir

Tasarım Aşaması: Veri modeli tablolara ve ilişkilere dönüştürülürKurulum Aşaması:– Tablolar, ilişkiler ve sınırlılıklar yaratılır– Depolanmış yordamlar ve tetikleyiciler yazılır– Veri tabanına veri girilir ve sistem denenir

Veri tabanı ve uygulamaları (aynı üç aşamayıkullanarak) yeni gereksinimleri karşılamak için değiştirilir

Page 32: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/32Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Uygulama GeliştirmeUygulama geliştirme veri tabanıgeliştirmeyle paralel yürütülür

Page 33: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/33Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Örnek: Veri Modeli

Page 34: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/34Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Lakeview Veri Yapısı Diyagramı

Page 35: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/35Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Veri Tabanı İşlemenin Tarihçesi

Page 36: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/36Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Erken Veri Tabanı Modelleri

1960’ların ortalarından önce sadece manyetik teyp kullanarak sıralı dosya işleme mümkündü1960’ların ortalarında disk üzerinde veri depolamanın başlamasıyla birlikte hiyerarşik ve ağ veri tabanları ortaya çıktı– IBM’s DL/I (Data Language One)– CODAYSL’s DBTG (Data Base Task Group)

modeli günümüzdeki VTYS’lerin temeli

Page 37: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/37Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

İlişkisel Model

E.F. Codd 1970’de ilişkisel modeli bulduIBM’in DB2’si ilişkisel modele dayalıilk VTYS ürünüdürilişkisel modele dayalı diğer VTYS’ler1980’lerin sonlarında geliştirildiGünümüzde DB2, Oracle, ve SQL Server ilişkisel modele dayalı en bilinen ticari VTYS ürünleridir

Page 38: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/38Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Kişisel Bilgisayar VTYS

Mikrobilgisayarın ortaya çıkışı kişisel veri tabanlarının popülerliğini artırdıGrafik Kullanıcı Arayüzü (GUI) veri tabanlarını kullanımı kolaylaştırdı– İlk VTYS örnekleri: dBase, R:base, ve

Paradox

Page 39: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/39Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Yakın Tarih

Microsoft Access’in başarı öyküsü– Microsoft Office suiti ve Windows’la

bütünleştirme– Kullanımı kolay ve güçlü bir VTYS

Internet veri tabanıXML ve veri tabanı bütünleştirme

Page 40: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/40Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

VTYS –Günümüzde

Ashton - Tate: dBase II, şimdiBorlandOracle, Focus, IngressParadox, Revelation, MDBS, Helix, Foxpro, Access (kişisel bilgisayarlar için)

Page 41: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/41Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

Nesne Yönelimli VTYS(OODBMS)

Nesne yönelimli programlama 1980’lerin ortasında başladıNYVTYS’nin amacı nesne yönelimli programlama nesnelerini ilişkisel formata dönüştürmeden bir veri tabanında depolamaktırOracle 8i ve 9i gibi nesne-ilişkisel VTYS ürünleri aynı veri tabanındaki verilerin hem ilişkisel hem de nesne görünümlerini verirNYVTYS ilişkisel modelden nesne yönelimliye dönüştürümün yüksek maliyetinden dolayıgünümüzde ticari başarı kazanamadı

Page 42: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Chapter 1/42Copyright © 2004 Database Processing: Fundamentals, Design and Implementation, 9/e

by David M. Kroenke

VTYS –Gelecekteki Yönelimler

İstemci-Sunucu (Client-Server) uygulamalarıInternet Teknolojisinin EntegrasyonuDağıtık işleme

Page 43: Chapter 1 Introduction to Database Processingyunus.hacettepe.edu.tr/~tonta/courses/fall2005/bby... · Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database

Fundamentals, Design, and Implementation, 9/e

Chapter 1Introduction to Database Processing