Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Introduction to PowerBuilder

HomePrevious Lesson: Database Painter - Questions & Answers
Next Lesson: DataWindow Painter

Database Painter Exercises

You need to create the following objects. The left most column in the following table lists the object that you need to create and also has the link to the deatil list of those objects. The second column lists the files that have SQL statements to create those objects. You can use these files in two different ways. One, you can execute them in the database administration painter and objects will be created for you. We don't recommend this way. Instead we would like you to create those objects and export those object definitions and compare with the SQL that is listed in the files(second column). The thid column lists the files that inserts sample data into those tables. The data is also displayed in the picture for each table.
Tables:
  Table Name SQL to create table, index SQL to create Data
units units.sql units-data.sql
product_master product_master.sql product_master-data.sql
trans trans.sql trans-data.sql
product_images product_images.sql None
Edit Styles
e_tran_type
Validation Rules
v_no_empty_column
v_no_zero_column

Create the 'units' table as shown in the following picture and enter the data as shown.

Create dialog box for the table Data

Property

Value

Primary key unit
Index Name xunits
Index Columns unit. Ascending, Unique

Create 'product_master' table as shown in the picture and enter the data as shown.

Property

Value

Primary key product_no
Index Name xproduct_master
Index Columns product_no. Ascending, Unique.
Foreign Key Name: fmeasurement_unit
Foreign Key product_measurement_unit referring to unit in the units table

Data

Create 'trans' table as shown in the picture and enter the data as shown.

Property

Value

Primary key tran_no, tran_serial_no
Index Name xtrans
Index Columns tran_no, tran_serial_no. Ascending, Unique.
Index Name xtrans2
Index Columns tran_date. Ascending, Duplicate.
Foreign Key Name: ftran_item_no
Foreign Key tran_item_no referring to product_no in product_master table

Data

Create 'product_images' table as shown in the picture. This table doesn't have any sample data. The reason is that, you need to follow special procedure to insert images into the table, which is not explained and is too advanced at this stage. We will explain this in the OLE session.

Property

Value

Primary key product_no
Index Name xu_product_images
Index Columns product_no. Ascending, Unique.
Foreign Key Name: fproduct_no_images
Foreign Key product_no referring to product_no in product_master table

Once you define all the above tables, it should look like in the following picture:

After defining, assign it to "tran_type" column in "trans" table.

After defining, assign this rule to "product_description" in "product_master" and "unit-description" in "units" table and "unit" column in "units" table.

After defining, assign this rule to "product_reorder_level" column in "product_master" and "tran_qty", "tran_serial_no", "tran_no", "tran_item_no" in "trans" table.

HomePrevious Lesson: Database Painter - Questions & Answers
Next Lesson: DataWindow Painter

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com