Unix RDBMS
Unix RDBMS
Unix RDBMS
Zerone - Stands for Zero (0) and One (1), the very basics of computing. So Binary Matters.
Infact only Binary Matters in our world of computers. The motive behind Zerone is to make job
hunting an easier process or atleast that is what we intent to. This is a one stop jobs group.
N
The content in this document is collected from various groups, sites & media. Copyright belongs
to respective owners. If you have any copyright issues, please mail to legal@zeroneworld.com
with complete details.
O
"If You Have An Apple And I Have An Apple And We Exchange Apples Then You And I
Will Still Each Have One Apple. But If You Have An Idea And I Have An Idea And We
Exchange These Ideas, Then Each Of Us Will Have Two Ideas."
--- George Bernard Shaw (1856-1950)
R
1. What is 'inode'?
All UNIX files have its description stored in a structure called 'inode'. The
inode contains info about the file-size, its location, time of last access, time of last
E
modification, permission and so on. Directories are also represented as files and have
an associated inode. In addition to descriptions about the file, the inode contains
pointers to the data blocks of the file. If the file is large, inode has indirect pointer to a
Ø Number of links
Ø File size
Ø Location of the file data
ZE
E
Each operation is represented by discrete values
'r' is 4
'w' is 2
'x' is 1
Therefore, for 'rw' the value is 6(4+2).
Example 2:
N
O
To change mode of myfile to 'rwxr--r--' we give the args as:
chmod(myfile,0744).
A link is a second name (not a file) for a file. Links can be used to assign more
than one name to a file, but cannot be used to assign a directory more than one name
or link filenames on different computers.
ZE
Symbolic link 'is' a file that only contains the name of another file.Operation
on the symbolic link is directed to the file pointed by the it.Both the limitations of
links are eliminated in symbolic links.
Commands for linking files are:
Link ln filename1 filename2
Symbolic link ln -s filename1 filename2
1. What is a FIFO?
FIFO are otherwise called as 'named pipes'. FIFO (first-in-first-out) is a
special file which is said to be data transient. Once data is read from named pipe, it
cannot be read again. Also, data can be read only in the order written. It is used in
interprocess communication where a process writes to one end of the pipe (producer)
and the other reads from the other end (consumer).
1. How do you create special files like named pipes and device files?
The system call mknod creates special files in the following sequence.
1. kernel assigns new inode,
1. sets the file type to indicate that the file is a pipe, directory or special file,
1. If it is a device file, it makes the other entries like major, minor device numbers.
E
points to a three-level(triple in-direction)index block. This provides a very large
maximum file size with efficient access to large files, but also small files are accessed
directly in one disk read.
1. What is a shell?
N
A shell is an interactive user interface to an operating system services that allows an
O
user to enter commands as character strings or through a graphical user interface. The
shell converts them to system calls to the OS or forks off a process to execute the
command. System call results and other information from the OS are presented to the
user through an interactive interface. Commonly used shells are sh,csh,ks etc.
R
SECTION - II
ZE
1. Brief about the initial process sequence while the system boots up.
While booting, special process called the 'swapper' or 'scheduler' is created
with Process-ID 0. The swapper manages memory allocation for processes and
influences CPU allocation. The swapper inturn creates 3 children:
Ø the process dispatcher,
Ø vhand and
Ø dbflush
with IDs 1,2 and 3 respectively.
This is done by executing the file /etc/init. Process dispatcher gives birth to the
shell. Unix keeps track of all the processes in an internal data structure called the
Process Table (listing command is ps -el).
E
}
Answer:
Hello World!Hello World!
Explanation: N
The fork creates a child that is a duplicate of the parent process. The child
begins from the fork().All the statements after the call to fork() will be executed
O
twice.(once by the parent process and other by child). The statement before fork() is
executed only by the parent process.
main()
{
fork(); fork(); fork();
ZE
printf("Hello World!");
}
Answer:
"Hello World" will be printed 8 times.
Explanation:
2^n times where n is the number of calls to fork()
9. What is a zombie?
When a program forks and the child finishes before the parent, the kernel still
keeps some of its information about the child in case the parent might need it - for
example, the parent may need to check the child's exit status. To be able to get this
information, the parent calls `wait()'; In the interval between the child terminating and
the parent calling `wait()', the child is said to be a `zombie' (If you do `ps', the child
will have a `Z' in its status field to indicate this.)
E
10. What are the process states in Unix?
As a process executes it changes state according to its circumstances. Unix
processes have the following states: N
Running : The process is either running or it is ready to run .
Waiting : The process is waiting for an event or for a resource.
O
Stopped : The process has been stopped, usually by receiving a signal.
Zombie : The process is dead but have not been removed from the process
table.
R
for the system to run the program as if no other program were running on the system.
Each process has process context, which is everything that is unique about the state of
the program you are currently running. Every time you execute a program the UNIX
system does a fork, which performs a series of operations to create a process context
and then execute your program in that context. The steps include the following:
Ø Allocate a slot in the process table, a list of currently running programs kept by
UNIX.
Ø Assign a unique process identifier (PID) to the process.
Ø iCopy the context of the parent, the process that requested the spawning of the
new process.
Ø Return the new PID to the parent process. This enables the parent process to
examine or control the process directly.
After the fork is complete, UNIX runs your program.
E
14. What is 'ps' command for?
The ps command prints the process status for some or all of the running
N
processes. The information given are the process identification number (PID),the
amount of time that the process has taken to execute so far etc.
O
15. How would you kill a process?
The kill command takes the PID as one argument; this identifies which
process to terminate. The PID of a process can be got using 'ps' command.
R
end of the command you add the special background symbol, &. This symbol tells
your shell to execute the given command in the background.
Example: cp *.* ../backup& (cp is for copy)
Message Queues :
Message queues can be used between related and unrelated processes
running on a machine.
Shared Memory:
This is the fastest of all IPC schemes. The memory to be shared is
mapped into the address space of the processes (that are sharing). The speed
achieved is attributed to the fact that there is no kernel involvement. But this
scheme needs synchronization.
E
SECTION - III
MEMORY MANAGEMENT
N
1. What is the difference between Swapping and Paging?
Swapping:
O
Whole process is moved from the swap device to the main memory for
execution. Process size must be less than or equal to the available main memory. It is
easier to implementation and overhead to the system. Swapping systems does not
handle the memory more flexibly as compared to the paging systems.
R
Paging:
Only the required memory pages are moved to main memory from the
swap device for execution. Process size does not matter. Gives the concept of the
ZE
virtual memory.
It provides greater flexibility in mapping the virtual address space into the
physical memory of the machine. Allows more number of processes to fit in the main
memory simultaneously. Allows the greater process size than the available physical
memory. Demand paging systems handle the memory more flexibly.
1. What is major difference between the Historic Unix and the new BSD release of
Unix System V in terms of Memory Management?
Historic Unix uses Swapping – entire process is transferred to the main
memory from the swap device, whereas the Unix System V uses Demand Paging –
only the part of the process is moved to the main memory. Historic Unix uses one
Swap Device and Unix System V allow multiple Swap Devices.
Address Units
1 10,000
1. What scheme does the Kernel in Unix System V follow while choosing a swap
device among the multiple swap devices?
E
Kernel follows Round Robin scheme choosing a swap device among the
multiple swap devices in Unix System V.
1. What is a Region? N
A Region is a continuous area of a process’s address space (such as text, data
and stack). The kernel in a ‘Region Table’ that is local to the process maintains
O
region. Regions are sharable among the process.
1. What are the events done by the Kernel after a process is being swapped out from
the main memory?
R
When Kernel swaps the process out of the primary memory, it performs the
following:
Ø Kernel decrements the Reference Count of each region of the process. If
ZE
the reference count becomes zero, swaps the region out of the main
memory,
Ø Kernel allocates the space for the swapping process in the swap device,
Ø Kernel locks the other swapping process while the current swapping
operation is going on,
Ø The Kernel saves the swap address of the region in the region table.
1. Is the Process before and after the swap are the same? Give reason.
Process before swapping is residing in the primary memory in its original
form. The regions (text, data and stack) may not be occupied fully by the process,
there may be few empty slots in any of the regions and while swapping Kernel do not
bother about the empty slots while swapping the process out.
After swapping the process resides in the swap (secondary memory) device.
The regions swapped out will be present but only the occupied region slots but not the
empty slots that were present before assigning.
While swapping the process once again into the main memory, the Kernel
referring to the Process Memory Map, it assigns the main memory accordingly taking
care of the empty slots in the regions.
1. What are the entities that are swapped out of the main memory while swapping
the process out of the main memory?
All memory space occupied by the process, process’s u-area, and Kernel stack
are swapped out, theoretically.
Practically, if the process’s u-area contains the Address Translation Tables for
the process then Kernel implementations do not swap the u-area.
E
1. What is Expansion swap?
At the time when any process requires more memory than it is currently
allocated, the Kernel performs Expansion swap. To do this Kernel reserves enough
N
space in the swap device. Then the address translation mapping is adjusted for the
new virtual address space but the physical memory is not allocated. At last Kernel
swaps the process into the assigned space in the swap device. Later when the Kernel
O
swaps the process into the main memory this assigns memory according to the new
address translation mapping.
The swapper is the only process that swaps the processes. The Swapper
operates only in the Kernel mode and it does not uses System calls instead it uses
internal Kernel functions for swapping. It is the archetype of all kernel process.
ZE
1. What are the processes that are not bothered by the swapper? Give Reason.
Ø Zombie process: They do not take any up physical memory.
Ø Processes locked in memories that are updating the region of the process.
Ø Kernel swaps only the sleeping processes rather than the ‘ready-to-run’
processes, as they have the higher probability of being scheduled than the
Sleeping processes.
1. What are the criteria for choosing a process for swapping into memory from the
swap device?
1. What are the criteria for choosing a process for swapping out of the memory to
the swap device?
Ø The process’s memory resident time,
Ø Priority of the process and
Ø The nice value.
E
1. What are conditions on which deadlock can occur while swapping the processes?
Ø All processes in the main memory are asleep.
Ø All ‘ready-to-run’ processes are swapped out.
Ø There is no space in the main memory for the new incoming process.
O
1. What are conditions for a machine to support Demand Paging?
Ø Memory architecture must based on Pages,
Ø The machine must support the ‘restartable’ instructions.
R
total data space of the process. i.e. the process frequently calls the same subroutines or
executes the loop instructions.
1. What are data structures that are used for Demand Paging?
Kernel contains 4 data structures for Demand paging. They are,
26. What are the bits that support the demand paging?
Valid, Reference, Modify, Copy on write, Age. These bits are the part of the
page table entry, which includes physical address of the page and protection bits.
26. How the Kernel handles the fork() system call in traditional Unix and in the
System V Unix, while swapping?
Kernel in traditional Unix, makes the duplicate copy of the parent’s address
space and attaches it to the child’s process, while swapping. Kernel in System V
Unix, manipulates the region tables, page table, and pfdata table entries, by
incrementing the reference count of the region table of shared regions.
E
26. Difference between the fork() and vfork() system call?
During the fork() system call the Kernel makes a copy of the parent process’s
N
address space and attaches it to the child process.
But the vfork() system call do not makes any copy of the parent’s address
space, so it is faster than the fork() system call. The child process as a result of the
O
vfork() system call executes exec() system call. The child process from vfork() system
call executes in the parent’s address space (this can overwrite the parent’s data and
stack ) which suspends the parent process until the child process exits.
R
26. What are the phases of swapping a page from the memory?
Ø Page stealer finds the page eligible for swapping and places the page
number in the list of pages to be swapped.
33. In what way the Fault Handlers and the Interrupt handlers are different?
Fault handlers are also an interrupt handler with an exception that the interrupt
handlers cannot sleep. Fault handlers sleep in the context of the process that caused
the memory fault. The fault refers to the running process and no arbitrary processes
are put to sleep.
E
33. What is validity fault?
If a process referring a page in the main memory whose valid bit is not set, it
results in validity fault.
N
The valid bit is not set for those pages:
Ø that are outside the virtual address space of a process,
Ø that are the part of the virtual address space of the process but no physical address
O
is assigned to it.
33. What does the swapping system do if it identifies the illegal page for swapping?
If the disk block descriptor does not contain any record of the faulted page,
R
then this causes the attempted memory reference is invalid and the kernel sends a
“Segmentation violation” signal to the offending process. This happens when the
swapping system identifies any invalid memory reference.
ZE
33. What are states that the page can be in, after causing a page fault?
Ø On a swap device and not in memory,
Ø On the free page list in the main memory,
Ø In an executable file,
Ø Marked “demand zero”,
Ø Marked “demand fill”.
E
the process incur the validity page fault. Kernel handles the validity fault and the
process will incur the protection fault if any one is present.
N
33. In what way the protection fault handler concludes?
After finishing the execution of the fault handler, it sets the modify and
protection bits and clears the copy on write bit. It recalculates the process-priority and
O
checks for signals.
33. How the Kernel handles both the page stealer and the fault handler?
The page stealer and the fault handler thrash because of the shortage of the
R
memory. If the sum of the working sets of all processes is greater that the physical
memory then the fault handler will usually sleep because it cannot allocate pages for a
process. This results in the reduction of the system throughput because Kernel spends
ZE
too much time in overhead, rearranging the memory in the frantic pace.
1. What is DBMS?
It is a collection of programs that enables user to create and maintain a
database. In other words it is general-purpose software that provides the users with the
processes of defining, constructing and manipulating the database for various
applications.
E
1. Advantages of DBMS?
Ø Redundancy is controlled.
Ø Unauthorised access is restricted.
Ø
Ø
Ø
Providing multiple user interfaces.
Enforcing integrity constraints.
Providing backup and recovery.
N
O
1. Disadvantage in File Processing System?
Ø Data redundancy & inconsistency.
Ø Difficult in accessing data.
R
Ø Data isolation.
Ø Data integrity.
Ø Concurrent access is not possible.
Ø
ZE
Security Problems.
1. How is the data structure of System R different from the relational structure?
Unlike Relational systems in System R
Ø Domains are not supported
Ø Enforcement of candidate key uniqueness is optional
Ø Enforcement of entity integrity is optional
Ø Referential integrity is not enforced
E
Data independence means that “the application is independent of the storage structure
and access strategy of data”. In other words, The ability to modify the schema
definition in one level should not affect the schema definition in the next higher level.
Two types of Data Independence: N
Ø Physical Data Independence: Modification in physical level should not
affect the logical level.
Ø Logical Data Independence: Modification in logical level should affect
O
the view level.
NOTE: Logical Data Independence is more difficult to achieve
R
other words, there is no stored file that direct represents the view instead a definition
of view is stored in data dictionary.
Growth and restructuring of base tables is not reflected in views. Thus the
view can insulate users from the effects of restructuring and growth in the database.
Hence accounts for logical data independence.
E
primary key compromises of its partial key and primary key of its parent entity, then it
is said to be Weak Entity set.
E
are needed without specifying how to get those data.
The Low level or Procedural DML can specify and retrieve each record from a
set of records. This retrieve of a record is said to be Record-at-a-time.
E
34. When is a functional dependency F said to be minimal?
Ø Every dependency in F has a single attribute for its right hand side.
Ø We cannot replace any dependency X A in F with a dependency Y A where Y
N
is a proper subset of X and still have a set of dependency that is equivalent to F.
Ø We cannot remove any dependency from F and still have set of dependency that is
equivalent to F.
O
34. What is Multivalued dependency?
Multivalued dependency denoted by X Y specified on relation schema R,
where X and Y are both subsets of R, specifies the following constraint on any
R
relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4
should also exist in r with the following properties
Ø t3[x] = t4[X] = t1[X] = t2[X]
Ø t3[Y] = t1[Y] and t4[Y] = t2[Y]
ZE
E
34. What is 5NF?
A Relation schema R is said to be 5NF if for every join dependency {R1, R2,
..., Rn} that holds R, one the following is true
Ø Ri = R for some i. N
Ø The join dependency is implied by the set of FD, over R in which the left side is
key of R.
O
51. What is Domain-Key Normal Form?
A relation is said to be in DKNF if all constraints and dependencies that
should hold on the the constraint can be enforced by simply enforcing the
domain constraint and key constraint on the relation.
R
52. What are partial, alternate,, artificial, compound and natural key?
Partial Key:
ZE
It is a set of attributes that can uniquely identify weak entities and that are
related to same owner entity. It is sometime called as Discriminator.
Alternate Key:
All Candidate Keys excluding the Primary Key are known as Alternate
Keys.
Artificial Key:
If no obvious key, either stand alone or compound is available, then
the last resort is to simply create a key, by assigning a unique number to each record
or occurrence. Then this is known as developing an artificial key.
Compound Key:
If no single data element uniquely identifies occurrences within a
construct, then combining multiple elements to create a unique identifier for the
construct is known as creating a compound key.
Natural Key:
When one of the data elements stored within a construct is utilized as
the primary key, then it is called the natural key.
52. What is system catalog or catalog relation? How is better known as?
A RDBMS maintains a description of all the data that it contains, information
about every relation and index that it contains. This information is stored in a
collection of relations maintained by the system called metadata. It is also called data
dictionary.
E
52. What is join dependency and inclusion dependency?
Join Dependency:
N
A Join dependency is generalization of Multivalued
dependency.A JD {R1, R2, ..., Rn} is said to hold over a relation R if R1, R2, R3, ...,
Rn is a lossless-join decomposition of R . There is no set of sound and complete
O
inference rules for JD.
Inclusion Dependency:
An Inclusion Dependency is a statement of the form that some
columns of a relation are contained in other columns. A foreign key constraint is an
R
Once the DBMS informs the user that a transaction has successfully
completed, its effects should persist even if the system crashes before all its changes
are reflected on disk. This property is called durability.
E
52. Brief theory of Network, Hierarchical schemas and their properties
Network schema uses a graph data structure to organize records example for
such a database management system is CTCG while a hierarchical schema uses a tree
N
data structure example for such a system is IMS.
once for the parent query or it can be executed once for each row returned by the
parent query. If the subquery is executed for each row of the parent, this is called a
correlated subquery.
A correlated subquery can be easily identified if it contains any references to
the parent subquery columns in its WHERE clause. Columns from the subquery
cannot be referenced anywhere else in the parent query. The following example
demonstrates a non-correlated subquery.
E.g. Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER
Where CUST.CNUM = ORDER.CNUM)
52. What are the primitive operations common to all record management systems?
Addition, deletion and modification.
52. Name the buffer in which all the commands that are typed in are stored
‘Edit’ Buffer
E
I/O, Security, Language Processing, Process Control, Storage Management,
Logging and Recovery, Distribution Control, Transaction Control, Memory
Management, Lock Management
N
52. Which part of the RDBMS takes care of the data dictionary? How
Data dictionary is a set of tables and database objects that is stored in a special
O
area of the database and maintained exclusively by the kernel.
provides access to them, and maps the actual physical storage location.
52. Define SQL and state the differences between SQL and other conventional
programming Languages
SQL is a nonprocedural language that is designed specifically for data access
operations on normalized relational database structures. The primary difference
between SQL and other conventional programming languages is that SQL statements
specify what data operations should be performed rather than how to perform them.
52. Name the three major set of files on disk that compose a database in Oracle
There are three major sets of files on disk that compose a database. All the
files are binary. These are
Ø Database files
Ø Control files
Ø Redo logs
E
52. What are the four Oracle system processes that must always be up and running
for the database to be useable
The four Oracle system processes that must always be up and running for the
N
database to be useable include DBWR (Database Writer), LGWR (Log Writer), SMON
(System Monitor), and PMON (Process Monitor).
O
52. What are database files, control files and log files. How many of these files should
a database have at least? Why?
Database Files
The database files hold the actual data and are typically the largest in
R
size. Depending on their sizes, the tables (and other objects) for all the user accounts
can go in one database file—but that's not an ideal situation because it does not make
the database structure very flexible for controlling access to storage for different
ZE
users, putting the database on different disk drives, or backing up and restoring just
part of the database.
You must have at least one database file but usually, more than one
files are used. In terms of accessing and using the data in the tables and other objects,
the number (or location) of the files is immaterial.
The database files are fixed in size and never grow bigger than the size
at which they were created
Control Files
The control files and redo logs support the rest of the architecture. Any
database must have at least one control file, although you typically have more than
one to guard against loss. The control file records the name of the database, the date
and time it was created, the location of the database and redo logs, and the
synchronization information to ensure that all three sets of files are always in step.
Every time you add a new database or redo log file to the database, the information is
recorded in the control files.
Redo Logs
Any database must have at least two redo logs. These are the journals
for the database; the redo logs record all changes to the user objects or system objects.
If any type of failure occurs, the changes recorded in the redo logs can be used to
Technical Aptitude Questions Page 24
bring the database to a consistent state without losing any committed transactions. In
the case of non-data loss failure, Oracle can apply the information in the redo logs
automatically without intervention from the DBA.
The redo log files are fixed in size and never grow dynamically from
the size at which they were created.
E
52. What is Oracle Block? Can two Oracle Blocks have the same address?
Oracle "formats" the database files into a number of Oracle blocks when they
The block size should be a multiple of the operating system block size.
O
Regardless of the block size, the entire block is not available for holding data; Oracle
takes up some space to manage the contents of the block. This block header has a
minimum size, but it can grow.
These Oracle blocks are the smallest unit of storage. Increasing the Oracle
R
block size can improve performance, but it should be done only when the database is
first created.
Each Oracle block is numbered sequentially for each database file starting at
ZE
1. Two blocks can have the same block address if they are in different database files.
52. Name two utilities that Oracle provides, which are use for backup and recovery.
Along with the RDBMS software, Oracle provides two utilities that you can
use to back up and restore the database. These utilities are Export and Import.
The Export utility dumps the definitions and data for the specified part of the
database to an operating system binary file. The Import utility reads the file produced
by an export, recreates the definitions of objects, and inserts the data
If Export and Import are used as a means of backing up and recovering the
database, all the changes made to the database cannot be recovered since the export
52. What are stored-procedures? And what are the advantages of using them.
Stored procedures are database objects that perform a user defined operation.
A stored procedure can have a set of compound SQL statements. A stored procedure
executes the SQL commands and returns the result to the client. Stored procedures are
used to reduce network traffic.
52. How are exceptions handled in PL/SQL? Give some of the internal exceptions'
name
PL/SQL exception handling is a mechanism for dealing with run-time errors
encountered during procedure execution. Use of this mechanism enables execution to
continue if the error is not severe enough to cause procedure termination.
The exception handler must be defined within a subprogram specification.
Errors cause the program to raise an exception with a transfer of control to the
exception-handler block. After the exception handler executes, control returns to the
block in which the handler was defined. If there are no more executable statements in
E
the block, control returns to the caller.
User-Defined Exceptions
PL/SQL enables the user to define exception handlers in the
out_status_code := g_out_status_code;
out_msg := g_out_msg;
The following is an example of a subprogram exception:
ZE
EXCEPTION
when NO_DATA_FOUND then
g_out_status_code := 'FAIL';
RAISE ot_failure;
Within this exception is the RAISE statement that transfers control back to the
ot_failure exception handler. This technique of raising the exception is used to invoke
all user-defined exceptions.
System-Defined Exceptions
Exceptions internal to PL/SQL are raised automatically upon error.
NO_DATA_FOUND is a system-defined exception. Table below gives a complete
list of internal exceptions.
E
52. Spurious tuples may occur due to
i. Bad normalization
ii. Theta joins
iii. Updating tables from join
a) i & ii
c) i & iii
b) ii & iii
d) ii & iii
N
O
(a) i & iii because theta joins are joins made on keys that are not primary
keys.
R
C -> B
a) is in 1NF
b) is in 2NF
c) is in 3NF
d) is in BCNF
52. Select 'NORTH', CUSTOMER From CUST_DTLS Where REGION = 'N' Order
By
CUSTOMER Union Select 'EAST', CUSTOMER From CUST_DTLS Where
REGION = 'E' Order By CUSTOMER
The above is
a) Not an error
b) Error - the string in single quotes 'NORTH' and 'SOUTH'
c) Error - the string should be in double quotes
d) Error - ORDER BY clause
E
(d) Error - the ORDER BY clause. Since ORDER BY clause cannot be used
in UNIONS
state despite system failures and concurrent transaction execution proceeds without
conflicting.
52. What is cold backup and hot backup (in case of Oracle)?
Ø Cold Backup:
It is copying the three sets of files (database files, redo logs, and
control file) when the instance is shut down. This is a straight file copy, usually from
the disk directly to tape. You must shut down the instance to guarantee a consistent
copy.
If a cold backup is performed, the only option available in the
event of data file loss is restoring all the files from the latest backup. All work
performed on the database since the last backup is lost.
Ø Hot Backup:
Some sites (such as worldwide airline reservations systems) cannot
shut down the database while making a backup copy of the files. The cold backup is
E
not an available option.
So different means of backing up database must be used — the hot
backup. Issue a SQL command to indicate to Oracle, on a tablespace-by-tablespace
N
basis, that the files of the tablespace are to backed up. The users can continue to make
full use of the files, including making changes to the data. Once the user has indicated
that he/she wants to back up the tablespace files, he/she can use the operating system
O
to copy those files to the desired backup destination.
The database must be running in ARCHIVELOG mode for the hot
backup option.
If a data loss failure does occur, the lost database files can be
R
restored using the hot backup and the online and offline redo logs created since the
backup was done. The database is restored to the most consistent state without any
loss of committed transactions.
ZE
52. What are Armstrong rules? How do we say that they are complete and/or sound
The well-known inference rules for FDs
Ø Reflexive rule :
If Y is subset or equal to X then X Y.
Ø Augmentation rule:
If X Y then XZ YZ.
Ø Transitive rule:
If {X Y, Y Z} then X Z.
Ø Decomposition rule :
If X YZ then X Y.
Ø Union or Additive rule:
If {X Y, X Z} then X YZ.
Ø Pseudo Transitive rule :
If {X Y, WY Z} then WX Z.
Of these the first three are known as Amstrong Rules. They are sound because
it is enough if a set of FDs satisfy these three. They are called complete because using
these three rules we can generate the rest all inference rules.
E
52. What do you understand by dependency preservation?
Given a relation R and a set of FDs F, dependency preservation states
Proactive Update:
The updates that are applied to database before it becomes
effective in real world .
ZE
Retroactive Update:
The updates that are applied to database after it becomes
effective in real world .
Simulatneous Update:
The updates that are applied to database at the same time when
it becomes effective in real world .