Static Analysis of PL/SQL code

In all new development and sometimes during legacy codebase modernization, developers tend to add code quality checks and static analysis of codebase such as style checks, bug finders, cyclomotic complexcity checking etc. into the CI/CD pipeline. When we inherit a codebase that has much PL/SQL and there is a desire to put the PL/SQL code base through the same types of code analysis, what options does a developer/dba have?

There are some options we can explore such as

Read more

Share

ID generation with ORM's Table, Sequence or Identity strategy

Which ID generation strategy to use?

Read more

Share

Using liquibase to load data and ignore some columns

Loading data into tables is needed many times on projects to load test, Liquibase provides a method to load data into tables with lots of customization. In the example shown below, I’m loading zip code data with the following column layout

"Zipcode","ZipCodeType","City","State","LocationType","Lat","Long","Location","Decommisioned","TaxReturnsFiled","EstimatedPopulation","TotalWages"

Read more

Share

Two factor authentication to authorize credit

Simple flow of credit file usage by Individual Citizens

In todays environment, identity theft and related crimes are frequent and common place. Most of these incidents take place because our identity can be easily stolen will little bits of information such as name, address, birthdate, social security number or maybe just your card number.

What if, credit file or credit report or credit score even credit cards had two factor authentication, just like we have, two factor authentication on gmail, chase and many other services.

Read more

Share

Automatically adding columns to Rails migrations

Adding default columns in Rails Migrations

Read more

Share

Synonyms as abstraction layer

{% img /static/images/synonym_diagram.jpg Schema with data and schema’s for read write access and read access %} In many development shops, developers are not allowed to access the database schema directly, and are not allowed to create tables, indexes, views etc, instead are given access via a different schema that allows SELECT, UPDATE and DELETE access on data. The general reason is to avoid developers creating database objects without

Read more

Share

Behavior Driven Database Development

Behavior Driven Database Development practices

Read more

Share

Using rake and activerecord to generate boilerplate DB Code

IN many projects, there are tables which need default audit columns such as Created_By, Created_Date, Modified_By, Modified_date and other columns that need to be updated everytime some actions are done againt the tables and/or columns. This type of functionality can be implemented using triggers. Why have triggers? when the application can do the updating, this is a good argument, but like all application databases eventually other users, applications and scripts will get access to the applications database and end up wanting to read from the database and write to the database. During these times its better to have triggers updating the data independent of the application to ensure audit columns and other columns are updated with appropriate values. We can implement the triggers either by hand coding or by generating them using the database metadata and some build time scripting. Hand coding these triggers is mundane work and error prone, especially when we need to add a new column that needs to added to all the triggers.

Read more

Share

Database naming conventions in different environments

Naming conventions in database environments

Read more

Share

8 Techniques for testing migration of data from legacy systems

Many of the projects we end up working on are replacing existing systems with existing data either wholly or in part. In all of the above projects we end up writing data migration or data conversion code to move the data from legacy systems to the new systems. Many stake holders of the project such as business users, project managers, business analysts really care about the data conversion scripts and the quality of the conversion.

Read more

Share