You are on page 1of 30

College of Computing and Informatics

Department of Information System


Advanced Database System
Project Title - Student Registration Management System
Group member name Id number

1. Biniam Tesfaye CIR/073/09


2. Yenesew Molla CIR/332/09
3. Haimanot Tariku CIR/357/09
4. Habtie Amare CIR/158 /09
5. Damenech Timerga CIR/089 /08
6. Sara Gebirekidan CIR//08
7. Birihan Fikire CIR//08

Section-B Submitted to: Mr. Worku


Submitted Date: 28/09/2010 E.C
Submitted by: Group - Two

1|Page
1. What is Database Administration?

Database Administration
 Database Administration :-  is the process or the function of managing and
maintaining database management systems (DBMS) software. Mainstream DBMS software
such as Oracle, IBM DB2 and Microsoft SQL Server need ongoing management. As such,
corporations that use DBMS software often must have higher level of Database Administration
because of the sensitivity of information of the organizations/corporations that use DBMS
software.so the DBMS software must have specialized information technology personnel
called Database Administrators (DBA’s).
 Database administration refers to the whole set of activities performed by a database
administrator to ensure that a database is always available as needed. Other closely related
tasks and roles are database security, database monitoring and troubleshooting, and planning
for future growth. 
Database administration is an important function in any organization that is dependent on one
or more databases.

2. What is database administrator?

 Database Administrator :- Is the administrator which has central control on the


database and data that access those data over the system is called a database
administrator. The DBA provides capability for database users while accessing the
content of the database. The DBA can perform some responsibilities: Account Creation,
Account Deletion, Granting the privilege that who gives, revoking those privilege,
Security Level Assignment.
 A DBA is typically also responsible for other secondary, but still critically important,
tasks and roles. Some of these include:
 Database Security: Ensuring that only authorized users have access to the database and
fortifying it against any external, unauthorized access.

2|Page
 Database Tuning: Tweaking any of several parameters to optimize performance, such as
server memory allocation, file fragmentation and disk usage.
 Backup and Recovery: It is a DBA's role to ensure that the database has adequate backup
and recovery procedures in place to recover from any accidental or deliberate loss of
data.
 Producing Reports from Queries: DBAs are frequently called upon to generate reports by
 writing queries, which are then run against the database.

3. Who is a database administrator?

A database administrator is the person who has a higher responsibility to control and manage the
DBMS. He has the responsibilities of the following tasks: -

 Installing and upgrading the database server and application tools


 Allocating system storage and planning storage requirements for the database system
 Modifying the database structure, as necessary, from information given by application
developers
 Enrolling users and maintaining system security
 Ensuring compliance with database vendor license agreement
 Controlling and monitoring user access to the database
 Monitoring and optimizing the performance of the database
 Planning for backup and recovery of database information
 Maintaining archived data
 Backing up and restoring databases ………

4. How could you administer a database?

 Producing Reports from Queries: DBAs are frequently called upon to generate reports by
writing queries, which are then run against the database.
 Enrolling users and maintaining system security: It can only authorized users have access
to the database and fortifying it against any external, unauthorized access.
 Backing up and restoring databases: It is a DBA's role to ensure that the database has
adequate backup and recovery procedures in place to recover from any accidental or
deliberate loss of data

3|Page
 Controlling and monitoring user access to the database
 Monitoring and optimizing the performance of the database
 Planning for backup and recovery of database information
 Maintaining archived data
 Contacting database vendor for technical support
 Generating various reports by querying from database as per need
 Managing and monitoring data replication
 Acting as liaison with users

5. What is the role of DBA in your project?

The DBA has the overall control on our project. From those roles: -

 Create User account: - creating different accounts for different users as well as user
groups.
 Delete user account: - deleting an existing account of users or user groups.
 Grant Privileges to users: - giving different levels of privileges for different users and
