Assignment #3: Department of Computer Science Spring Semester 2016

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

DEPARTMENT OF COMPUTER SCIENCE

SPRING SEMESTER 2016

RELATIONAL DATABASE SYSTEM


ASSIGNMENT #3
Question 1:
DataBase Administrator:
A database administrator (DBA) is responsible for the performance, integrity and
security of a database. They will also be involved in the planning and
development of the database, as well as troubleshooting any issues on behalf of
the users.

 monitoring performance and managing parameters to provide fast


responses to front-end users;
 mapping out the conceptual design for a planned database;
 considering both back-end organization of data and front-end accessibility
for end-users;
 refining the logical design so that it can be translated into a specific data
model;
 further refining the physical design to meet system storage requirements;
 installing and testing new versions of the DBMS;

DataBase Designer:

Database design is the process of producing a detailed data model of


a database. This data model contains all the needed logical and physical
design choices and physical storage parameters needed to generate a
design in a data definition language, which can then be used to create a
database. A fully attributed data model contains detailed attributes for
each entity.

The term database design can be used to describe many different parts of
the design of an overall database system. Principally, and most correctly, it
can be thought of as the logical design of the base data structures used to
store the data. In the relational model these are the tables and views. In
an object database the entities and relationships map directly to object
classes and named relationships. However, the term database design could
also be used to apply to the overall process of designing, not just the base
data structures, but also the forms and queries used as part of the overall
database application within the database management system (DBMS).

Question 2:
Steps of Oracle 11g Installations:

 Leave EMail blank.
 Un-check …Receive Security Updates… tick-box.
 Click Next.
 If integration with Oracle Support is required, it can be configured later.
 Click Yes.

 Select Create And Configure A Database.


 Click Next.
 Select Desktop Class.
 Click Next.
 Enter full path to Oracle Base - e.g. C:\ORACLE11G\app\oracle
 Enter full path to Software Location - e.g.
C:\ORACLE11G\app\oracle\product\11.2.0
 Enter full path to Database File Location - e.g. C:\ORACLE11G\oradata
 Select Database Edition - e.g. Enterprise Edition
 Select Character Set - e.g. Unicode (AL32UTF8)
 Enter Global Database Name
 Enter Administritive Password - N.B. The installer will check for appropriate
complexity of the password.
 Enter Confirm Password
 Click Next.
 Check the summary.
 Click Finish.
 Depending upon the specification of the desktop wait for approx 30 mins…

 Depending upon the specification of the desktop wait for approx 30 mins…
 Database Console can be configured later.
 Click OK.

 Note down any information required from the Database Configuration Assistant
summary.
 Click OK.
 Click Close.
Question 3:
Steps of ORACLE 10g forms installation and configuration
Setting Environment Variables:

When installing the Oracle9iAS infrastructure or the Oracle Collaboration Suite


middle tier, ensure that the TMP or TEMP directory has 300 MB, or more, of free space.

Important:

The ORACLE_HOME environment variable is automatically set in the registry.


Do not set this variable as a System Environment variable, as it prevents
installation.

To change the TMP or TEMP directory path on Windows NT:

1. Select Start > Settings > Control Panel > System.
2. Select the Environment tab.
3. Select the TMP or TEMP variable from the User Variables for username list box.
4. Change the Value field to a directory with 300 MB, or more, of free space.
5. Click Set.
6. Click OK.

To change the TMP or TEMP directory path on Windows 2000:

1. Select Start > Settings > Control Panel > System.
2. Select the Advanced tab.
3. Click Environment Variables.
4. Select the TMP or TEMP variable from the User Variables for username list box.
5. Click Edit.
6. Change the Variable Value field to a directory with 300 MB, or more, of free
space.
7. Click OK until you exit System Properties.

Changing the Size of the Virtual Memory Paging File:

To change the amount of virtual memory on Windows NT:

1. Select Start > Settings > Control Panel > System.
2. Select the Performance tab.
3. Click Change.
4. Select the appropriate drive and enter the new value in the Initial size
(MB) field.
5. Click Set.
6. Click OK until you exit System Properties.

To change the amount of virtual memory on Windows 2000:

1. Select Start > Settings > Control Panel > System.
2. Select the Advanced tab.
3. Click Performance Options.
4. Click Change.
5. Select the appropriate drive and enter the new value in the Initial size
(MB) field.
6. Click Set.
7. Click OK until you exit System Properties.

