©Silberschatz, Korth and Sudarshan3.1Database System Concepts Banking Example  branch (branch-name, branch-city, assets)  customer (customer-name, customer-street,

Slides:



Advertisements
Similar presentations
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 5: Other Relational.
Advertisements

Chapter 3 Tuple and Domain Relational Calculus. Tuple Relational Calculus.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Chapter 3: Relational Model Structure of Relational Databases Relational Algebra Tuple Relational.
E-R Diagram for a Banking Enterprise
Domain Relational Calculus and Query-by-Example CS157a John Eagle.
BRANCH-SCHEME (BRANCH-NAME, ASSETS, BRANCH-CITY)
Relational Calculus Ameetinder Singh CS 157A. Tuple Relational Calculus  non-procedural query language as compared to relational algebra that is procedural.
©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.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Chapter 3: Relational Model Structure of Relational Databases Relational Algebra Extended.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Modification of the Database – Deletion Delete all account records at the Perryridge branch.
Recap of Mar 4: File Organization Major concepts: –Files are made up of records; records are made up of fields –Disk blocks are smaller than files and.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 11: Storage and.
SPRING 2004CENG 3521 E-R Diagram for the Banking Enterprise.
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)
©Silberschatz, Korth and Sudarshan1Database System Concepts Tuple and Domain Calculus Tuple Relational Calculus Domain Relational Calculus.
©Silberschatz, Korth and Sudarshan14.1Database System Concepts 3 rd Edition Chapter 14: Query Optimization Overview Catalog Information for Cost Estimation.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Calculus Objectives  Tuple Calculus  Domain Calculus  QBE & SQL  Related Examples.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 3: SQL.
©Silberschatz, Korth and Sudarshan6.1Database System Concepts Chapter 6: Integrity and Security Domain Constraints Referential Integrity Assertions Triggers.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Chapter 4: SQL Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries.
©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.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Chapter 3: Relational Model Structure of Relational Databases Relational Algebra Tuple Relational.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Chapter 3: Relational Model Structure of Relational Databases Relational Algebra Tuple Relational.
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.
©Silberschatz, Korth and Sudarshan11.1Database System Concepts Magnetic Hard Disk Mechanism NOTE: Diagram is schematic, and simplifies the structure of.
Temple University – CIS Dept. CIS331– Principles of Database Systems V. Megalooikonomou Relational Model III (based on notes by Silberchatz,Korth, and.
Computing & Information Sciences Kansas State University Tuesday, 06 Feb 2007CIS 560: Database System Concepts Lecture 10 of 42 Tuesday, 06 February 2007.
Database System Concepts, 5 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Relational.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Modification of the Database – Deletion Delete all tuples from the loan relation. delete.
©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.
Department of Computer Science, HKUST 1 Comp 231 Database Management Systems Comp 231 Database Management Systems 3. Relational Data Model.
©Silberschatz, Korth and Sudarshan5.1Database System Concepts Chapter 5: Other Relational Languages Query-by-Example (QBE)
Computing & Information Sciences Kansas State University Tuesday, 13 Feb 2007CIS 560: Database System Concepts Lecture 12 of 42 Tuesday, 13 February 2007.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 14 A First Course in Database Systems.
©Silberschatz, Korth and Sudarshan11.1Database System Concepts Chapter 11: Storage and File Structure File Organization Organization of Records in Files.
Computing & Information Sciences Kansas State University Thursday, 08 Feb 2007CIS 560: Database System Concepts Lecture 11 of 42 Thursday, 08 February.
Midterm 2 Revision Prof. Sin-Min Lee Department of Mathematics and Computer Science San Jose State University.
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany) DIRECTOR ARUNAI ENGINEERING COLLEGE TIRUVANNAMALAI.
©Silberschatz, Korth and Sudarshan5.1Database System Concepts Chapter 5: Other Relational Query Languages Tuple Relational Calculus Domain Relational Calculus.
ICOM 5016 – Introduction to Database Systems Lecture 8 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Chapter 8: SQL. Data Definition Modification of the Database Basic Query Structure Aggregate Functions.
Computing & Information Sciences Kansas State University Wednesday, 05 Sep 2007CIS 560: Database System Concepts Lecture 6 of 42 Wednesday, 05 September.
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.
2.1 Chapter 2: Relational Model. 2.2 Chapter 2: Relational Model Structure of Relational Databases Fundamental Relational-Algebra-Operations Additional.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Chapter 3: Relational Model Structure of Relational Databases Relational Algebra Extended.
The Relational Calculus (Based on Chapter 9 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Copyright © 2004 Ramez Elmasri and Shamkant Navathe The Relational Calculus The main reference of this presentation is the textbook and PPT from : Elmasri.
Database System Concepts, 5th Ed. Bin Mu at Tongji University Chapter 5: Other Relational Languages.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Module A: Formal Relational.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Extended Relational-Algebra-Operations Generalized Projection Aggregate Functions Outer Join.
Midterm 2 Revision Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Computing & Information Sciences Kansas State University Wednesday, 17 Sep 2008CIS 560: Database System Concepts Lecture 9 of 42 Wednesday, 18 September.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan Chapter 5: Other Relational Languages.
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,
IS 230Lecture 7Slide 1 Relational Algebra Lecture 8 Text Book – Chapter.
Chapter 3: Relational Model III Additional Relational Algebra Operations Additional Relational Algebra Operations Views Views.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Relational Model Structure of Relational Databases Relational Algebra Tuple Relational.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts Chapter 3: Relational Model Structure of Relational Databases Relational Algebra Tuple Relational.
©Silberschatz, Korth and Sudarshan6.1Database System Concepts Chapter 6: Integrity Constraints Domain Constraints Referential Integrity Assertions Triggers.
Query Languages Language in which user requests information from the database. Categories of languages Procedural Non-procedural, or declarative “Pure”
Introduction to Relational Calculus Tuple Relational Calculus
CS 480: Database Systems Lecture 16 February 20,2013.
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
Chapter 11: Storage and File Structure
Presentation transcript:

©Silberschatz, Korth and Sudarshan3.1Database System Concepts Banking Example  branch (branch-name, branch-city, assets)  customer (customer-name, customer-street, customer-city)  account (account-number, branch-name, balance)  loan (loan-number, branch-name, amount)  depositor (customer-name, account-number)  borrower (customer-name, loan-number)

©Silberschatz, Korth and Sudarshan3.2Database System Concepts Example Queries  Find the loan-number, for loans of over $1200  Find the loan number for each loan of an amount greater than $1200 Notice that a relation on schema [loan-number] is implicitly defined by the query {t.loan_number | t  loan   s  loan (t[loan-number] = s[loan- number]  s [amount]  1200)} {t.loan-number | t  loan  t [amount]  1200}

©Silberschatz, Korth and Sudarshan3.3Database System Concepts Example Queries  Find the names of all customers having a loan, or an account { t.customer_name | t  customer   s  borrower( t[customer-name] = s[customer-name])   u  depositor( t[customer-name] = u[customer-name])  Find the names of all customers who have a loan and an account at the bank {t.customer_name | t  customer   s  borrower( t[customer-name] = s[customer-name])   u  depositor( t[customer-name] = u[customer-name])

©Silberschatz, Korth and Sudarshan3.4Database System Concepts Example Queries  Find the names of all customers having a loan at the Perryridge branch { t.customer_name | t  customer   s  borrower( t[customer-name] = s[customer-name]   u  loan(u[branch-name] = “Perryridge”  u[loan-number] = s[loan-number]))  not  v  depositor (v[customer-name] = t[customer_name]) }  Find the names of all customers who have a loan at the Perryridge branch, but no account at any branch of the bank {t.customer_name | t  customer   s  borrower(t[customer-name] = s[customer-name]   u  loan(u[branch-name] = “Perryridge”  u[loan-number] = s[loan-number]))}

©Silberschatz, Korth and Sudarshan3.5Database System Concepts Example Queries  Find the names of all customers having a loan from the Perryridge branch, and the cities they live in { t.customer_name,t.customer_city | t  customer   s  loan(s[branch-name] = “Perryridge”   u  borrower (u[loan-number] = s[loan-number]  t [customer-name] = u[customer-name])   v  customer (u[customer-name] = v[customer-name]  t[customer-city] = v[customer-city])))} Note, v is redundant!

©Silberschatz, Korth and Sudarshan3.6Database System Concepts Example Queries  Find the names of all customers who have an account at all branches located in Brooklyn: {t.customer_name | t  customer   b  branch(b[branch-city] = “Brooklyn”   u  account ( b[branch-name] = u[branch-name]   s  depositor ( t[customer-name] = s[customer-name]  s[account-number] = u[account-number] )) )} Also {t.customer_name | t  customer   b  branch(b[branch-city] != “Brooklyn” V  u  account ( b[branch-name] = u[branch-name]   s  depositor ( t[customer-name] = s[customer-name]  s[account-number] = u[account-number] )) )}

©Silberschatz, Korth and Sudarshan3.7Database System Concepts Example Queries  Find the names of all customers who have an account at all branches located in Brooklyn: {t.customer_name | t  customer  not (  b) b  branch(b[branch-city] = “Brooklyn”  not (  u  account ( b[branch-name] = u[branch-name]   s  depositor ( t[customer-name] = s[customer-name]  s[account-number] = u[account-number] )) ) )} For each output customer, there does not exist a branch in Brooklyn such that There does not exist an account for that customer in that branch

©Silberschatz, Korth and Sudarshan3.8Database System Concepts Transforming the Universal and Existential Quantifiers ( x) (P(x))  not ( x)(not (P(x))) ( x) (P(x) and Q(x))  not ( x) (not (P(x)) or not (Q(x))) ( x) (P(x) or Q(x))  not ( x) (not (P(x)) and not (Q(x))) ( x) (P(x)) or Q(x))  not ( x) (not (P(x)) and not (Q(x))) ( x) (P(x) and Q(x))  not ( x) (not (P(x)) or not (Q(x))) A => B  not(A) or B Notice also that the following is true, where the => symbol stands for implies: ( x) (P(x)) => ( x) (P(x)) Not ( x) (P(x)) => not ( x) (P(x))

©Silberschatz, Korth and Sudarshan3.9Database System Concepts Safety of Expressions  It is possible to write tuple calculus expressions that generate infinite relations.  For example, {t |  t  r} results in an infinite relation if the domain of any attribute of relation r is finite  To guard against the problem, we restrict the set of allowable expressions to safe expressions.  An expression {t | P(t)} in the tuple relational calculus is safe if all t values which cause P to be true, are taken from dom (p), where dom (P) is the cartezian product of the domains of all relations appearing in P. E.g. { t | t[A]=5  true } is not safe --- it defines an infinite set with attribute values that do not appear in any relation or tuples or constants in P.

©Silberschatz, Korth and Sudarshan3.10Database System Concepts Safety of Expressions {  x 1, x 2, …, x n  | P(x 1, x 2, …, x n )} is safe if all of the following hold: 1.All values that appear in tuples of the expression are values from dom(P) The values appear either in P or in a tuple of a relation mentioned in P. 2.For every “there exists” subformula of the form  x (P 1 (x)) The subformula is true if and only if there is a value of x in dom(P 1 ) such that P 1 (x) is true. 3. For every “for all” subformula of the form  x (P 1 (x)), the sub formula is true if and only if P 1 (x) is true for all values x from dom (P 1 ).

©Silberschatz, Korth and Sudarshan3.11Database System Concepts

©Silberschatz, Korth and Sudarshan3.12Database System Concepts TRC – Additional Examples  QUERY 1 Retrieve the name and address of all employees who work in the ‘Research’ department. Q1 : {t.FNAME, t.LNAME, t.ADDRESS | EMPLOYEE(t) and ( d) (DEPARTMENT (d) and d.DNAME = ‘Research’ and d.DNUMBER=t.DNO) }  QUERY 2 for every project located in ‘Stafford’, list the project number, the controlling department number, and the department manager’s last name, birthday, and address. Q2 : {p.PNUMBER, p.DNUM, m.LNAME, m.BDATE, m.ADDRESS | PROJECT(p) and EMPLOYEE (m) and p.PLOCATION=‘Stafford’ and (( d)(DEPARTMENT(d) and p.DNUM=d.DNUMBER an d.MGRSSN=m.SSN)) }  QUERY 3 find the name of each employee who works on a project controlled by department number 5. Q3 : {e.LNAME, e.FNAME | EMPLOYEE(e) and ( ( x) ( w) (PROJECT(x) and WORKS_ON(w) and x.DNUM=5 and w.ESSN=e.SSN and x.PNUMBER=w.PNO) ) }

©Silberschatz, Korth and Sudarshan3.13Database System Concepts  QUERY 3 Find the name of employees who work on all the projects controlled by department number 5. One way of specifying this query is by using the universal quantifier as shown. Q3: {e.LNAME, e.FNAME | EMPLOYEE(e) and (( x)(not(PROJECT(x))or not(x.DNUM=5) Or( ( w)(WORKS_ON(w) and w.ESSN=e.SSN and x.PNUMBER=w.PNO) ) ) ) } QUERY 4 Make a list of project numbers for projects that involve an employee whose last name is ‘Smith’, either as a worker or as manager of the controlling department for the project. Q4 : {p.PNUMBER | PROJECT(p) and ( ( e)( w)(EMPLOYEE(e) and WORKS_ON(w) and w.PNO=p.PNUMBER and e.LNAME=‘Smith’ and e.SSN=w.ESSN) ) Or( ( m)( d)(EMPLOYEE(m) and DEPARTMENT(d) and p.DNUM=d.DNUMBER and d.MGRSSN=m.SSN and m.LNAME=‘Smith’) ) ) } TRC – Additional Examples