user groups.
Privileges like: -
 Select or access data and information from the databases table
 Insert information into different tables
 Update the existing tables to be changed
 Delete records from any tables
 Revoke Privileges from the users: - denying or canceling previously granted
privileges for users due to various reasons.
 Make the Database Secure: - The DBA is responsible for the overall security of the
database system.
The database administrator is responsible to make the database to be secure. By
limiting or restricting level of access to the users.

6. What is database security and how could you secure database in Oracle
12c?

4|Page
 Database Security: - Database security is a protection of information in the database and
protecting data against unauthorized access, disclosure, alteration, modification and destruction.
Database security is making the database or the data: -

 Consistence.
 Available.
 Integrated.
 Privacy.
 Validated.
 Shared access.
 Minimal redundancy.

 Making the Database secure in Oracle 12c: - In Oracle 12c the database can be secure by
providing different mechanisms. Some: -
 User authorization on the database: - by making privileges on what operations are
allowed on a specific database or any other objects. Limiting the access level of user
to the database by limit authorized users to access the database. Some operation
authorized to users: -
 Insert authorization
 Update authorization
 Read authorization
 Delete authorization.

7. What is the main difference between Oracle and Microsoft SQL Server?

 In the areas of their command language, how they handle transaction control and their
organization of database objects they can be differentiated in terms of: -
 Language
 Transaction control
 Organization of Database Objects
 Oracle and Microsoft SQL server are examples of RDBMS obviously they have so much
similarities but they have differences as well that we are listed down as follows:

5|Page
 Syntax and Query Language:
Both MS SQL Server and Oracle use the Structured Query Language to fetch data from the
respective databases. MS SQL Server uses T-SQL, i.e. the Transact-SQL, and Oracle uses
PL/SQL, i.e. Procedural SQL.

 Blocking of records:

MS SQL Server locks the entire block of records used in a transaction and executes one
command after the other. Since the records are blocked and not allowed to be used by others, it
can freely modify it even before Commit. Oracle never modifies the data until it gets a Commit
command from the DBA, during a transaction.

 Roll Back:

Roll Back during a transaction is not allowed in MS SQL Server, but it is allowed in Oracle.

 Transaction Failures:

In the case of transaction failures, MS SQL Server has to reverse all operations that were carried
out for that transaction. This is because it has already made the changes by blocking the records.
With oracle, no such reversing is required because all the changes were done on a copy and not
on the original records.

 Platform Support:

MS SQL Server can be run only on a Windows platform. Because of the lack of platform
support, it is not best suited for enterprises that operate worldwide with different operating
systems. Oracle can be run on a variety of platforms such as UNIX, Windows, MVS, and VAX-
VMS. It offers good platform support, and, hence, it can be used in enterprises that use different
OSs.

 Locking Size:

6|Page
Page locking is a concept in MS SQL Server used when it needs so many rows of a page to be
edited. It locks pages of the same size for every modification, but the unedited rows also go
under the lock without a valid reason. So the other users have to wait for the editing process to be
completed. Oracle does not lock pages, but instead it creates a copy while editing/modifying the
contents. Hence, others need not wait for the edit to be completed.

 Query Optimization:

Optimization of queries is missing in MS SQL Server, but star query optimization is possible in
Oracle.

 Best Use

When we compare MS SQL Server with Oracle, we could say that the former is best suited for
smaller databases. Because it involves tedious time-consuming processes for databases of larger
size, if you have the time to wait for its transactions, then it is the simplest one to deploy!
Otherwise, just go with Oracle because it supports larger database with easiness.
8. Describe the purpose of SQLPLUS, SQL Developer and Enterprise
Manager(EM)?

 the purpose of SQLPLUS.


Originally developed simply as a way to enter queries and see results, SQL*Plus has been
enhanced with scripting and formatting capabilities and can be used for many different
purposes. The basic functionality is simple. With SQL*Plus, you can do the following:

 Issue a SELECT query and view the results.


 Insert, update, and delete data from database tables.

 Submit PL/SQL blocks to the Oracle server for execution.


 Issue DDL statements, such as those used to create, alter, or drop database objects (e.g.,
tables, indexes, and users), as well as any other types of SQL statements that Oracle
supports.

