5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.

Slides:



Advertisements
Similar presentations
Information Systems Technology Ross Malaga B Copyright © 2005 Prentice Hall, Inc. B-1 WORKING WITH DATABASES.
Advertisements

Database Basics. What is Access? Database management system Computer-based equivalent of a manual database Makes it easy to organize and update information.
With Microsoft Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Enhanced Guide to Oracle 10g
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Advanced Forms Builder Topics Chapter 10.
6 Copyright © 2004, Oracle. All rights reserved. Working with Data Blocks and Frames.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
7 Copyright © 2004, Oracle. All rights reserved. Working with Text Items.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
Chapter 5B-C: Introduction to Forms Builder: Tiggers, LOV.
Chapter 7: Creating Database Reports
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Eyad Alshareef 1 Creating Custom Forms Part A. 2Eyad Alshareef Data Block and Custom Forms Data block form Data block form Based on data blocks that are.
Introduction To Form Builder
Introduction To Form Builder
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
1 Chapter 5: Introduction To Form Builder. 2 Forms  Why Do We Use Form Builder?  Why Don’t We Use SQL Only?!
Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke.
® IBM Software Group © 2006 IBM Corporation The Eclipse Data Perspective and Database Explorer This section describes how to use the Eclipse Data Perspective,
Chapter 3 Maintaining a Database
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Eyad Alshareef 1 Creating Database Reports. 2Eyad Alshareef Creating reports.
Microsoft Access Lesson 3
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
Copyright Ó Oracle Corporation, All rights reserved. 55 Working with Data Blocks and Frames.
6 Copyright © 2004, Oracle. All rights reserved. Working with Data Blocks and Frames.
6 Copyright © 2004, Oracle. All rights reserved. Working with Data Blocks and Frames.
With Microsoft Access 2007 Volume 1© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access 2007 Volume 1 Chapter.
Advanced Forms Lesson 10.
Copyright  Oracle Corporation, All rights reserved. 5 CMIS Powell Oracle Designer: Design Editor and Building the Database and Table API CMIS.
Chapter 1 Databases and Database Objects: An Introduction
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
Course ILT Access basics Unit objectives Define database and database-related terminology, and plan a database Start Access and open, create, view, and.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Access Manual 2 By Dhawala Kovuri Elham S.Khorasani Ismail Guneydas.
Oracle Reports Builder
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
Access Project 3 Notes. Introduction Maintaining the Database  Modifying the data to keep it up-to-date Restructure the Database  To change the database.
SESSION 3.1 This section covers using the query window in design view to create a query and sorting & filtering data while in a datasheet view. Microsoft.
BUSINESS DRIVEN TECHNOLOGY Plug-In T5 Touring Access.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
With Microsoft Office 2007 Introductory© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Introductory.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Eyad Alshareef 1 Introduction To Form Builder Part B.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
MS-Access XP Lesson 4. Modifying Queries 1.Select query in queries 2.Click design button or Right click on query and click design view 3.Change query.
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
1 Chapter 6: Creating Oracle Data Block Forms. 2 Forms  Application with a graphical user interface that looks like a paper form  Used to insert, update,
This presentation shows how to develop a Master-Detail form. Such a form has a One-Many type of relationship. The “one” is the master and the “many” is.
Copyright © 2014 Pearson Canada Inc. Ext. 5b-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5b Using Microsoft Access Part 2: Using Information.
2 Copyright © 2008, Oracle. All rights reserved. Building the Physical Layer of a Repository.
CHAPTER 7 LESSON B Creating Database Reports. Lesson B Objectives  Describe the components of a report  Modify report components  Modify the format.
Working with Data Blocks and Frames
Working in the Forms Developer Environment
Creating a Basic Form Module
Developer 2000 CSE 4504/6504 Lab.
Creating LOVs and Editors
Creating a Master-Detail Form
Introduction To Form Builder
Creating Additional Input Items
Presentation transcript:

5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form

5-2 Copyright © 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Create data blocks with relationships Modify a data block Modify the layout of a data block Run a master-detail form

5-3 Copyright © 2004, Oracle. All rights reserved. Form Block Relationships Master Detail Master Detail  Master  Master Detail

5-4 Copyright © 2004, Oracle. All rights reserved. Creating Data Blocks with Relationships A form module can contain one or more data blocks. Each data block can stand alone or be related to another data block. Master-Detail Relationship A master-detail relationship is an association between two data blocks that reflects a primary-foreign key relationship between the database tables on which the two data blocks are based. The master data block is based on the table with the primary key, and the detail data block is based on the table with the foreign key. A master-detail relationship equates to the one-to-many relationship in the entity relationship diagram. A Detail Block Can Be a Master You can create block relationships in which the detail of one master-detail link is the master for another link.

