You are on page 1of 11

LOC tables have referential integrity constraint with a compound/composite primary key (Postalcode, country) with table GEOCOORDINATES

in following example: CREATE TABLE SCPOMGR.GEOCOORDINATES ( POSTALCODE VARCHAR2(10 CHAR) NOT NULL, COUNTRY LATITUDE VARCHAR2(20 CHAR) NOT NULL, NUMBER(9,5) NOT NULL,

LONGITUDE NUMBER(9,5) NOT NULL); CREATE TABLE LOC LOC DESCR LOC_TYPE POSTALCODE COUNTRY VARCHAR2(50 CHAR) NOT NULL, VARCHAR2(50 CHAR) NOT NULL, INTEGER NOT NULL,

VARCHAR2(10 CHAR) , VARCHAR2(20 CHAR) );

ALTER TABLE GEOCOORDINATES ADD (CONSTRAINT GEOCOORDINATES_PK PRIMARY KEY (POSTALCODE, COUNTRY)); ALTER TABLE LOC ADD (CONSTRAINT LOC_GEOCOORDINATES_FK1 FOREIGN KEY (POSTALCODE, COUNTRY) REFERENCES SCPOMGR.GEOCOORDINATES (POSTALCODE,COUNTRY));

Although DBA faces the daily challenges in performing technical task, but interaction with developer is critical in running application and seamless flow of

information in the system. Database server evaluation, installation, planning, creating and opening, back up, user creation, design, back up, Performance tuning, patches, and roll out to hosts for database are daily tasks in the life of DBA. DBA can face challenges of boredom from stereotype or overwhelming responsibility in resolving chaos arising from environment issues that requires 24/7 working hours. The most challenging tasks for DBA is to deal with developers of inadequate understanding those can create havoc to the system while using locking or caching. But life can be easy with experienced developers who are well-versed in the system.

CREATE TABLE PRODUCT (PRODUCT_ID VARCHAR2 (50) PRIMARY KEY, PRODUCT_DESCRIPTION VARCHAR2 (50) NOT NULL, PRODUCT_FINSH DATE, UNIT_PRICE NUMBER); CREATE TABLE ORDER_LINE (ORDER_ID NUMBER REFERENCES ORDERS, PRODUCT_ID VARCHAR2 (50) REFERENCES PRODUCT, ORDER_QUANTITY NUMBER); ALTER TABLE ORDER_LINE ADD (CONSTRAINT ORDER_LINE_PK PRIMARY KEY (ORDER_ID, PRODUCT_ID));

