Download presentation
Presentation is loading. Please wait.
1
Robustness Analysis Data Layer Dr. Neal CIS 480
2
Review of Use Case
3
Use Case “Register a Seller” Preconditions –SELLER must not exist in system Use Case Description –Primary Flow: The SELLER is directed to a secure Web page. The SELLER must enter a user name, password, address, telephone, and e-mail address. All data is is validated when the SELLER submits request. The password should be entered twice to verify typing errors. the submit button. –Alternate Flow: The SELLER can cancel the registration process and return to the main page. –Alternate Flow: Data entered is not complete causing registration form to be redisplayed with errors highlighted. –Alternate Flow: The SELLER has previously registered or a duplicate name exists causing the registration form to be redisplayed Postconditions –An entry for SELLER information is created in the database. –A new ACCOUNT is created for the SELLER.
4
“Register a Seller” UI Prototype Incomplete data or duplicate person
5
Design Classes
6
Object Sequence How do we design the access to the database with error handling?
7
Database Definition
8
ERD for Register a Seller Added Unique accountNumber as primary key
9
DDL for Database Creation create sequence acctno increment by 2; create table selleraccount ( accountnumber number(10), accumulatepayment number(12,2), datelastpayment date, constraint selleraccount_pk primary key (accountnumber) ); create table sellerentity ( name varchar2(20), address varchar2(40), email varchar2(40), phone varchar2(12), userid varchar2(15), upassword varchar2(15), accountnumber number(10), constraint sellerentity_pk primary key (userid), constraint selleraccount_fk foreign key (accountnumber) references selleraccount(accountnumber) ); Sequence will be used to create unique numbers
10
Oracle Connectivity Framework
11
Oracle Connectivity Overview Your Application Class Oracle Database OracleConnection OracleCommand OracleTransaction OracleParameter Commit/Rollback() BeginTransaction() Open() Parameter.Add() ExecuteReader() ExecuteNonQuery() ExecuteScalar() INSERT INTO SELLER VALUES(:PARM1, :PARM2, … ) Command String Parameter Definition User Id=you;Password=yourpass Logon String OracleDataReader Results Oracle Classes OracleMethods() ORACLE PARAMETERS Legend
12
Database Access Concepts Class Responsibilities Registration Controller Has Oracle Connection Creates Command Object Provides the Transaction Context Handles Exceptions SellerEntity Fetches a Seller to Confirm Creates new Seller Account Fetches a New Account Number Creates new Account
13
Data Access Robustness
14
Object Discovery and Modification A new page for data errors called Error.aspx is discovered Expanded attributes and methods for SellerEntity, RegistrationController and Account classes are found Oracle classes OracleConnection, OracleCommand, OracleTransaction, OracleDataReader, OracleParameter need to be added to design classes Exception class is needed for handling errors
15
Data Access Design Classes New Attribute New Methods New Oracle Classes New Exception Class Error Page New Attributes
16
Design Sequence Diagrams
17
Normal Flow Data Access
18
Duplicate Seller Alternate Flow Data Access
19
Database Error Flow Data Access
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.