7|Page
 Execute SQL*Plus script files.
 Write output to a file.

 Execute procedures and functions that are stored in a database.


 The purpose of SQL Developer

Oracle SQL Developer is the Oracle Database IDE. A free graphical user interface,
Oracle SQL Developer allows database users and administrators to do their database
tasks in fewer clicks and keystrokes. A productivity tool, SQL Developer's main
objective is to help the end user save time and maximize the return on investment in the
Oracle Database technology stack.

SQL Developer supports Oracle Database 10g, 11g, and 12c and will run on any
operating system that supports Java.

SQL Developer will continue to add and enhance features for the DBA. Today, SQL
Developer's DBA panel provides support for:
o Data Pump
o Recovery Manager (RMAN)
o Oracle Auditing
o User and Role management
o Storage management, including the ability to add space to your table spaces.
o Resource Manager
o Diagnostic Pack features:

9. Write Oracle 12c new features.

Write Oracle 12c new features.

 Advanced index compression: - Advanced Index Compression works well on all


supported indexes, including those indexes that are not good candidates for the existing

8|Page
prefix compression feature; including indexes with no, or few, duplicate values in the leading
columns of the index.
Advanced Index Compression improves the compression ratios significantly while still
providing efficient access to the index.

 Attribute Clustering: - Attribute clustering is a table-level directive that clusters data in


close physical proximity based on the content of certain columns. This directive applies to
any kind of direct path operation, such as a bulk insert or a move operation. Storing data that
logically belongs together in close physical proximity can greatly reduce the amount of data
to be processed and can lead to better compression ratios.

 Automatic Big Table Caching: - In previous releases, in-memory parallel query did
not work well when multiple scans contended for cache memory. This feature implements a
new cache called big table cache for table scan workload. This big table cache provides
significant performance improvements for full table scans on tables that do not fit entirely
into the buffer cache.

 FDA Support for CDB’s: - Flashback Data Archive (FDA) is supported for multitenant
container databases (CDB’s) in this release. Customers can now use Flashback Data Archive
in databases that they are consolidating using Oracle Multitenant, providing the benefits of
easy history tracking to applications using pluggable databases (PDB) in a multitenant
container database.

 Full Database Caching: - Full database caching can be used to cache the entire
database in memory. Caching the entire database provides significant performance benefits,
especially for workloads that were previously limited by I/O throughput or response time.
More specifically, this feature improves the performance of full table scans by forcing all
tables to be cached.

 PDB Metadata Clone: - An administrator can now create a clone of a pluggable


database only with the data model definition. The dictionary data in the source is copied as is

9|Page
but all user-created table and index data from the source is discarded. This feature enhances
cloning functionality and facilitates rapid provisioning of development environments.

 PDB Containers Clause: - This feature enables an innovative way to aggregate user-
created data in a multitenant container database. Reports that require aggregation of data
across many regions or other attributes can leverage the CONTAINERS clause and get data
from one single place.

 In-Memory Colum Store: - In-Memory Column Store enables objects (tables or


partitions) to be stored in memory in a columnar format.   By allocating memory to In-
Memory Column Store, you can instantly improve the performance of their existing analytic
workload and enable interactive ad-hoc data extrapolation.

10. Study DDL, DML, TCL and DCL languages that can execute in Oracle 12c (not include in your
document).

13. Identify users and their roles in your project;

 The users of Student registration system and their roles in this system are the
following.

users Their role


Biniam student
Mr.Amare Head;
Mr.Feydu Dean
Mr.Kifile president
Mr.Habtie Instractor

14. Using SQLPLUS connect as A SYSDBA and create another DBA user
within a pluggable database regarding your project business rule.