Question 4:
 Open sql developer and Login from user
 Click on table
 Right click on table and create new table Student
 Use + to add attributes (SID,SNAME,SAGE,SADD).
 Classify each attribute with a data type eg varchar2,char,number,date (SID
number(10), SNAME varchar2(20))
 Use not null function and tick on primary key (SID number(10) not null)
 Right click on edit and use constraint option (primary key(SID))
 CTRL + S to save

 Open sql developer and Login from user


 Click on table
 Right click on table and create new table Course
 Use + to add attributes (CID,CNAME,SID,CREDITS).
 Classify each attribute with a data type eg varchar2,char,number,date (CID
number(10), SID number(10), CNAME varchar2(20), CREDITS number(10))
 Use not null function and tick on primary key (CID number(10) not null, SID
number(10) not null)
 Right click on edit and use constraint option (primary key(CID)) (FOREIGN
KEY(SID) references Student(SID))
 CTRL + S to save

 Open sql developer and Login from user


 Click on table
 Right click on table and create new table Teacher
 Use + to add attributes (TID,TNAME,CID,TSAL).
 Classify each attribute with a data type eg varchar2,char,number,date (TID
number(10), CID number(10), TNAME varchar2(20), TSAL number(10))
 Use not null function and tick on primary key (TID number(10) not null, CID
number(10) not null)
 Right click on edit and use constraint option (primary key(CID)) (FOREIGN
KEY(ID) references Student(SID))
 CTRL + S to save

Now for creating form


 Now when we are done with creation of table Go to sql developer
 Data block wizard
 Select desirable table STUDENT and desirable columns for form
(SID,SNAME,SAGE,SADD)
 Go to layout editor for form edit option.

Now for creating form


 Now when we are done with creation of table Go to sql developer
 Data block wizard
 Select desirable table COURSE and desirable columns for form
(CID,SID,CNAME,CREDITS)
 Go to layout editor for form edit option.
Now for creating form
 Now when we are done with creation of table Go to sql developer
 Data block wizard
 Select desirable table TEACHER and desirable columns for form
(TID,CID,TNAME,TSAL)
 Go to layout editor for form edit option

Question 5:
Steps for view are;
 Select the desirable table (Student) for creating view
 Right click on view to create new view with a view name eg STUD_INFO
 Select required column for view(SID,SNAME)

 Select the desirable table (Course) for creating view.


 Right click on view to create new view with a view name eg COURSE_INFO
 Select required column for view (CID,CNAME)

 Select the desirable table (TEACHER) for creating view.


 Right click on view to create new view with a view name eg TEACHER_INFO
 Select required column for view (TID,TNAME)

Steps for Triggers are;


 Select the desirable table (STUDENT) for creating TRIGGER.
 Right click on TRIGGER to create new trigger.
 Go to smart trigger > other > on update
 Write query go_Block ('STUDENT'); > UPDATE_RECORD; >
EXECUTE_QUERRY; > COMMIT;
 Select the desirable table (COURSE) for creating TRIGGER.
 Right click on TRIGGER to create new trigger.
 Go to smart trigger > other > on update
 Write query go_Block ('COURSE'); > UPDATE_RECORD; > EXECUTE_QUERRY;
> COMMIT;

 Select the desirable table (TEACHER) for creating TRIGGER.


 Right click on TRIGGER to create new trigger.
 Go to smart trigger > other > on update
 Write query go_Block ('TEACHER'); > UPDATE_RECORD; >
EXECUTE_QUERRY; > COMMIT;

Question 6:
DML QUERY
STUDENT
go_block('STUDENT');
insert_record;
execute_query;
commit;

go_block('STUDENT');
delete_record;
execute_query;
commit;

COURSE
go_block('COURSE');
insert_record;
execute_query;
commit;

go_block('COURSE');
delete_record;
execute_query;
commit;

TEACHER
go_block('TEACHER');
insert _record;
execute_query;
commit;

go_block('TEACHER');
delete_record;
execute_query;
commit;

DDL QUERY
STUDENT
NEW_FORM (FRMSTUDENT) VARCHAR2;
COURSE
NEW_FORM (FRMCOURSE) VARCHAR2;
TEACHER
NEW_FORM (FRMTEACHER) VARCHAR2;
STUDENT
exit_form;
COURSE
exit_form;
TEACHER
exit_form;

You might also like