5-5 Copyright © 2004, Oracle. All rights reserved. Customers Orders Items Form Block Relationships Orders Items OrdersAccount Rep Customers

5-6 Copyright © 2004, Oracle. All rights reserved. Data Block Wizard: Master-Detail Page

5-7 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form Module with the Data Block Wizard 1.Create the master block as described earlier in this lesson in the topic Creating a New Data Block. 2.Invoke the Data Block Wizard in the Object Navigator. 3.Follow the same steps as before to create a new data block in the Data Block Wizard until you come to the Master-Detail page. On this page, select the “Auto-join data blocks” check box and click Create Relationship. Note: If the “Auto-join data blocks” check box is clear, the Data Block dialog is displayed with a list of all data blocks in the form without any foreign key constraint names.

5-8 Copyright © 2004, Oracle. All rights reserved. 4.Select a master data block in the Data Block dialog and click OK. The wizard automatically creates the join condition between the detail and master data blocks in the Join Condition field and displays the name of the master data block in the Master Data Blocks field. Note: If the “Auto-join data blocks” check box is clear, the wizard does not automatically create the join condition between the detail and master data blocks. You must use the Detail Item and Master Item pop-up lists to create a join condition manually. 5.Click Next; then complete the Data Block Wizard steps. Go through the Layout Wizard steps as described earlier in the previous lesson to finish creating and laying out the detail data block. Note: The master data block must exist in the form module before you create the detail block. You can also create a relation by invoking the Data Block Wizard in reentrant mode.

5-9 Copyright © 2004, Oracle. All rights reserved. Relation Object New relation object created in Object Navigator under master data block node Default name assigned: MasterDataBlock_ DetailDataBlock Triggers and program units generated automatically

5-10 Copyright © 2004, Oracle. All rights reserved. Creating a Relation Manually

5-11 Copyright © 2004, Oracle. All rights reserved. Creating a Relation Manually If a relation is not established when default blocks are created, you can create your own. To explicitly create a relation, perform the following steps: 1.Select the Relations node under the master block entry in the Object Navigator. 2.Click the Create icon. The New Relation window is displayed. 3.Specify the name of the detail block. 4.Choose your master delete property. 5.Choose your coordination property. 6.Specify the join condition. 7.Click OK. The new relation, new triggers, and new program units are highlighted in the Object Navigator. Like implicitly created relations, the relation is given the default name of MasterDataBlock_DetailDataBlock, for example CUSTOMERS_ORDERS. The same PL/SQL program units and triggers are created automatically when you explicitly create a relation as when the relation is created implicitly.

5-12 Copyright © 2004, Oracle. All rights reserved. Join Condition The join condition creates primary-foreign key link between blocks Define a join condition using: –Block and item names (not table and column names) –Do not precede names with colon –SQL equijoin syntax

5-13 Copyright © 2004, Oracle. All rights reserved. Deletion Properties Isolated: Only master is deleted Cascading: Master and all details are deleted Non-isolated: If no detail record, master is deleted Non-isolated: Master is not deleted if there are any detail records = Deleted Master-Detail Records

5-14 Copyright © 2004, Oracle. All rights reserved. Modifying a Relation

5-15 Copyright © 2004, Oracle. All rights reserved. Coordination Properties DefaultDeferred with auto query Deferred without auto query

5-16 Copyright © 2004, Oracle. All rights reserved. Running a Master-Detail Form Module Automatic block linking for: –Querying –Inserting Default deletion rules: Cannot delete master record if detail records exist

5-17 Copyright © 2004, Oracle. All rights reserved. Running a Master-Detail Form Module When you run your master-detail form module you will find that: –Querying the master data block immediately retrieves corresponding detail records. –Deleting a master record is prevented if detail records exist. Note: You can change the above behavior by modifying the relation object properties. –Inserting a detail record automatically associates it with the currently displayed master.

5-18 Copyright © 2004, Oracle. All rights reserved. Modifying the Structure of a Data Block Reentrant Data Block Wizard: 1.Select frame or object in Layout Editor, or data block or frame in Object Navigator 2.Select Tools > Data Block Wizard OR Right-click and select Data Block Wizard OR Click Data Block Wizard Object Navigator: –Create or delete items –Change item properties Block Property Palette: Change property values

5-19 Copyright © 2004, Oracle. All rights reserved. Modifying the Layout of a Data Block Reentrant Layout Wizard: –Select frame in Object Navigator or Layout Editor –Select Tools > Layout Wizard – OR –Right-click and select Layout Wizard OR –Click Layout Wizard Layout Editor: –Select Tools > Layout Editor –Make changes manually Frame Property Palette: Change property values