Introduction to Database System Wei-Pang Yang, IM.NDHU, 2006 2006 Midterm Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account.

Slides:



Advertisements
Similar presentations
Introduction to Database System Wei-Pang Yang, IM.NDHU, Final Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account.
Advertisements

Chapter 4: Immediate SQL Complex Queries Complex Queries Views Views Modification of the Database Modification of the Database Joined Relations Joined.
E-R Diagram for a Banking Enterprise
Domain Relational Calculus and Query-by-Example CS157a John Eagle.
BRANCH-SCHEME (BRANCH-NAME, ASSETS, BRANCH-CITY)
Chapter 2 Relational Model (part II) Hankz Hankui Zhuo
The Relational Database Model
SQL Sangeeta Devadiga CS157A, Fall Outline Background Data Definition Basic Structure Set Operation.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Ordering the Display of Tuples List in alphabetic order the names of all customers having.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Extended Relational-Algebra-Operations Generalized Projection Outer Join Aggregate Functions.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Chapter 4: SQL Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries.
Temple University – CIS Dept. CIS331– Principles of Database Systems V. Megalooikonomou Query by example (based on notes by Silberchatz,Korth, and Sudarshan.
SQL Neyha Amar CS 157A, Fall Inserting The insert statement is used to add a row of data into a table Strings should be enclosed in single quotes,
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. SQL - part 2 - Database Management Systems I Alex Coman, Winter 2006.
MySQL Tutorial (2) Introduction to Database. Banking Example branch (branch-name, branch-city, assets) customer (customer-name, customer-street, customer-city)
Relational Algebra. Relational Query Languages n Query = “retrieval program” n Language examples: ù Theoretical : 1. Relational Algebra 2. Relational.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Calculus Objectives  Tuple Calculus  Domain Calculus  QBE & SQL  Related Examples.
-- Introduction to database principles Maoying Wu March 11, 2013 Chapter 3: Basic SQL.
International Computer Institute, Izmir, Turkey SQL Asst.Prof.Dr.İlker Kocabaş UBİ502 at
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Chapter 4: SQL Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries.
SQL. Basic Structure SQL is based on set and relational operations with certain modifications and enhancements A typical SQL query has the form: select.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Null Values It is possible for tuples to have a null value for some of their attributes The.
©Silberschatz, Korth and Sudarshan5.1Database System Concepts Chapter 5: Other Relational Languages Query-by-Example (QBE) Datalog.
Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account.
Lecture 6 Structured Query Language SQL Lecture 6 Structured Query Language SQL Instructor: Haya Sammaneh.
3.1 Chapter 3: SQL Schema used in examples p (omit 3.8.2, , 3.11)
Structured Query Language 2 Presented by: Annisa, M.Kom. Source: Database System Concepts 5 th edition.
Relational Model: Examples. Banking Example branch (branch_name, branch_city, assets) customer (customer_name, customer_street, customer_city) account.
CS 370 Database Systems Lecture 12 Introduction to SQL.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts - 5 th Edition, Oct 5, 2006 Outer Join n An extension of the join operation that avoids loss.
©Silberschatz, Korth and Sudarshan5.1Database System Concepts Chapter 5: Other Relational Languages Query-by-Example (QBE)
CS 370 Database Systems Lecture 11 Relational Algebra.
Introduction to Database System Wei-Pang Yang, IM.NDHU, Final Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account.
Computing & Information Sciences Kansas State University Monday, 08 Sep 2008CIS 560: Database System Concepts Lecture 5 of 42 Monday, 08 September 2008.
Chapter 8: SQL. Data Definition Modification of the Database Basic Query Structure Aggregate Functions.
Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account.
IS 230Lecture 6Slide 1 Lecture 7 Advanced SQL Introduction to Database Systems IS 230 This is the instructor’s notes and student has to read the textbook.
國立東華大學 資訊管理學系 資料庫管理 試題 Wei-Pang Yang, IM.NDHU, /6/20 Final Test-1 Suppose we have a relationship set borrower between customer and loan as shown.
WDM3304 week 6 Table Joins. Primary keys, foreign keys Primary key: A field of a table designated to provide a unique identifier for a specific row of.
Source: Database System Concepts, Silberschatz etc Edited: Wei-Pang Yang, IM.NDHU, Introduction to Database CHAPTER 5 Other Relational Languages.
Chapter 4: SQL Complex Queries Complex Queries Views Views Modification of the Database Modification of the Database Joined Relations Joined Relations.
Chapter 2: Relational Model II Relational Algebra basics Relational Algebra basics.
2.1 Chapter 2: Relational Model. 2.2 Chapter 2: Relational Model Structure of Relational Databases Fundamental Relational-Algebra-Operations Additional.
Source: Database System Concepts, Silberschatz etc Edited: Wei-Pang Yang, IM.NDHU, Introduction to Database CHAPTER 2 RELATIONAL MODEL 2.1.
Database System Concepts, 5 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Relational.
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Database System Concepts, 5th Ed. Bin Mu at Tongji University Chapter 5: Other Relational Languages.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Extended Relational-Algebra-Operations Generalized Projection Aggregate Functions Outer Join.
Computing & Information Sciences Kansas State University Friday, 08 Sep 2006CIS 560: Database System Concepts Lecture 07 of 42 Tuesday, 30 January 2007.
MySQL Tutorial Introduction to Database. Introduction of MySQL  MySQL is an SQL (Structured Query Language) based relational database management system.
Relational Algebra HW2 Turn in as a hardcopy at the start of next class period. You may work this assignment in groups.
ICOM 5016 – Introduction to Database Systems Lecture 6 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Index in Database Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Nested Subqueries in SQL By Kenneth Cheung CS 157A Section 2 Professor Lee.
1 Session 3 Welcome: To session 3-the fourth learning sequence “Relational algebra “ Recap : In the previous learning sequences, we discussed the four.
ASET Relational Algebra continues…. ASET Rename Operation Allows us to name, and therefore to refer to, the results of relational-algebra expressions.
Source: Database System Concepts, Silberschatz etc Edited: Wei-Pang Yang, IM.NDHU 3-1 Introduction to Database CHAPTER 3 SQL Data Definition Basic.
Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account.
Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account.
Query Languages Language in which user requests information from the database. Categories of languages Procedural Non-procedural, or declarative “Pure”
Structured Query Language
CS 480: Database Systems Lecture 17 February 22, 2013.
國立東華大學試題 系所:資訊管理學系 科目:資料庫管理 第1頁/共6頁
Instructor: Mohamed Eltabakh
Introduction to Database
Question 1: Basic Concepts (40 %)
Example: Banking Database
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Example: Banking Database
CS 405G: Introduction to Database Systems
Presentation transcript:

Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-1 Example: Banking Database 1. branch 2. customer 客戶 ( 存款戶, 貸款戶 ) 5. account 存款帳 3. depositor 存款戶 6. loan 貸款帳 4. borrower 貸款戶 分公司 國立東華大學試題 : 資料庫管理 資訊管理學系

Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-2 Question 1: Write SQL and Output the Results (25%) Using the Example -- Banking Database, answering the queries: a)Find the loan number for each loan of an amount greater than $1200 b)Find the names of all branches in the loan relations, and remove duplicates c)How many tuples of the following statement? select  from borrower, loan e)How many tuples of the following statement? And what is the output? select distinct customer-name from borrower, loan where borrower loan-number = loan.loan-number and branch-name = ‘Perryridge’

Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-3 Assume we have two relations: employee and ft-works as follows: Question 2: Join Operations (20%) employee E ft-works F a) Draw the result of natural join: employee ft-works E.employee-name = F.employee-name c) Draw the result of full outer join: employee ft-works E.employee-name = F.employee-name b) Draw the result of right outer join: employee ft-works E.employee-name = F.employee-name d) Write a SQL statement to do a) above.

Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-4 Assume we have two queries: Q1 and Q2 as follows: Question 3: View (20%) b) If we want to add a new tuple to big-customer insert into big-customer values (‘A-999’, ‘Hualien’) Where the insertion values will be placed? Draw a table to show your answer. a) Draw the result of Q2 c) What are the advantages of the View? Q1. create view big-customer as (select account-number, branch-name from account where balance > 500 Q2 select * from big-customer

Introduction to Database System Wei-Pang Yang, IM.NDHU, Midterm Test-5 Question 4: Fill in the following components to the Overall System Structure and explain them in details (35%) low-level data stored database 1. Query Processor 2. Storage Manager 3. Database administrator 4. Application programmers 5. DDL interpreter 6. Compiler and Linker 7. Buffer manager 8. Data dictionary 9. Index 10. Data 11. Na ï ve users 12. Application programs