Some Important Ques
Some Important Ques
Some Important Ques
Define RDBMS.
Answer: SQL statements are basically divided into three categories, DDL, DML, and DCL.
Data Definition Language (DDL) commands are used to define the structure that holds the
data. These commands are auto-committed i.e. changes done by the DDL commands on the
database are saved permanently.
Data Manipulation Language (DML) commands are used to manipulate the data of the
database. These commands are not auto-committed and can be rolled back.
Data Control Language (DCL) commands are used to control the visibility of the data in the
database like revoke access permission for using data in the database.
What is Relationship?
It is an association among two or more entities.
Normalization is the process of removing redundant data from the database by splitting the table in a
well-defined manner in order to maintain data integrity. This process saves much of the storage space.
De-normalization is the process of adding up redundant data on the table in order to speed up the
complex queries and thus achieve better performance.
The attributes of a table is said to be dependent on each other when an attribute of a table uniquely
identifies another attribute of the same table.For example: Suppose we have a student table with
attributes: Stu_Id, Stu_Name, Stu_Age. Here Stu_Id attribute uniquely identifies the Stu_Name
attribute of student table because if we know the student id we can tell the student name associated
with it. This is known as functional dependency and can be written as Stu_Id->Stu_Name or in
words we can say Stu_Name is functionally dependent on Stu_Id.
Formally: If column A of a table uniquely identifies the column B of same table then it can
represented as A->B (Attribute B is functionally dependent on attribute A)
In the context of memory management, what are placement and replacement algorithms?
Placement algorithms determine where in available real-memory to load a program. Common
methods are first-fit, next-fit, best-fit. Replacement algorithms are used when memory is full, and
one process (or part of a process) needs to be swapped out to accommodate a new program. The
replacement algorithm determines which are the partitions to be swapped out.
Week entity :
The entity sets which do not have
ave su
sufficient attributes to form a primary key are known
nown as weak entity
sets and the entity sets which have a primary key are known as strong entity sets.
As the weak entities do not have aany primary key, they cannot be identified on n their
thei own, so they
depend on some other entity ntity (known as owner entity). The weak entities entitie have total
participationconstraint (existence
nce de
dependency) in its identifying relationship with owner identity.
Weak entity types have partiall keys. Partial Keys are set of attributes with the help
p of which
w the tuples
of the weak entities can be distingui
tinguished and identified.
Weak entities are representedd with double rectangular box in the ER Diagram and the identifying
relationships are represented with ddouble diamond. Partial Key attributes are represent
resented with dotted
lines.
To install 64 bit version, you need a processor that supports 64 bit version of OS.
If you have a large amount of RAM in your machine (like 4 GB or more), only then you can
really see the difference between working of 32-bit and 64-bit versions of Windows.
64-bit can take care of large amounts of RAM or physical memory more effectively than 32-
bit.
Using 64-bit can help you a lot in multi-tasking. you can easily switch between various
applications without any problems or your windows hanging.
If you’re a gamer who only plays High graphical games like Modern Warfare, GTA V, or use
high-end softwares like Photoshop or CAD which takes a lot of memory, then you should go
for 64-bit Operating Systems. Since it makes multi-tasking with big softwares easy and
efficient for users.
You cannot change your OS from 32 bit to 64 bit because they're built on different architecture. You
need to re-install a 64 bit version of the OS. 32 bit is also known as x86 or x32. To download 64 bit
version look for x64.
A disc drive has an average seek time of 10ms, 32 sectors on each track and 512 bytes per sector.
If the average time to read 8KBytes of continuously stored data is 20ms, what is the rotational
speed of the disc drive?
Rotational Speed: Reciprocal of time taken on an average to rotate to a particular data entry.
8192 bytes = 8192 / 512 sectors = 16 sectors
time to make half rotation (16 sectors) = 20 ms.
=> Rotational Speed = 1/(20 * 10 ^ -3) = 50 rps = 3000 rpm
Or
8192 bytes / 512 bytes per sector = 16 sectors
3000 rpm / 60 sec = 50 rps
50 rps * 32 sectors = 1600 sectors / sec
time to read 16 sectors is 16 / 1600 = 0.01 sec
0.01 sec to ms = 10
adding 10 ms for seek = 20 ms
answer: 3000 rpm
What are the differences among short-term, medium-term, and long-term scheduling?
Long-Term Scheduler
A long-term scheduler determines which programs are admitted to the system for processing. It selects
processes from the queue and loads them into memory for execution. Process loads into the memory
for CPU scheduling.The primary objective of the job scheduler is to provide a balanced mix of jobs,
such as I/O bound and processor bound. It also controls the degree of multiprogramming.It is also
called a job scheduler
Short-Term Scheduler
Its main objective is to increase system performance in accordance with the chosen set of criteria. It is
the change of ready state to running state of the process. CPU scheduler selects a process among the
processes that are ready to execute and allocates CPU to one of them.Short-term schedulers, also
known as dispatchers, make the decision of which process to execute next. Short-term schedulers are
faster than long-term schedulers.It is also called as CPU scheduler.
Medium-Term Scheduler
It removes the processes from the memory. It reduces the degree of multiprogramming. The medium-
term scheduler is in-charge of handling the swapped out-processes.Medium-term scheduling is a part
of swapping
What is SCSI?
SCSI - Small computer systems interface is a type of interface used for computer components such as
hard drives, optical drives, scanners and tape drives. It is a competing technology to standard IDE
(Integrated Drive Electronics).
Applications:
Graph is a data structure which is used extensively in our real-life.
Social Network: Each user is represented as a node and all their activities, suggestion and
friend list are represented as an edge between the nodes.
Google Maps: Various locations are represented as vertices or nodes and the roads are
represented as edges and graph theory is used to find shortest path between two nodes.
Recommendations on e-commerce websites: The “Recommendations for you” section on
various e-commerce websites uses graph theory to recommend items of similar type to user’s
choice.
Graph theory is also used to study molecules in chemistry and physics
More on graphs:
Characteristics of graphs:
Adjacent node: A node ‘v’ is said to be adjacent node of node ‘u’ if and only if there exists an
edge between ‘u’ and ‘v’.
Degree of a node: In an undirected graph the number of nodes incident on a node is the degree
of the node.
In case of directed graph ,Indegree of the node is the number of arriving edges to a node.
Outdegree of the node is the number of departing edges to a node.
Path: A path of length ‘n’ from node ‘u’ to node ‘v’ is defined as sequence of n+1 nodes.
P(u,v)=(v0,v1,v2,v3…….vn)
A path is simple if all the nodes are distinct,exception is source and destination are same.
Isolated node: A node with degree 0 is known as isolated node.Isolated node can be found by
Breadth first search (BFS). It finds its application in LAN network in finding whether a
system is connected or not.
Directed graph:
A graph in which the direction of the edge is defined to a particular node is a directed graph.
Directed Acyclic graph: It is a directed graph with no cycle.For a vertex ‘v’ in DAG there is
no directed edge starting and ending with vertex ‘v’.
a) Application: Critical game analysis, expression tree evaluation,game evaluation.
Tree: A tree is just a restricted form of graph.That is, it is a DAG with a restriction that a
child can have only one parent.
Undirected graph:
A graph in which the direction of the edge is not defined.So if an edge exists between node ‘u’
and ‘v’,then there is a path from node ‘u’ to ‘v’ and vice versa.
Connected graph: A graph is connected when there is a path between every pair of vertices.In a
connected graph there is no unreachable node.
Complete graph: A graph in which each pair of graph vertices is connected by an edge.In other
words,every node ‘u’ is adjacent to every other node ‘v’ in graph ‘G’.A complete graph would
have n(n-1)/2 edges.See below for proof.
Biconnected graph: A connected graph which cannot be broken down into any further pieces by
deletion of any vertex.It is a graph with no articulation point.