Data Handling

It is highly recommended that data required from the database should be pulled through the framework provided a mechanism, that is, using dataset and variables and not with any explicit DB connections. This ensures proper security, authenticity, and auditing.

Auditing is enabled in the definition windows by introducing audit trails that capture and display the user details and the date of creation/ modification, along with comments.

For instance, here is a sample script where data is fetched from the DB directly (not through framework). This way of accessing the database resident data in a model is not recommended.

con<-dbConnect(Oracle(),"userName","password")

qry<-"select EventLoss as Y, CardType as X1, AccBalance as X2, CustSalary as

X3 from CustTable where Default= 'Y' "

res<- dbSendQuery(con, qry)

OperationalData<-fetch(res)

dbDisconnect(con)

#Model Logic

NewRegModel<-lm(Y~X1+X2+X3, data= OperationalData)

Plot(NewRegModel)

NewRegModel

Here is how a script for the same purpose can be created for accessing data via framework dataset and variables. Define 'EventLoss', 'CardType', 'AccBalance', and 'CustSalary' from the table 'CustTable' as variables in the Oracle Financial Services Enterprise Modeling application. while defining the model, select these variables and assign them to R objects (the R names used within the script) say, 'IndepVariable1', 'IndepVariable2', 'IndepVariable3' and 'DepVar' from the Configure Inputs window.

#Assuming EventLoss, CardType, AccBalance, CustSalary from #CustTable are defined as variables in a data set, and that #dataset is selected for variable assignments to the respective R #variable names: Y, X1, X2, and X3.

NewRegModel<-lm(DepVar ~ IndepVariable1+ IndepVariable2+ IndepVariable3)

#The variables are made directly available to the R

#environment by the framework

Plot(NewRegModel)

NewRegModel