Microsoft Windows [Version 10.0.15063]

(c) 2017 Microsoft Corporation. All rights reserved.

10 | P a g e
C:\Users\Administrator>sqlplus sys/Oracleuser_1@pdborcl as sysdba;

SQL*Plus: Release 12.1.0.2.0 Production on Wed May 30 10:28:21 2018

Copyright (c) 1982, 2014, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show user;

USER is "SYS"

SQL> drop user ADMIN;

User dropped.

SQL> create user ADMIN identified by admin;

User created.

SQL> show user;

USER is "SYS"

SQL> drop user ADMIN

User dropped

SQL> create user ADMIN identified by admin;

User created.

SQL> grant DBA to ADMIN;

Grant succeeded.
15. Connect a new DBA to the database and create other users that access the
database based on your use case.
11 | P a g e
SQL> connect ADMIN/admin@pdborcl;

Connected.

SQL> show user;

USER is "ADMIN"

SQL> create user Biniam identified by biniam;

User created.

SQL> create user Mr_Amare identified by amare;

User created.

SQL> create user Mr_Abduidentified by Abdu;

User created.

SQL> create user Mr_Feydu identified by feydu;

User created.

SQL> create user Mr_Kifile identified by kifile;

User created.
16. Create roles.

SQL> create role student;

Role created.

SQL> create role Head ;

Role created.

SQL> create role Instractor;

Role created.

12 | P a g e
SQL> create role Dean;

Role created.

SQL> create role president;

Role created.

17. What is profile? Create profile.

Profile determines the expiration characteristics of your account’s password are assigned to
your account. Related to passwords and account access, profiles can enforce the following:

 The “lifetime” of your password, which determines how frequently you must change it.

 The grace period following your password’s “expiration date” during which you can change
the password

 The number of consecutive failed connect attempts allowed before the account is automatically
“locked”

 The number of days the account will remain locked

 The number of days that must pass before you can reuse a password.

The number of password changes that must take place before you can reuse a password Profiles
are created using the create profile command in combination with the limit operator and are
managed by the DBA.

SQL> CREATE PROFILE userProfile LIMIT

2 FAILED_LOGIN_ATTEMPTS 5

3 PASSWORD_LIFE_TIME 60

4 PASSWORD_REUSE_TIME 60

5 PASSWORD_REUSE_MAX 5

13 | P a g e
6 PASSWORD_LOCK_TIME 1/24

7 PASSWORD_GRACE_TIME 10;

Profile created.

18. Grant system privileges to the roles may be alter database, create
pluggable database, create table, create any table, alter any table, drop any
table, lock any table, select any table, insert any table, update
any table, delete any table, create session, create any index, drop any index,
create table space, unlimited.
table space, create role, drop any role, grant any role, create trigger, create
any trigger, create
procedure, create any procedure, drop any procedure, create user, alter user,
drop user, create view,
create any view, drop any view…

SQL> grant create session, Alter Database, Create Pluggable Database, Create Table, Create

Any Table, Alter Any Table, Drop Any Table, Lock Any Table, Select Any Table, Insert
Any Table, Update

any table,Create Role, Drop Any Role, Grant Any Role, Create User, Alter User, Drop User,

create any view, create any trigger to president;

Grant succeeded.

SQL> grant create session, select any table,select any view to student;

Grant succeeded.

SQL> grant create session, create table,select any table,create view ,drop any table,update any
table to dean;

14 | P a g e
Grant succeeded.

SQL> grant create session, create table,select any table,create view ,drop any table,update any
table to head;

Grant succeeded.

SQL> grant create session, create table, select any table, create view ,drop any table, update any
table to dean;

Grant succeeded.

SQL> grant create session, create table, select any table, create view to instractor;

Grant succeeded.
19. Identify user’s responsibility from the organization business rule and
grant Roles to the Users and then connect high privilege user to the pluggable
database.

SQL> grant student to biniam;

Grant succeeded.

