Part 3: Database Build file

So now that we have called the database build file, let’s take a quick look at what it is doing.

–START DATABASE BUILD
drop package ut_p_obj_customer;
drop package ut_p_te_customer;

drop package p_obj_customer;
drop package p_te_customer;

drop type nt_customer_vo;
drop type ot_customer_vo;

drop table customer;

create table customer (
customer_id        number,
account_number     number,
date_created       date,
date_closed        date,
last_billed_date   date,
customer_name      varchar2(80),
address_1          varchar2(150),
address_2          varchar2(150),
city               varchar2(80),
post_code          varchar2(50),
country            varchar2(150),
customer_type      varchar2(10)
);

@ot_customer_vo.tps;
@ot_customer_vo.tpb;
@nt_customer_vo.tps;

@p_te_customer.pks;
@p_te_customer.pkb;

@p_obj_customer.pks;
@p_obj_customer.pkb;

@ut_p_te_customer.pks;
@ut_p_te_customer.pkb;

@ut_p_obj_customer.pks;
@ut_p_obj_customer.pkb;

/

–END DATABASE BUILD

Simply the file begins by dropping all objects, table, packages and types.

It then begins rebuilding, populating and testing.

It is at this stage that any problems with dependencies, or invalid packages will arise.

On to Part 4

Leave a Reply

Your email address will not be published. Required fields are marked *