1 / 8

Aljabar Relasional

Aljabar Relasional. Pertemuan 22. Pertemuan 22. Pokok Bahasan / GBPP Silabus :. OPERASI PADA ALJABAR RELASIONAL STUDI KASUS ALJABAR RELASIONAL. Contoh Skema Tabel Perbankan ( ada 6 tabel ). branch (branch-name, branch-city, assets)

Download Presentation

Aljabar Relasional

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AljabarRelasional Pertemuan 22

  2. Pertemuan22 PokokBahasan / GBPP Silabus : • OPERASI PADA ALJABAR RELASIONAL • STUDI KASUS ALJABAR RELASIONAL

  3. ContohSkemaTabelPerbankan(ada 6 tabel) • branch (branch-name, branch-city, assets) • customer (customer-name, customer-street, customer-only) • account (account-number, branch-name, balance) • loan (loan-number, branch-name, amount) • depositor (customer-name, account-number) • borrower (customer-name, loan-number)

  4. ContohAljabaruntuk Query • Menampilkan/ carisemua loan yang nilainyalebihdari $1200 σamount> 1200 (loan) • Menampilkan/ carinomor loan untuksemua loan yang nilainyalebihdari $1200 Πloan-number(σamount> 1200 (loan))

  5. ContohAljabaruntuk Query • Menampilkan/ carinamasemua customer yang mempunyai loan, account, ataukeduanya. Π customer-name(borrower) U Πcustomer-name(depositor) • Menampilkan/ carinamasemua customer yang mempunyai loan dan account. Πcustomer-name(borrower) ∩ Πcustomer-name(depositor)

  6. ContohAljabaruntuk Query • Menampilkan/ carinamasemua customer yang mempunyai loan di branch Perryridge. Πcustomer-name(σbranch-name=“Perryridge” (σborrower.loan-number = loan.loan-number(borrower x loan))) • Carinamasemua customer yang mempunyai loan di branch Perryridge, tetapitidakmempunyai account di branch manapun. Πcustomer-name(σbranch-name = “Perryridge” (σborrower.loan-number = loan.loan-number(borrower x loan))) – Πcustomer-name(depositor)

  7. Contoh Query • Cari nama semua customer yang mempunyai loan di branch Perryridge. • Query 1 Πcustomer-name(σbranch-name=“Perryridge” ( σborrower.loan-number=loan.loan-number(borrower x loan))) • Query 2 Πcustomer-name(σloan.loan-number=borrower.loan- number((σbranch-name=“Perryridge”(loan)) x borrower))

  8. Latihan : • Diketahuiskema basis data sbb: employee (person-name, street, city) works (person-name, company-name, salary) company (company-name, city) manages (person-name, manager-name) • Tampilkan semua nama dan kota employee • Tampilkan nama semua employee dengan pasangan manager mereka. • Tampilkan semua nama employee yang bekerja pada company First Bank Corporation. • Tampilkan nama dan kota tempat tinggal semua employee yang bekerja di First Bank Corporation. • c. Tampilkan nama, alamat dan kota tempat tinggal semua employee yang bekerja di First Bank Corporation dan berpenghasilan lebih dari $10,000. • d. Tampilkan nama semua employee yang tinggal di kota yang sama dengan perusahaan dimana mereka bekerja. • e. Tampilkan nama semua employee yang tidak bekerja di First Bank Corporation.

More Related