SQL> grant head to Mr_Amare;

Grant succeeded.

SQL> grant instractor to Mr_Worku;

Grant succeeded.

SQL> grant president to Mr_Kifile;

Grant succeeded.

SQL> grant dean to Mr_Feydu;

15 | P a g e
Grant succeeded.

SQL> connect Mr_kifile/kifile@pdborcl;

Connected.

SQL> show user;

USER is "MR_KIFILE"

20. Create 3rd normalized tables and create triggers that enables to update and
delete data from both parent and child.
tables since oracle supports only on delete cascade but not on update cascade.

SQL> connect Mr_kifile/kifile@pdborcl;

Connected.

SQL> create table REGISTERAR

(regID varchar(30) primary key,

Rname varchar(30),

Rlocation varchar(30));

Table created.

SQL> insert into REGISTERAR values('10','CIR','first floor');

1 row created.

SQL> create table DEPARTMENT

( depID varchar(30) primary key ,

dep_name varchar(30),

dep_location varchar(30),regid varchar(30),

16 | P a g e
constraint fk_reg foreign key(regid) references REGISTERAR(regID));

Table created.

SQL> INSERT into DEPARTMENT values('20','IS','Second floor','10');

1 row created.

SQL> create table COURSE

( coursecode varchar(30) primary key,

courseName varchar(30),

credithour varchar(30),

coursetype varchar(30),

depID varchar(30),constraint fk_depID foreign key(depID) references


DEPARTMENT(depID));

Table created.

SQL> create table INSTRACTOR

(instID varchar(30) primary key,

fname varchar(30),

lname varchar(30),

gender varchar(30),

salary float,

birthdate date,

age int,

17 | P a g e
depId varchar(30) ,foreign key(depId) references DEPARTMENT(depID));

Table created.

SQL> insert into INSTRACTOR values('100','Habite','legebo','M',3000,'1 sep 1995','22','20');

1 row created.

SQL> create table STUDENT

(studID varchar(30) primary key,

Fname varchar(30),

Lname varchar(30),

sex varchar(1),

GPA float,

birthdate date,

age int,

section varchar(1),

yeare varchar(10),

depID varchar(30),foreign key(depID) references DEPARTMENT(depID),

regID varchar(30),foreign key(regID ) references REGISTERAR(regID));

Table created.