©Silberschatz, Korth and Sudarshan3.14Database System Concepts TRC – Additional Examples cont.  QUERY 6 find the names of employees who have no dependents. Q6 : {e.FNAME, e.LNAME EMPLOYEE(e) and (not ( d)(DEPENDENT(d) and e.SSN=d.ESSN))} Using the general transformation rule, we we can rephrase Q6 as follows: Q6A : {e.FNAME, e.LNAME EMPLOYEE(e) and (( d)(not (DEPENDENT(d)) or not (e.SSN=d.ESSN)))}  QUERY 7 List the names of managers who have at least one dependent. Q7 : {e.FNAME, e.LNAME EMPLOYEE(e)and (( d)( p) (DEPARTMENT(d) and DEPENDENT(p) and e.SSN=d.MGRSSN and p.ESSN=e.SSN))}

©Silberschatz, Korth and Sudarshan3.15Database System Concepts Domain Relational Calculus  A nonprocedural query language equivalent in power to the tuple relational calculus  Each query is an expression of the form: {  x 1, x 2, …, x n  | P(x 1, x 2, …, x n )} x 1, x 2, …, x n represent domain variables P represents a formula similar to that of the predicate calculus NOTE: The attribute Xi represents is by its location!

©Silberschatz, Korth and Sudarshan3.16Database System Concepts Example Queries  Find the loan-number, branch-name, and amount for loans of over $1200 {  c, a  |  l (  c, l   borrower   b(  l, b, a   loan  b = “Perryridge”))} or {  c, a  |  l (  c, l   borrower   l, “Perryridge”, a   loan)}  Find the names of all customers who have a loan from the Perryridge branch and the loan amount: {  c  |  l, b, a (  c, l   borrower   l, b, a   loan  a > 1200)}  Find the names of all customers who have a loan of over $1200 {  l, b, a  |  l, b, a   loan  a > 1200}