CREATE TABLE RENTER (RENTER_ID VARCHAR2 (15) PRIMARY KEY, FIRST_NAME VARCHAR2 (50) NOT NULL, MIDDLE_INITIAL VARCHAR2 (50), LAST_NAME VARCHAR2 (50), ADDRESS VARCHAR2 (200), PHONE# VARCHAR2 (15), E_MAIL VARCHAR2 (100)); CREATE TABLE RENTAL_AGREEMENT (AGREEMENT_ID VARCHAR2 (15) PRIMARY KEY REFERENCES RENTER (RENTER_ID), BEGIN_DATE DATE NOT NULL, END_DATE DATE NOT NULL, RENTAL_AMOUNT NUMBER); CREATE TABLE PROPERTY (PROPERTY_ID VARCHAR2 (15) PRIMARY KEY REFERENCES RENTAL_AGREEMENT (AGREEMENT_ID), STREET_ADDRESS VARCHAR2 (100), CITY_STATE VARCHAR2 (50), ZIP NUMBER, NO_ROOMS NUMBER, BASE_RATE NUMBER, PROPERTY_TYPE CHAR); CREATE TABLE BEACH_PROPERTY (BLOCKS_TO_BEACH VARCHAR2 (50)); CREATE TABLE MOUNTAIN_PROPERTY (ACTIVITY VARCHAR2 (50));

Physical data independence in above structure does not affect storage or indexing organization of oracle system as data structure remains independent of application requirement i.e. business users will not see any different rental process according to underlying data storage(Tablespace) in the oracle. Logical data independence also does not affect business function whether data is manipulated in the oracle system after DML operation such create, update, or delete. If new user is added into the system, he will follow same business to complete the rental agreement.

Steps 1. Created Schema HQ on Database Server 2. Created Schema Sales on Database Server 3. Create DB link between schema HQ and Sales 4. Inserted data into EMP table of Sales Schema. 5. Deleted data from Dept table of HQ Schema; 6. Selected data from EMP table of Sales Schema. 7. Committed the transaction.

The benefits of using client/server architecture for database applications are follows: Client application remains agnostic of database as they do not have to handle logic of data process. They can take input from server and reflect it in applications applying capabilities of application to display data in desired format on the screen (Oracle, 2011). Client/Server architecture provides physical data independence as client application does not have to depend on where database server is residing in distributed environment as functions of application will continue to work without any changes in code even after change of location of database servers (Oracle, 2011). Client/server architecture provides high concurrency, data integrity, and better performance to applications (Oracle, 2011). Performance tuning can happen at both application and database level (Oracle, 2011). Database server can be scaled to accommodate high volume of data (Oracle, 2011). SQL request from client can only affect network traffic that carries result whereas data processing happens on the database servers (Oracle, 2011).

Oracle (2011) Oracle Database Concepts 11g Release 1 (11.1): Application Architecture. [Online], Available: http://docs.oracle.com/cd/B28359_01/server.111/b28318/dist_pro.htm [3Nov 2012]

Data Modeling and Design Tools CA ERwin Data Modeler (ERwin) is a data modeling and design tools that assist in representing abstraction of logically related entities to develop information system based on business requirement (Burbank, 2011). ERwin provides logical representation of conceptual schema for database design that includes transactional systems and data marts. Erwin has capability of logical and physical data modeling as well as features of logical-to-physical transformations (DeAngelis, 2000). Logical data modeling includes placeholder of entity and attributes along with relationship among those entities. Physical data modeling includes features of tables and their columns to create them in database. Features of primary, foreign, and alternate keys are included in Erwin tool. Constraints can also be defined. Database features of indexes, views, procedures, and triggers are also included in the tool. ERwin provides feature of forward engineering that can generates data definition languages to create tables and their relationship in database environment (Burbank, 2011). Erwin also provides feature of generating ER diagram from physical schema residing in database if DBA or technical designer is interested in understanding data structure. Features of Model-to-Model comparison assist in finding what has been changed in different phase or version (Burbank, 2011).

Burbank, D. (2011). Data Modeling Made Simple with CA ERwin Data Modeler r8. Technics Publications. ISBN 978-1-935504-09-2. DeAngelis, C. (2000). Data Modeling with ERwin. Sams. ISBN 0-672-31868-7.

Database Change Management Tools Oracle Change Management Pack included in Oracle Enterprise Manager and Oracle SQL developer provides database change management tools to database administrators and developers to automate schema changes from lower environment such QA or development to higher environment of production. Oracle change management pack also assists in assessing the impact of application upgrades and minimizing the impact of unidentified changes in plan to reduce the time of application downtime (Oracle, 2009). This tool applies the dictionary baseline for deploying application schema objects in production environment through automation. This pack identifies database gaps in objects or data types as validation steps to roll back or correct application changes to address issues (Oracle, 2009). Oracle change management pack even pinpoints that which column or indexes has been changed in schema that allows application developers in customization of script. DBA can work with developers in identifying mismatches DBA can track changes using Oracle Change Management Pack for finding whether business logic or parameters of INIT.ora has been changed by comparing schema with gold baselines standard. ENABLE_DDL_LOGGING should be set to TRUE in INIT.ora for tracking schema changes by DBA. DBA can regenerate missing objects in few clicks after identifying missing objects in schema (Oracle, 2009). Oracle (2009) Oracle change management pack for oracle database. [Online], Available: http://www.oracle.com/us/products/enterprise-manager/change-management-pack-11gds-068451.pdf [3Nov 2012]

BACKUP & Recovery Tools Oracle Recovery Manager (RMAN) assists database administrators in backup and recovery of databases meeting requirements of performance demand. RMAN even identifies block-level corruption during recovery process as they are tightly coupled with server. File multiplexing and compression helps RMAN in optimizing space management. RMAN does not generate unnecessary redo logs and even takes back up when database is online. RMAN automates management of back up applying flash recovery area and deletes obsolete files from flash recovery area if addition area is required for backup. Incremental backup from last recovery or backup of only changed files improve performance of the recovery operation. RMAN can be accessed from command or central web-based console of Oracle Enterprise manager that provides additional capabilities of parallel restore process of data stream, and records of previous

back up in compliance with retention policy. RMAN provides scalability and testability on different hardware to provide optimum performance. Undo features in full backup allows DBA to minimize consumption by removing backup that is not required. RMAN supports ZLIB algorithms that allow 40% faster compression with tradeoff 20% lower compression. Chien, T. (2008) Oracle Database 11g Backup and Recovery Technologies. [Online], Available: http://www.oracle.com/technetwork/database/features/availability/twp-br-11gr1-129681.pdf [3Nov 2012]

You might also like