SQL> insert into STUDENT VALUES('CIR/100/08','sara','zeru','F',3.90,'10 may


1990',20,'A','third year','22','11');

1 row created.

SQL> insert into STUDENT VALUES('CIR/332/09','yenesew','Mola','F',3.90,'1 sep


2000',19,'B','third year','20','10');

18 | P a g e
1 row created.

SQL> insert into STUDENT VALUES('CIR/073/09','Bini','Tesfaye','M',3.92,'1 july


2000',22,'B','third year','21','11');

1 row created.

SQL> insert into STUDENT VALUES('CIR/160/10','abebe','zola','M',3.00,'10 may


2000',22,'D','first year','22','11');

1 row created.

SQL> create table STUDENT_PHONE

phoneID int primary key ,

phone varchar(30),

studID varchar(30) ,foreign key(studID ) references STUDENT(studID) );

Table created.

SQL> insert into STUDENT_PHONE values(1,'+251960745565','CIR/100/08');

1 row created.

SQL> insert into STUDENT_PHONE values(2,'+251913462555','CIR/332/09');

1 row created.

SQL> create table STUDENT_JUNCTION

studID varchar(30), foreign key(studID) references STUDENT(studID),

instID varchar(30), foreign key(instID) references INSTRACTOR(instID),

courseCode varchar(30), foreign key(courseCode) references COURSE(courseCode),

19 | P a g e
constraint PKInsStuCour primary key (InstID, StudID,CourseCode));

Table created.

SQL> insert into STUDENT_JUNCTION values('CIR/332/09','101','INSY3071');

1 row created.

SQL> insert into STUDENT_JUNCTION values('CIR/100/08','101','INSY2062');

1 row created.

SQL> Create or replace trigger BeforeAll_Student

Before Insert or Update or Delete on Student

For each row

Enable

Declare

userName varchar2(60);

Begin

select user into userName from dual;

If Inserting Then

DBMS_OUTPUT.PUT_LINE ('One Row Inserted By Mr. '||userName);

ElsIf Updating Then

DBMS_OUTPUT.PUT_LINE ('One Row Updated By Mr. '||userName);

ElsIf Deleting Then

20 | P a g e
DBMS_OUTPUT.PUT_LINE ('One Row Deleted By Mr. '||userName);

End If;

end;

Trigger created.

SQL> delete STUDENT;

One Row Deleted By Mr. MR_KIFILE

One Row Deleted By Mr. MR_KIFILE

One Row Deleted By Mr. MR_KIFILE

SQL> Create or replace trigger BeforeAll_COURSE

Before Insert or Update or Delete on COURSE

For each row

Enable

Declare

userName varchar2(60);

Begin

select user into userName from dual;

If Inserting Then

DBMS_OUTPUT.PUT_LINE ('One Row Inserted By Mr. '||userName);

ElsIf Updating Then

21 | P a g e
DBMS_OUTPUT.PUT_LINE ('One Row Updated By Mr. '||userName);

ElsIf Deleting Then

DBMS_OUTPUT.PUT_LINE ('One Row Deleted By Mr. '||userName);

End If;

end;

Trigger created.

SQL> Delete COURSE;

One Row Deleted By Mr. MR_KIFILE

One Row Deleted By Mr. MR_KIFILE

One Row Deleted By Mr. MR_KIFILE

SQL> Create or replace trigger BeforeAll_INSTRACTOR

2 Before Insert or Update or Delete on INSTRACTOR

3 For each row

4 Enable

5 Declare

6 userName varchar2(60);

7 Begin

8 select user into userName from dual;

9 If Inserting Then

22 | P a g e
10 DBMS_OUTPUT.PUT_LINE ('One Row Inserted By Mr. '||userName);

11 ElsIf Updating Then

12 DBMS_OUTPUT.PUT_LINE ('One Row Updated By Mr. '||userName);

13 ElsIf Deleting Then

14 DBMS_OUTPUT.PUT_LINE ('One Row Deleted By Mr. '||userName);

15 End If;

16 end;

17 /

Trigger created.

SQL> Delete INSTRACTOR;

One Row Deleted By Mr. MR_KIFILE

One Row Deleted By Mr. MR_KIFILE

One Row Deleted By Mr. MR_KIFILE

SQL> Set Serveroutput On;

SQL> CREATE OR REPLACE TRIGGER Student_JunctionTrig Before

2 INSERT OR

3 UPDATE OR

4 DELETE ON Student_Junction FOR EACH row Enable BEGIN

23 | P a g e
5 If Updating Then Update Student_Junction Set studid=:New.studid where
studid= :Old.studid;

6 ElsIf Deleting Then

7 Delete From Student_Junction WherE studid=:Old.studid;

8 End If;

9 end;

10 /

Trigger created.
21. The table owner grant object privileges to the Roles or Users may be
Select, Insert, Update, Delete, Alter, Index,
References…

SQL> grant select,update,delete on Mr_kifile.Student to head;

Grant succeeded.

SQL> grant select,update,delete on Mr_kifile.Course to head;

Grant succeeded.

SQL> grant head to Mr_amare;

Grant succeeded.

SQL> grant select,update,delete on Mr_kifile.Course to instractor;

Grant succeeded.

SQL> grant select,update,delete on Mr_kifile.student to instractor;

24 | P a g e
Grant succeeded.

SQL> grant instractor to Mr_worku;

Grant succeeded.

SQL> grant select,update,delete on Mr_kifile.student to student;

Grant succeeded.

SQL> grant student to biniam;

Grant succeeded.
22. Create synchronized backup copy trigger for each table.

SQL> Create Table Student_Backup As Select * From Student Where 1=2;

Table created.

Create or replace trigger Student_Backup

Before Insert or Update or Delete on Student

For each row

Enable

Begin

If Inserting Then

Insert into Student_Backup(Fname )Values(:New.Fname);

ElsIf Updating Then

Update Student_Backup Set Fname=:New.Fname where Fname= :Old.Fname;

25 | P a g e
ElsIf Deleting Then

Delete From Student_Backup WherE Fname=:Old.Fname;

End If;

end;
23. Create database security audit by using DBA_AUDIT_TRAIL for each
table to audit DML operations.

SQL> audit select on student;

Audit succeeded.

SQL> audit update, delete on student;

Audit succeeded.

SQL> audit select, update, delete on course;

Audit succeeded.

SQL> audit select, update, delete on Registerar;

Audit succeeded.

SQL> select *from DBA_AUDIT_TRIAL;

audit successed.
24. Create DDL Trigger for each table with Schema Auditing to audit DDL
operations (track changes to the database).

SQL> Create Table Schema_Audit (

26 | P a g e
2 DDL_Date Date,

3 DDL_User Varchar(30),

4 Object_Created Varchar(40),

5 Object_Name Varchar(40),

6 DDL_Operation Varchar(60)

7 );

Table created.

SQL> Create or replace trigger Admin_Schema_Audit

2 After DDL On Schema

3 Insert into Schema_Audit Values(Sysdate,

4 Sys_context('USERENV', 'CURRENT_USER'),

5 Ora_Dict_Obj_Type,

6 Ora_Dict_Obj_Name,

7 Ora_Sysevent);

8 End;

9 /

Trigger created.
25. Create Database level and Schema level triggers (to monitor or audit the
system event such as user logon, user logoff, database shutdown and startup).

SQL> Create Table DB_Event_Audit (

2 Event_type Varchar2(40),

27 | P a g e
3 Logon_date date,

4 Logon_time Varchar2(50),

5 Logoff_date date,

6 Logoff_time Varchar2(50)

7 );

Table created.

SQL> Create or Replace Trigger DB_Logon_Audit

2 After Logon On Schema

3 Begin

4 Insert into DB_Event_Audit values

5 (Ora_sysevent,Sysdate,To_Char(Sysdate, 'HH24:MI:SS'),Null,Null);

6 Commit;

7 End;

8 /

Trigger created.

Create Table DB_Event_Audit (

User_name Varchar2(40),

Event_type Varchar2(40),

Logon_date date,

Logon_time Varchar2(50),

28 | P a g e
Logoff_date date,

Create or Replace Trigger DB_Logoff_Audit

Before Logoff On Database

Begin

Insert into DB_Event_Audit values(

User,

Ora_sysevent,

Null,

Null,

Sysdate,

To_Char(Sysdate, 'HH24:MI:SS')

);

Commit;

End;
26. Lock and unlock users, revoke system and object privileges, drop users
when user turnover from the organization.
27. Backup your database using RMAN.
28. Recover your database and transaction from accidental and intentional
failures.
29. Describe the concept of a distributed database.

Distributed database:

29 | P a g e
A logically interrelated collection of shared data (and a description of this data) physically
distributed over a computer network. A distributed database is a collection of data, which are
distributed over different computers of a computer network.

Distributed DBMS:

The software system that permits the management of the distributed database and makes the
distribution transparent to users. A DDBMS is the software that manages the DDB and provides an
access mechanism that makes this distribution transparent to the users. Distributed database system
(DDBS) = DDB + D–DBMS what is not a DDBS?

• A timesharing computer system

• A loosely or tightly coupled multiprocessor system

• A database system which resides at one of the nodes of a network of computers

- This is a centralized database on a network node

30 | P a g e

You might also like