©Silberschatz, Korth and Sudarshan3.17Database System Concepts Example Queries  Find the names of all customers having a loan, an account, or both at the Perryridge branch: {  c  |  s, n (  c, s, n   customer)   x,y,z(  x, y, z   branch  y = “Brooklyn”)   a,b(  a,x,b   account   c,a   depositor)}  Find the names of all customers who have an account at all branches located in Brooklyn: {  c  |  l ({  c, l   borrower   b,a(  l, b, a   loan  b = “Perryridge”))   a(  c, a   depositor   b,n(  a, b, n   account  b = “Perryridge”))}

©Silberschatz, Korth and Sudarshan3.18Database System Concepts  QUERY 1 Retrieve the name and address of all employees who work for the ‘Research’ department. Q1 : {qsv l ( z) ( l) ( m) (EMPLOYEE(qrstuvwxyz) and DEPARTMENT(lmno) and l=‘Research’ and m=z)} note implicit existenial notation  QUERY 2 For every project located in ‘stafford’, list the project number, the controlling department number, and the department manager’s last name, birthdate and address. Q2 : {iksuv l ( j) ( m) ( n) ( t)(PROJECT(hijk)and EMPLOYEE(qrstuvwxyz) and DEPARTMENT(lmno) and k=m and n=t and j=‘stanfford’)}  QUERY 6 find the names of employees who have no dependents. Q6 : {qs l ( t) (EMPLOYEE(qrstuvwxyz) and (( l)(not(DEPENDENT(lmnop)) or not (t=l))))} Query 6 can be restated using universal quantifiers instead of the existensial quantifiers, as shown in Q6A: Q6A : {qs l ( t) (EMPLOYEE(qrstuvwxyz) and (( l) (not(DEPENDENT(lmnop))or not (t=l))))} DRC Examples

©Silberschatz, Korth and Sudarshan3.19Database System Concepts Four ways of specifying the query Q0 in QBE

©Silberschatz, Korth and Sudarshan3.20Database System Concepts The notion of Relational Complete  Theorem: The Relational algebra (without functions), the Tuple relational calculus, and the Domain relational calculus are equivalent

©Silberschatz, Korth and Sudarshan3.21Database System Concepts Views  In some cases, it is not desirable for all users to see the entire logical model (i.e., all the actual relations stored in the database.)  Consider a person who needs to know a customer’s loan number but has no need to see the loan amount. This person should see a relation described, in the relational algebra, by  customer-name, loan-number (borrower loan)  Any relation that is not of the conceptual model but is made visible to a user as a “virtual relation” is called a view.

©Silberschatz, Korth and Sudarshan3.22Database System Concepts View Definition  A view is defined using the create view statement which has the form create view v as where is any legal relational algebra query expression. The view name is represented by v.  Once a view is defined, the view name can be used to refer to the virtual relation that the view generates.  View definition is not the same as creating a new relation by evaluating the query expression Rather, a view definition causes the saving of an expression; the expression is substituted into queries using the view.

©Silberschatz, Korth and Sudarshan3.23Database System Concepts View Examples  Consider the view (named all-customer) consisting of branches and their customers.  We can find all customers of the Perryridge branch by writing: create view all-customer as  branch-name, customer-name (depositor account)   branch-name, customer-name (borrower loan)  branch-name (  branch-name = “Perryridge” (all-customer))

©Silberschatz, Korth and Sudarshan3.24Database System Concepts Updates Through View  Database modifications expressed as views must be translated to modifications of the actual relations in the database.  Consider the person who needs to see all loan data in the loan relation except amount. The view given to the person, branch- loan, is defined as: create view branch-loan as  branch-name, loan-number (loan)  Since we allow a view name to appear wherever a relation name is allowed, the person may write: branch-loan  branch-loan  {(“Perryridge”, L-37)}

©Silberschatz, Korth and Sudarshan3.25Database System Concepts Updates Through Views (Cont.)  The previous insertion must be represented by an insertion into the actual relation loan from which the view branch-loan is constructed.  An insertion into loan requires a value for amount. The insertion can be dealt with by either. rejecting the insertion and returning an error message to the user. inserting a tuple (“L-37”, “Perryridge”, null) into the loan relation  Some updates through views are impossible to translate into database relation updates create view v as  branch-name = “Perryridge” (account)) v  v  (L-99, Downtown, 23)  Others cannot be translated uniquely all-customer  all-customer  {(“Perryridge”, “John”)}  Have to choose loan or account, and create a new loan/account number!

