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

Slides:



Advertisements
Similar presentations
POSTGRESQL DUNGEON WITH TABLE INHERITANCE AND CONSTRAINTS Edel Sherratt.
Advertisements

Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 8 Application Data Auditing.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 8 Application Data Auditing.
Accounting System Design
Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
Chapter 9: Advanced SQL and PL/SQL Topics Guide to Oracle 10g.
Introduction to Structured Query Language (SQL)
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Introduction to Structured Query Language (SQL)
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Adapted from Afyouni, Database Security and Auditing Database Application Auditing – Ch. 8.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Oracle for Software Developers. What is a relational database? Data is represented as a set of two- dimensional tables. (rows and columns) One or more.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
Project Implementation for COSC 5050 Distributed Database Applications Lab2.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Database Programming in Java Corresponds with Chapter 32, 33.
Web Application Development. Define ER model in QSEE Generate SQL Create Database mySQL Write Script to use TableEditor class Process to create A simple.
Database Technical Session By: Prof. Adarsh Patel.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
I Copyright © Oracle Corporation, All rights reserved. Introduction.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
Module 11: Programming Across Multiple Servers. Overview Introducing Distributed Queries Setting Up a Linked Server Environment Working with Linked Servers.
Database System Concepts and Architecture. Relational Model Concepts relational model represents the database as a collection of relations. Each relation.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application.
Exploring Microsoft Access Chapter 6 Many-to-Many Relationships: A More Complex System.
Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server,
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Introduction to Oracle In June 1970,Dr E.F.Codd’s a published A paper entitled A relational model of Data for large shared data banks. This relational.
Commercial RDBMSs Access and Oracle. Access DBMS Architchecture  Can be used as a standalone system on a single PC: -JET Engine -Microsoft Data Engine.
Oracle 11g: SQL Chapter 4 Constraints.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 9 Database Triggers.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Chapter 9: Advanced SQL and PL/SQL Guide to Oracle 10g.
PowerBuilder Online Courses - by Prasad Bodepudi Database Painter Primary & Foreign Keys Extended Attributes PowerBuilder System Tables Database Profiles.
DataBases and SQL INFSY 547 Spring Course Wrap Up April 12: Complete Work on Servlets Review of Team Projects Close of Portfolio Work April 19:
11/11/20041 CS542 Database Management Personal Financial Planner Project Progress Presentation Jonathan Perreault 11/11/04.
Session 1 Module 1: Introduction to Data Integrity
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Chapter 3: Relational Databases
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
Level 1-2 Trigger Data Base development Current status and overview Myron Campbell, Alexei Varganov, Stephen Miller University of Michigan August 17, 2000.
CSC314 DAY 8 Introduction to SQL 1. Chapter 6 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SQL OVERVIEW  Structured Query Language  The.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe.
E Copyright © 2006, Oracle. All rights reserved. Using SQL Developer.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Chapter 2 Database System Concepts and Architecture
Applied CyberInfrastructure Concepts Fall 2017
CPSC-310 Database Systems
From ER to Relational Model
Chapter 7 Using SQL in Applications
Relational Database Design
Presentation transcript:

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

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

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

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

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

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

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’

Database Instance Sample relation instances after schema definition and data loading

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

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

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

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

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.

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

Support Slides

ER Diagram  return return

 return return

EER Diagram  return return

 return return

UML Diagram  return return

 return return ODL Diagram

 return return