In this session, you: 
               	 
            
 
            	 
             
               		
               -  Create referential integrity classes 
                  		
               
-  Create a referential integrity method 
                  		
               
-  Export referential integrity method information to Extension Technology 
                  		
               
 
               	 
                
                  		
                  -  · Execute referential integrity method 
                     		
                  
  
            	 
            
               Creating Referential Integrity Classes
 
               		 
               		
                In this exercise you will import referential integrity classes: 
                  		
               
 
               		
                
                  		
                   
                     		  
                     -  In Data Builder, open the 
                        			 Work with Data Elements window (click 
                        			  or access it through 
                        			 Environment > 
                        			 Work with Data Elements). or access it through 
                        			 Environment > 
                        			 Work with Data Elements).Note: You can also access the 
                           				Work with Data Elements window from the main window by selecting the file name, right-clicking to view the context menu, and then by clicking 
                           				Work with Data Elements of the Selected Data Store. 
                           			 
                         
-  From the 
                        			 Select Data Elements tab, click the 
                        			 Apply Filter button to display all data stores. 
                        			 
                        Note: To narrow down the list of data elements displayed, use the filter fields (Machine ID, 
                           				Company name, and 
                           				Application ID), and then click 
                           				Apply Filter. To display all data elements, simply click 
                           				Apply Filter.
                           			 
                         
-  Click the 
                        			 Classes - Assignment tab. 
                        		  
                     
-  Click 
                        			 Import Class. 
                        		  
                     
-  Select the 
                        			 Referential Integrity import type: 
                        		  
                     
-  In the 
                        			 Machine ID list, specify 
                        			 ALLIE. 
                        		  
                     
-  In the 
                        			 Company list, specify 
                        			 DXPROJ. 
                        		  
                     
-  In the 
                        			 Database list, specify 
                        			 GSDEMO. 
                        		  
                     
-  Click 
                        			 Show Schemas. 
                        		  
                     
-  Click 
                        			 Import. 
                        		  
                     
-  Close the 
                        			 Import Class window. 
                        			 
                        In the 
                           				All Classes pane in the 
                           				Work with Data Elements window, classes 
                           				CLA0201 and 
                           				CLA0202 now exist in the 
                           				None Super Class. 
                           			 
                         
-  In the 
                        			 List of Data Store Data Elements, notice: 
                        			 
                         
                           				
                           -  class 
                              				  CLA0201 is assigned to 
                              				  CUSTOMER.C_NO and 
                              				  ORDERS.C_NO 
                              				
                           
-  · class 
                              				  CLA0202 is assigned to 
                              				  ORDERS.O_NO and 
                              				  ITEMS.O_NO 
                              				
                           
 
-  Close the 
                        			 Work with Elements window. 
                        		  
                     
-  If you are planning to go straight on to the next tutorial 
                        			 Data Subset Extraction using a Combined Data Element, you can keep Data Builder open. Otherwise, either Click 
                        			 File > 
                        			 Exit or click the 
                        			  button, and then click 
                        			 Yes. button, and then click 
                        			 Yes.
-  Continue to the next section. 
                        		  
                     
  
               	 
              
            	 
            
               Creating a Referential Integrity Method
 
               		 
               		
                Create a referential integrity method: 
                  		
               
 
               		
                
                  		
                   
                     		  
                     -  In Data Subset Extraction, open the 
                        			 Import Method window by clicking 
                        			  (Import Method from Referential Integrity). (Import Method from Referential Integrity).
-  Enter the following details for the method: 
                        			 
                        
                            
                              				   
                              				   
                              				  
                               
                                 					 
                                  
                                    						
                                    | Machine ID | ALLIE |   
                                    						
                                    | Company | DXPROJ |   
                                    						
                                    | Group | DX40GS |   
                                    						
                                    | Method (method name) | RI METHOD |  
                                    						
                                    | Method text (method description) | RI METHOD |  
                                    						
                                    | Class | CLA0201 |  
                                    						
                                    | Database | GSDEMO |  
 
 
-  Click 
                        			 Import. 
                        		  
                     
-  Click 
                        			 Properties. 
                        		  
                     
-  Click 
                        			 Active to activate the method. 
                        		  
                     
-  Click 
                        			 OK to close the 
                        			 Method Properties window. 
                        		  
                     
-  Click 
                        			 OK to close the 
                        			 Work with Method window. 
                        		  
                     
-  Continue to the next section. 
                        		  
                     
  
               	 
              
            	 
            
               Exporting Referential Integrity Method Information to Extension Technology
 
               		 
               		
               Export your referential integrity method information.
                  		
               
 
               		
                
                  		  
                  -  Click 
                     			  (Distributed Exporter) from the main window of Data Subset Extraction. (Distributed Exporter) from the main window of Data Subset Extraction.
-  Verify that the method 
                     			 RI METHOD is selected. 
                     		  
                  
-  Click 
                     			 Export. 
                     		  
                  
-  When prompted to continue elaboration, click 
                     			 Yes. 
                     		  
                  
-  Click 
                     			 OK. 
                     		  
                  
-  Click 
                     			 Close to close the 
                     			 Distributed Exporter window. 
                     		  
                  
-  If you are planning to go straight on to the next tutorial 
                     			 Data Subset Extraction using a Combined Data Element, you can keep Data Subset Extraction open. Otherwise, either Click 
                     			 File > 
                     			 Exit or click the 
                     			  button, and then click 
                     			 Yes. button, and then click 
                     			 Yes.
-  Continue to the next section. 
                     		  
                  
  
            	 
            
               Executing Referential Integrity Method
 
               		 
               		
               By default, the Extension Technology will attempt to insert the processed data into the target database. For testing purposes,
                  it is possible to configure the Extension to instead write the processed data into text files as comma separated values (.csv). 
                  		
               
 
               		
               Execute subset extraction with Extension Technology: 
                  		
               
 
               		
                
                  		  
                  -  From a MS-DOS prompt, change to the executables directory 
                     			 c:\Program Files\Micro Focus\Data Express 4.0\odbc. 
                     		  
                  
-  2. Type 
                     			 dxestart 
                     			 
                     The target ODBC data store now contains the table 
                        				 TGT.CUSTOMER, 
                        				 TGT. ORDERS, and 
                        				 TGT.ITEMS. The contents within these tables follow the referential integrity defined in the database: 
                        			 
                          
                           				
                           -  Only records in the 
                              				  TGT.ORDERS table that have the same customer number as records in the 
                              				  TGT.CUSTOMER table are present. 
                              				
                           
-  Likewise, only records in the 
                              				  TGT.ITEMS table that have the same order number as records in the 
                              				  TGT.ORDERS table are present. 
                              				
                           
 
-  Continue to the next section. 
                     		  
                  
  
            	 
            
               Verifying Results
 
               		 
               		
               Verify that the tables are in fact different.
                  		
               
 
               		
                
                  		  
                  -  Launch the SQL Wizard: 
                     			  ..\mfsql\bin\xwiz40n 
		 
-  Notice that the tables 
                     			 TGT.ORDERS and 
                     			 TGT.ITEMS have been reduced.