©Silberschatz, Korth and Sudarshan3.26Database System Concepts Data Dictionary Storage  Information about relations  names of relations  names and types of attributes of each relation  names and definitions of views  integrity constraints  User and accounting information, including passwords  Statistical and descriptive data  number of tuples in each relation  Physical file organization information  How relation is stored (sequential/hash/…)  Physical location of relation  operating system file name or  disk addresses of blocks containing records of the relation  Information about indices (Chapter 12) Data dictionary (also called system catalog) stores metadata: that is, data about data, such as

©Silberschatz, Korth and Sudarshan3.27Database System Concepts Data Dictionary Storage (Cont.)  Catalog structure: can use either specialized data structures designed for efficient access a set of relations, with existing system features used to ensure efficient access The latter alternative is usually preferred  A possible catalog representation:  Relation-metadata = (relation-name, number-of-attributes, storage-organization, location) Attribute-metadata = (attribute-name, relation-name, domain-type, position, length) User-metadata = (user-name, encrypted-password, group) Index-metadata = (index-name, relation-name, index-type, index-attributes) View-metadata = (view-name, definition)

©Silberschatz, Korth and Sudarshan3.28Database System Concepts System Catalogs  For each index: structure (e.g., B+ tree) and search key fields  For each relation: name, file name, file structure (e.g., Heap file) attribute name and type, for each attribute index name, for each index integrity constraints  For each view: view name and definition  Plus statistics, authorization, buffer pool size, etc. * Catalogs are themselves stored as relations !

©Silberschatz, Korth and Sudarshan3.29Database System Concepts Attr_Cat(attr_name, rel_name, type, position)

End of Chapter 3