Uploaded by Shin Thant Pyae Bhone

ShinThantPyaeBhone DBMA Exam

advertisement
Page 1
Take Home Exam guidance
TAKE HOME EXAMINATION INFORMATION – Computing Programmes.
This briefing note below is provided as guidance if you are taking take home examination.
Please read the following instructions carefully:
This exam is being conducted as a ‘take-home’ exam. This means that the examination question paper
will be made available to you by your local partner institution at the specified date and time.
ONLY COMPLETE THOSE QUESTIONS REQUIRED BY THE EXAM PAPER
You will have 5 days to complete this ‘take-home’ exam paper. The original exam duration and expected word
limit per question will be stated on the examination paper to help you get a sense of the expected effort. As this is a Take
Home exam, we do not expect the work to take you more than one day to complete. We recognise that during the Covid-19
crisis many of you have other commitments, IT issues and worries and possibly other overlapping exams, so we are supporting
you by providing extra time to accommodate this. There will, however, be no extension to the scheduled submission deadline
on the exam timetable. If you fail to submit by the deadline and have supporting evidence, you should follow the University
Extenuating Circumstances (EC) procedure in the Portal.
Further Information
1. Ensure that your login credentials are working to access the UoG Portal.
2. Ensure that your student ID number is clearly visible at the top of your exam answer booklet. Do not add your name
as the paper is marked anonymously.
3. Complete your exam paper as a Word document.
4. Make sure that you clearly identify which question(s) you are answering and start each answer on a new page.
5. You are permitted to embed images/formulas/diagrams if necessary. You should scan these into your word document.
6. As this is an examination, we are not expecting you to write an academic essay. There is no requirement to provide
references, citations etc. You should however make references to academic theory where relevant in support of your
answers.
7. All your exam answers must be saved in a single file.
8. You will be required to submit your completed take home exam answer document via the same site you use for
coursework assessments via Moodle.
9. You can upload only one file, however if you submit multiple times, only the last submission will used.
10. Leave plenty of time to upload your work.
11. Your submission will be checked through Turnitin Software.
12. Take care to ensure that you upload the correct file – clearly name your file so that mistakes don’t happen; e.g.
‘COMP1234ExamFinal’
If you have any further questions, please review the document
FLAS_Overseas Partner FAQs on Examinations and Assessments document
If you still have questions than Your local programme coordinator is also available to you if you require any
further support/guidance.
Page 2
Date and Time of Take Home Exam:
From:
29/04/2022 to:05/05/2022
Title of Examination: Database Management and Administration
Module Code: COMP 1638
ENTER STUDENT NUMBER BELOW
0
0
1
2
4
3
8
4
Student Signature: Shinthant
3
INSTRUCTIONS TO CANDIDATES
1. Read the first page of this document for further
guidance relating to this TAKE Home Exam
2. Include your Banner ID where required
3. Read the instructions on the exam paper carefully when
answering the questions.
4. Begin each question in a new page.
5. Write the number of the question (and sub section) in
the left hand margin.
Question
Number
1.(a)
1.(b).(i)(ii)(iii)
1.(c)1,2,3,4
2.(a).(i)(ii)
2.(b)A,B,C,D,E
2.(c)
2.(d)(i)(ii)
Total
Final Mark
First
Marker
Second
Marker
Page 3
Question
No.
Date
2
5
Student Number
2022
0
0
1
2
4
3
8
4
….....………......…..Centre Name……...……..……..….
3 MCCi(Yangon Campus)
1.(a)
The explanation for each of the steps:
- "Students" table name is created in "HR" schema using the "CREATE TABLE HR.
Students" command and naming table for database objects.
1.(b)(i)
-
stud_number is defined by the user-defined primary key constraint std_num_PK and
is the set at the column level. The data type used in the umber.
-
name is defined by CONSTRANITNT std_name_NN user-defined NOT NULL
constraint and it defined on the column table. The datatype of the name is
VARCHAR2(20).
-
Surname datatype is VARCHAR2(20). It is defined by std_surname_NN user defined
by NOT NULL constraint and it is defined on the column table.
-
The constraint of age should only accept age>17. It is defined by std_age_CK user
defined by NUMBER constraint and it defined on the col
-
The gender of Students should only accept female for ‘F’ and male for ‘M’. Therefore,
use CHAR datatype as CHAR (1) and defined CONSTRAINT std_gen_CK userdefined check constraint CHECK (gender IN(‘F’,’M’).
-
"TABLESPACE College" is written at the end of the create table statement to store
a tablespace named College.
- Closed the database is the first step to do: Modified blocks of data stored in the SGA are
written to disk. The contents of the log buffer are written to disk and then the log cache is
cleared. A checkpoint is implemented. The data and log files are closed.
-Dismount the database is the second step: To complete the shutdown, the instance
disconnects the database and updates the required entries in the control file. The control
file has been removed from the system. The database has been unmounted and closed.
-In the end, the instance has to stop: The instance terminates background processes and
de-allocates the System Global Area's shared memory.
Total Marks
Marking
1st
2nd
Page 4
Question
No.
1.(b)(ii)
Date
2
5
Student Number
22
0
0
1
2
4
3
8
4
….....………......…..Centre Name……...……..……..….
MCCi (Yangon Campus)
3
Shutdown normal, Shutdown Transactional, Shutdown Immediate, and Shutdown abort are
the four types of shutdown modes.
Shutdown normal -The server does not allow new connections until the current sessions
are finished. It waits for the pending transactions to complete. It makes the files close with
a checkpoint. Before the database is closed down, the database waits for all presently linked
users to disconnect from the database. Shutdown normal does not require the version
rollback on subsequent database start-up Shutdown Normal and shutdown commands have
the same effect.
Shutdown normal command- SQL>shutdown normal;
Shutdown Transactional – The server does not permit new connections and does not wait
for the current sessions to end but it will wait for the current transactions to stop then it will
pressure the checkpoint and close the files. A transactional shutdown prevents customers
from dropping at work, and on the equal time, does now no longer require all customers to
log off.
Shutdown Transactional command- SQL> shutdown transactional;
Shutdown Immediate – Shutdown Immediate is the most used shutdown way in the oracle
database. It does not for the current session to disconnect from the database or for the
current transactions to fish before proceeding. All connected sessions are instantly
disconnected, all uncommitted transactions are rolled back, and the database is totally
shutdown during the Shutdown immediate.
Command for Shutdown Immediate – SQL> shutdown immediate;
Shutdown Abort – Shutdown Abort is not recommended to use and only used under certain
circumstances. When unplugging from the server, Shutdown Abort will have the same effect.
The database has in an inconsistent state. Shutdown abort should never use when
Shutdown Abort commands before backing up the database. After issuing the INSTANT
SHUTDOWN statement, the database will not accept any new connections database
connection will be closed and disconnected as a result of the statement.
Shutdown Abort command- SQL> shutdown abort;
Total Marks
Marking
1st
2nd
Page 5
Question
No.
1.(b)(iii)
Date
2
5
Student Number
2022
0
0
1
2
4
3
8
4
….....………......…..Centre Name……...……..……..….
MCCi (Yangon Campus)
3
Shutdown Immediate is the fastest and safe shutdown mode. When using shutdown
immediately to close a database, most of the reasons why database animations hang is due
to a major failure on restore. Therefore, we should use system checkpoints instead. change
before executing this command. All pending transactions cancelled no new session is
created. All sessions will be terminated. The immediate shutdown is the most commonly
used option Unconfirmed transactions rolled back.
Comparison for Shutdown modes are-
1.(c).1
(c).2.
Shutdown Modes
Normal
Immediate
Transactional Abort
Allow new connections
NO
NO
NO
NO
Wait for the end of the YES
current session
NO
NO
NO
Wait
for
pending YES
transactions to complete
NO
YES
NO
Focus a checkpoint and YES
close files
YES
YES
NO
The statement is correct. Reasons for this state- The control file is a tiny binary file that
keeps track of the database's physical structure: the name of the database, the name and
location of the associated data files and the online log file, database creation timestamp.
The statement is incorrect. A data file can only be associated with a single tablespace and
with a single database. Oracle allocates the given amount of disc space plus the overhead
required for the file header to generate a data file for a tablespace.
(c).3.
The statement is incorrect because the NOT NULL constraint allows duplicate values to be
inserted. The NOT NULL constraint allows duplicate values. If we have defined a column
as Incomplete when inserting or updating values on the table, we must and should provide
a value for that specified column. The non-zero constraint allows duplicate values.
(c).4.
The statement is correct because Setting the LIMIT_SESSIONS_PER_USER resource limit
will accomplish this task.
Total Marks
Marking
1st
2nd
Page 6
Question
No.
2.(a)(i)
2.(a)(ii)
Date
2
5
Student Number
2022
0
0
1
2
4
3
8
4
….....………......…..Centre Name……...……..……..….
MCCi (Yangon Campus)
3
Read consistency is the quality that occurs when one user starts making a few
changes in a database or relation, and before that user can finish, another user begins
executing queries against the same table or relation.
The second person cannot see any changes when the first user until the transaction
is committed. The implementation of read consistency is automated. In undo segments,
partial copies of the database are kept. The read consistency image is built from the table's
committed data and the old, modified, and uncommitted data of the uncommitted segment.
When the Oracle server performs an insert, update, or delete operation on the database, it
makes a copy of the data before it is altered and writes it to an undo segment.
All readers, save the one who made the change, see the database as it was before
the modifications were made; they see the "snapshot" of the data in the undo section.
Before the changes are committed to the database, only the user who modifies the data will
see the database with the changes. This ensures that data readers read consistent data that
is currently unmodified.
When a DML statement is committed, the database modification is visible to everyone
who makes a select statement after it is finished. In the undo segment file, the space
occupied by stale data is freed for reuse.
The changes are undone if the transaction is rolled back: The undo segment's data
is written back to the table in its original, order form, everyone sees the database as it was
before the transaction started.
Total Marks
Marking
1st
2nd
Page 7
Question
No.
Date
2
5
Student Number
2022
0
0
1
2
4
3
8
4
….....………......…..Centre Name……...……..……..….
MCCi (Yangon Campus)
3
2.(b)
2.(b). A
2.(b). B
The statement is incorrect because Rollback doesn't delete the table by inserting updating
the transaction so it won't be empty. The ROLLBACK command will only work for the
UPDATE command.
The statement is correct because the "POTATO" transaction failed due to the rollback after
the "POTATO" update command, only the previouly inserted product names PAPAYA and
"PASTA" will remain.
2.(b).C
The product name "PAPAYA" was updated using the update command so the product
name "PIZZA" will no longer be available so this statement is incorrect.
2.(b). D
The "POTATO" transaction failed because the "POTATO" transaction was updated and a
rollback was called therefore this statement is incorrect.
2.(b). E
The statement is incorrect because Rollback not only calls the transaction "POTATO" but
also the Prof_sales of the record and the syntax written for the record is correct. So, it will
be executed successfully.
Total Marks
Marking
1st
2nd
Page 8
Question
No.
Date
2
5
Student Number
2022
0
0
1
2
4
3
8
4
….....………......…..Centre Name……...……..……..….
MCCi (Yangon Campus)
3
2.(c)
The explanation for each step:
Three SQL statements can be used to implement specified requirements.
-In the first steps: use the CREATE user command to create the user, Wilson.
- Then, give Wilson user the CREATE GRANT SESSION system privilege so that he may
log into the database.
- Finally, the CREATE TABLE and CREATE VIEW system privileges must be granted to the
user in order for the user to be able to create tables or views.
2.(d)(i)
A sequence is the database object that allows users to generate unique integer values.
The sequence is incremented each time the sequence number is generated. It can be used
by multiple users. The increase occurs even when the trade is rolled back which can cause
gaps between the numbers. It can be generated with a schema to be uploaded to the DBMS
server. The progression can be ascending or descending.
Creating Sequence can be used in a database. Create a sequence with the CREATE
SEQUENCE statement, which is a database object that allows different users to construct
unique integers. Sequences can be used to generate primary key values automatically.
Total Marks
Marking
1st
2nd
Page 9
Date
Student Number
….....………......…..Centre Name……...……..……..….
MCCi (Yangon Campus)
3
Question
No.
2
2.(d)(ii)
Create table SQL command creates sequences in Seq HR schema
5
2022
0
0
1
2
4
3 8
4
Total Marks
Marking
1st
2nd
Page 10
Question
No.
Date
DD
MM
Student Number
YYYY
0
0
1
2
4
3
8
4
….....………......…..Centre Name……...……..……..….
MCCi (Yangon Campus)
3
Total Marks
Marking
1st
2nd
Download