DBMS External Internal Question Bank
DBMS External Internal Question Bank
DBMS External Internal Question Bank
Define Database.
A prearranged collection of figures known as data is called database.
What is DBMS?
Database Management Systems (DBMS) are applications designed especially which enable user
interaction with other applications.
Data definition
Update
Retrieval
Administration
A data model determining fundamentally how data can be stored, manipulated and organised and
the structure of the database logically is called database model.
Oral Questions and Answers (DBMS LAB)
What is SQL?
Structured Query Language (SQL) being ANSI standard language updates database and commands
for accessing.
One-to-one: Single table having drawn relationship with another table having similar kind of
columns.
One-to-many: Two tables having primary and foreign key relation.
Many-to-many: Junction table having many tables related to many tables.
Define Normalization.
Organized data void of inconsistent dependency and redundancy within a database is called
normalization.
No duplicate entries
Saves storage space
Boasts the query performances.
Define Denormalization.
Boosting up database performance, adding of redundant data which in turn helps rid of complex
data is called denormalization.
They are:
CREATE:
ALTER:
DROP:
Define cursor.
A database object which helps in manipulating data row by row representing a result set is called
cursor.
They are:
Implicit cursor: Declared automatically as soon as the execution of SQL takes place without the
awareness of the user.
Explicit cursor: Defined by PL/ SQL which handles query in more than one row.
Define sub-query.
Both having B-tree structure, non-clustered index has data pointers enabling one table many non-
clustered indexes while clustered index is distinct for every table.
Functions which operate against a collection of values and returning single value is called
aggregate functions
Oral Questions and Answers (DBMS LAB)
Define Scalar functions.
Scalar function is depended on the argument given and returns sole value.
What restrictions can you apply when you are creating views?
A ‘correlated subquery’ is a sort of sub query but correlated subquery is reliant on another query
for a value that is returned. In case of execution, the sub query is executed first and then the
correlated query.
Storage and access of data from the central location in order to take some strategic decision is
called Data Warehousing. Enterprise management is used for managing the information whose
framework is known as Data Warehousing.
Joins help in explaining the relation between different tables. They also enable you to select data
with relation to data in another table.
INNER JOINs: Blank rows are left in the middle while more than equal to two tables are
joined.
OUTER JOINs: Divided into Left Outer Join and Right Outer Join. Blank rows are left at the
specified side by joining tables in other side.
Other joins are CROSS JOINs, NATURAL JOINs, EQUI JOIN and NON-EQUI JOIN.
Indexes help in improving the speed as well as the query performance of database. The procedure
of boosting the collection of indexes is named as Index hunting.
Oral Questions and Answers (DBMS LAB)
What is MySQL?
MySQL is an open source DBMS which is built, supported and distributed by MySQL AB (now
acquired by Oracle)
MySQL database server is reliable, fast and very easy to use. This software can be downloaded as
freeware and can be downloaded from the internet.
HEAP tables are present in memory and they are used for high speed storage on temporary
basis.
MySQL is open source software which is available at any time and has no cost involved.
MySQL is portable
GUI with command prompt.
Administration is supported using MySQL Query Browser
Oral Questions and Answers (DBMS LAB)
Difference between CHAR and VARCHAR?
SET
BLOB
ENUM
CHAR
TEXT
VARCHAR
PHP Driver
JDBC Driver
ODBC Driver
C WRAPPER
PYTHON Driver
PERL Driver
RUBY Driver
CAP11PHP Driver
Ado.net5.mxj
TIMESTAMP column is updated with Zero when the table is created. UPDATE
CURRENT_TIMESTAMP modifier updates the timestamp field to current time whenever there is a
change in other fields of the table.
Primary Key is also a candidate key. By common convention, candidate key can be designated as
primary and which can be used for any foreign key references.
Timestamp field gets the current timestamp whenever the row gets altered.
Oral Questions and Answers (DBMS LAB)
What happens when the column is set to AUTO INCREMENT and if you reach maximum
value in the table?
It stops incrementing. Any further inserts are going to produce an error, since the key has been
used already.
How can we find out which auto increment was assigned on Last insert?
LAST_INSERT_ID will return the last value assigned by Auto_increment and it is not required to
specify the table name.
NOW() command is used to show current year, month, date with hours, minutes and seconds
while CURRENT_DATE() shows the current year with month and date only.
The DELETE command is used to delete data from a table. It only deletes the rows of data from
the table while, truncate is very dangerous command and should be used carefully because it
deletes every row permanently from a table.
Oral Questions and Answers (DBMS LAB)
What is NoSQL?
NoSQL encompasses a wide variety of different database technologies that were developed in
response to a rise in the volume of data stored about users, objects and products. The frequency in
which this data is accessed, and performance and processing needs. Relational databases, on the
other hand, were not designed to cope with the scale and agility challenges that face modern
applications, nor were they built to take advantage of the cheap storage and processing power
available today.
Mongo-DB is a document database which provides high performance, high availability and easy
scalability.
MongoDB stores BSON (Binary Interchange and Structure Object Notation) objects in the
collection. The concatenation of the collection name and database name is called a namespace.
What is sharding in MongoDB?
The procedure of storing data records across multiple machines is referred as Sharding. It is a
MongoDB approach to meet the demands of data growth. It is the horizontal partition of data in a
database or search engine. Each partition is referred as shard or database shard.
A replica set is a group of mongo instances that host the same data set. In replica set, one node is
primary, and another is secondary. From primary to the secondary node all data replicates.
Across multiple servers, the process of synchronizing data is known as replication. It provides
redundancy and increase data availability with multiple copies of data on different database
server. Replication helps in protecting the database from the loss of a single server.
Oral Questions and Answers (DBMS LAB)
While creating Schema in MongoDB what are the points need to be taken in
consideration?
MongoDB database profiler shows performance characteristics of each operation against the
database. You can find queries using the profiler that are slower than they should be.
Yes, it is possible to move old files in the moveChunk directory, during normal shard balancing
operations these files are made as backups and can be deleted once the operations are done.
To do safe backups what is the feature in MongoDB that you can use?
Journaling is the feature in MongoDB that you can use to do safe backups.
Oral Questions and Answers (DBMS LAB)
Mention what is Objecld composed of?
Objectld is composed of
Timestamp
Client machine ID
Client process ID
3 byte incremented counter
To inspect a source code of a function, without any parentheses, the function must be invoked.
What is the command syntax that tells you whether you are on the master server or not?
And how many master does MongoDB allow?
Command syntax Db.isMaster() will tell you whether you are on the master server or not.
MongoDB allows only one master server, while couchDB allows multiple masters.
Mention the command syntax that is used to view Mongo is using the link?
The command syntax that is used to view mongo is using the link is
db._adminCommand(“connPoolStats.”)
Indexes are special structures in MongoDB, which stores a small portion of the data set in an easy
to traverse form. Ordered by the value of the field specified in the index, the index stores the value
of a specific field or set of fields.
For storing and retrieving large files such as images, video files and audio files GridFS is used. By
default, it uses two files fs.files and fs.chunks to store the file’s metadata and the chunks.