Presentation is loading. Please wait.

Presentation is loading. Please wait.

ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004.

Similar presentations


Presentation on theme: "ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004."— Presentation transcript:

1 ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004

2 Presentation Topics Concept Concept Initial Design Initial Design Extended Diagram Extended Diagram Alternate Design Formats Alternate Design Formats Implementation Implementation SQL Schema Definition and SQL Schema Definition and Loader Scripts Loader Scripts Database Instance Database Instance Application Application SQL*Plus and PL/SQL Reports and Triggers SQL*Plus and PL/SQL Reports and Triggers ABC GUI ABC GUI Summary Summary

3 Initial Design Concepts Concepts Business Rules (Mini-world Description) Business Rules (Mini-world Description) ER Diagram (link) ER Diagram (link)link Schema Diagram (link) Schema Diagram (link)link

4 Extended Design Additional Sub-classes: Additional Sub-classes: Policies Policies Vehicles Vehicles EER Diagram (link) EER Diagram (link)link Extended Schema Diagram (link) Extended Schema Diagram (link)link UML Diagram (link) UML Diagram (link)link ODM Diagram (link) ODM Diagram (link)link ODL (link) ODL (link)link

5 SQL Schema Definition Scripts What’s in the SQL schema script? DDL statements for creating 15 tables DDL statements for creating 15 tables DDL Views are defined for subclasses Views are defined for subclasses Check total specialization constraints Check total specialization constraints Grant commands Grant commands Alter statements for adding foreign keys constraints to tables Alter statements for adding foreign keys constraints to tables

6 Constraints & Views Use Not Null, Primary key, Foreign key and Check constraints Use Not Null, Primary key, Foreign key and Check constraints Provide rules for data entry Provide rules for data entry Prevent the deletion of a table if there are dependencies from other tables Prevent the deletion of a table if there are dependencies from other tables Establishes relationship between the tables. Establishes relationship between the tables. Assertions are completeness constraints and check total specialization of super classes to sub classes. Assertions are completeness constraints and check total specialization of super classes to sub classes. Views associated with sub-classes Views associated with sub-classes Each view is provided for the subclass with its inherited attributes. Each view is provided for the subclass with its inherited attributes. link link link

7 SQL Schema Loader Scripts We use SQL *Loader to load the data into tables We use SQL *Loader to load the data into tables SQL *Loader is a utility for loading data from external files into an Oracle table SQL *Loader is a utility for loading data from external files into an Oracle table It requires two primary files: Control file and Data file It requires two primary files: Control file and Data filefiles Control file contains information on the format of the data and loading instructions Control file contains information on the format of the data and loading instructions Data file contains the records to be loaded into Oracle Data file contains the records to be loaded into Oracle Data file also can be included into control file Data file also can be included into control file They are separated by key word ‘BEGINDATA’ They are separated by key word ‘BEGINDATA’

8 Database Instance Sample relation instances after schema definition and data loading

9 Report: Policy_Info This report shows general policy information grouped by type of policy (auto or life insurance). Within each of these groupings a row is displayed for each policy showing details on the policy including the member ID (identifies the owner of the policy), the premium for the policy and any balance that has not been paid. This report shows general policy information grouped by type of policy (auto or life insurance). Within each of these groupings a row is displayed for each policy showing details on the policy including the member ID (identifies the owner of the policy), the premium for the policy and any balance that has not been paid. Policy_Info.sql Policy_Info.sql Policy_Info.sql Output Output Output

10 Transaction: New_Claim This SQLPlus command file accepts a policy number and the amount for an auto claim as input. Within an anonymous PL/SQL block the new claim is added to the database. It also calculates the amount of the claims against this policy within the last 2 years and if the amount is greater than $5000 the premium is increased by 10%. This SQLPlus command file accepts a policy number and the amount for an auto claim as input. Within an anonymous PL/SQL block the new claim is added to the database. It also calculates the amount of the claims against this policy within the last 2 years and if the amount is greater than $5000 the premium is increased by 10%. New_Claim.sql New_Claim.sql New_Claim.sql Output Output Output

11 Procedure: A procedure is a named PL/SQL block that performs an action A procedure is a named PL/SQL block that performs an action A procedure can be stored in the database, as a schema object, for repeated execution A procedure can be stored in the database, as a schema object, for repeated execution QUERY_MB is a procedure that is associated with MEMBER entity to display member’s information QUERY_MB is a procedure that is associated with MEMBER entity to display member’s information It takes one parameter for MemberId from execute command and returns 3 parameter values to the calling environment. It takes one parameter for MemberId from execute command and returns 3 parameter values to the calling environment. Procedure.sql Procedure.sql Procedure.sql Output Output Output

12 Trigger A data Trigger to associate with member table when an insert or update statement is issued. A data Trigger to associate with member table when an insert or update statement is issued. The Trigger checks the member’s date of birth. If person's age is under 18, the trigger will raise an error message. The Trigger checks the member’s date of birth. If person's age is under 18, the trigger will raise an error message. Trigger.sql Trigger.sql Trigger.sql Output Output Output

13 ABC GUI DB Front-End: GUI implemented using Java’s Swing API. (link) DB Front-End: GUI implemented using Java’s Swing API. (link)link Two categories of functionality: Two categories of functionality: Canned Queries – Predefined select statements Canned Queries – Predefined select statements User-Defined Queries – Can accommodate all valid SQL statements (insert, update, select, nested queries, etc.) User-Defined Queries – Can accommodate all valid SQL statements (insert, update, select, nested queries, etc.) GUI-DB communication via Java’s JDBC API. GUI-DB communication via Java’s JDBC API. Classes from the JDBC API (Connection, Statement, DriverManager, ResultsSet, etc.) used to connect and execute SQL statements on the data in the database. Classes from the JDBC API (Connection, Statement, DriverManager, ResultsSet, etc.) used to connect and execute SQL statements on the data in the database.

14 Summary Database designed and implemented for an Insurance Company. Database designed and implemented for an Insurance Company. Design extended to include sub-class hierarchies Design extended to include sub-class hierarchies Data structure supports basic business rules and functional dependencies Data structure supports basic business rules and functional dependencies All tables are BCNF – no update anomalies All tables are BCNF – no update anomalies Table level constraints implemented to ensure data integrity Table level constraints implemented to ensure data integrity Reports, transactions, views and procedures created for enhanced convenience and increased breadth of functionality. Reports, transactions, views and procedures created for enhanced convenience and increased breadth of functionality. Convenient user interface provided Convenient user interface provided

15 Support Slides

16 ER Diagram  return return

17  return return

18 EER Diagram  return return

19  return return

20 UML Diagram  return return

21  return return ODL Diagram

22  return return


Download ppt "ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004."

Similar presentations


Ads by Google