IT Questions and Answers :)

Wednesday, August 7, 2019

Which of the following is true in a DBMS that uses encryption?

Which of the following is true in a DBMS that uses encryption?

  • Special integrity constraint rules apply
  • Data is stored as plain text
  • Data is stored as cipher text
  • Data is stored off site 
Which of the following is true in a DBMS that uses encryption?

EXPLANATION

Database encryption uses an algorithm to transform data stored in a database into "cipher text" 
that is incomprehensible without first being decrypted. You encrypt the data using various algorithms.
Share:

Tuesday, July 30, 2019

In a database, cardinality refers to:

In a database, cardinality refers to:

  • Which command gets executed first
  • How many columns a table contains
  • How many rows a table contains
  • How many unique values are in a column of a table 
 
In a database, cardinality refers to:
 

EXPLANATION

In databases, cardinality refers to the how many unique data values each column contains. High cardinality columns contain unique data values. Low cardinality columns contain few unique values.

SOURCE

http://www.sqlservercentral.com/blogs/matthew-mcgiffen-dba/2017/06/20/statistics-and-cardinality-estimation/
Share:

Friday, June 21, 2019

What is SAP HANA?

What is SAP HANA?

  • An in SSD Database Management System
  • An in Disk Database Management System
  • An in Memory Database Management System
  • An in Cloud Database Management System
What is SAP HANA?

EXPLANATION

SAP HANA is an in-memory, column-oriented, relational database management system developed and marketed by SAP SE.
Its primary function as database server is to store and retrieve data as requested by the applications. In addition, it performs advanced analytics (predictive analytics, spatial data processing, text analytics, text search, streaming analytics, graph data processing) and includes ETL capabilities as well as an application server.

SOURCE

https://en.wikipedia.org/wiki/SAP_HANA
Share:

Thursday, June 6, 2019

Which of the following is part of a database that holds only one piece of data?

Which of the following is part of a database that holds only one piece of data?

  • Field
  • Report
  • File
  • Record 
Which of the following is part of a database that holds only one piece of data?

EXPLANATION

In a database table, a field is a data structure for a single piece of data. Fields are organized into records, which contain all the information within the table relevant to a specific entity.


Field The basic unit of database tables that holds one piece of data, such as first name, last name etc.
Share:

Tuesday, April 9, 2019

When installing Oracle Real Application Clusters on Linux/Unix, what is the default port number and protocol?

When installing Oracle Real Application Clusters on Linux/Unix, what is the default port number and protocol?

  • 11000/TCP
  • 61000/TCP
  • Dynamic/UDP
  • 1521/TCP 

 
When installing Oracle Real Application Clusters on Linux/Unix, what is the default port number and protocol?

EXPLANATION

Oracle Real Application Clusters (UNIX) uses a dynamic UDP port number that is assigned automatically during installation.
Oracle Real Application Clusters (Cluster Interconnect: Windows only) uses port 11000/TCP
Oracle Real Application Clusters (Local Host: Windows only) uses port 61000/TCP
Oracle SQL*Net Listener uses port 1521/TCP for Oracle client connections to the database over Oracle's SQL*Net protocol.

SOURCE

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/rilin/port-numbers-and-protocols-of-oracle-components.html#GUID-D168F70C-BECE-4F9A-B616-D9103A35F1FF
Share:

Friday, April 5, 2019

Which of the following is a step used to harden a database application?


Which of the following is a step used to harden a database application?

Disabling default accounts and changing passwords
Enabling all services
Disabling SQL
Disabling stored procedures 
Which of the following is a step used to harden a database application?

EXPLANATION

Application hardening, which includes hardening database applications, consists of disabling default accounts and changing default passwords.
Application hardening includes disabling unnecessary services, not enabling all of them. You shouldn't disable SQL in a database application. Stored procedures increase performance, which can help prevent SQL injection attacks and shouldn't be disabled.
Share:

Friday, March 1, 2019

Which statement is not true about SQL Injection?

Which statement is not true about SQL Injection?

  • Boosts database performace.
  • The placement of malicious code in SQL statements
  • A code injection technique that might destroy your database.
  • One of the most common web hacking techniques. 

 
Which statement is not true about SQL Injection?

EXPLANATION

SQL Injection does not boost database performance.

SQL injection is the placement of malicious code in SQL
statements, via web page input. SQL in Web Pages SQL injection usually occurs when you ask a user for input, like their username/userid, and instead of a name/id, the user gives you an SQL statement that you will unknowingly run on your database.

SOURCE

https://www.w3schools.com/sql/sql_injection.asp
Share:

Friday, February 15, 2019

What type of user mode is the default in SQL Server?

What type of user mode is the default in SQL Server?

  • MULTI_USER
  • RESTRICTED_USER
  • ROOT_USER
  • SINGLE_USER 

 
What type of user mode is the default in SQL Server?

EXPLANATION

Following are the three possible different user access modes in Sql server:
i) SINGLE_USER Database Access Mode
In SINGLE_USER access mode at any given point of time only one user can access the database. The user can be any user who has access to the database.
Note: Before setting the database to Single user mode make sure to STOP the sql server agent or see if any AUTO_UPDATE_STATISTICS_ASYNC option is set to OFF. Otherwise the Sql Server Agent or the background thread which updates the stats may utilize the only allowed connection.
ii) RESTRICTED_USER Access Mode

In RESTRICTED_USER access mode only the users who have db_owner or db_creator permission can access. Users who belong to the sysadmin fixed server role can also access the database which is in RESTRICTED_USER access mode.
At any given point of time ZERO or Many user can access the database as long as they have specified permission as mentioned previously.
iii) MULTI_USER Access Mode
This is the default database user access mode. In this database user access mode any user who have permission to access the database can access the database.

Share:

Thursday, January 10, 2019

Database concurrency control is important for which of the following scenarios?

Database concurrency control is important for which of the following scenarios?

  • Maintaining read integrity with multiple users
  • Maintaining integrity in a single-user environment
  • Maintaining integrity in a multi-user environment
  • Maintaining read integrity in a 1-user environment 

 
Database concurrency control is important for which of the following scenarios?

EXPLANATION

Concurrency control is a process which allows multiple people to access a shared resource, which in this case is a database. There are several different strategies when it comes to configuring your database to prevent data corruption when multiple users are accessing it at the same time that are all called concurrency controls.


Aaron W Originally Copied From

Concurrency control is important for which of the following reasons?
A.To ensure data integrity when updates occur to the database in a multiuser environment
B.To ensure data integrity when updates occur to the database in a single-user environment
C.To ensure data integrity while reading data occurs to the database in a multiuser environment
D.To ensure data integrity while reading data occurs to the database in a single-user environment


Share:

Monday, November 26, 2018

In SQL, what is the effect of the TRUNCATE TABLE statement?

In SQL, what is the effect of the TRUNCATE TABLE statement?

  • To delete all of the rows contained within a table
  • To drop all of the tables in a database
  • To shorten all textual values in a column to a specified number of characters
  • To drop all of the columns defined on a table 

 
In SQL, what is the effect of the TRUNCATE TABLE statement?

EXPLANATION

TRUNCATE TABLE table-name;
 
TRUNCATE removes all of the rows from the specified table without logging the individual row deletions, without scanning the table, and makes freed disk space available to the operating system immediately, without requiring a subsequent VACUUM operation.
TRUNCATE TABLE is similar to a DELETE statement with no WHERE clause, which also removes all of the rows from a table; however, TRUNCATE is faster and uses fewer resources. TRUNCATE is most useful when working with very large tables where an unqualified DELETE could adversely affect database performance.

Share:

Tuesday, September 25, 2018

In sql, which of the following is applicable to the CHAR datatype?

In sql, which of the following is applicable to the CHAR datatype?

  • CHAR stores alphanumeric characters of fixed size
  • Stores alphanumeric characters of variable length
  • to create scripts containing infinite characters
  • Type as many characters as you want 

 
In sql, which of the following is applicable to the CHAR datatype?

EXPLANATION

The only difference between CHAR and VARCHAR2 is that CHAR stores fixed-length alphanumeric characters, between 1 and 2000 bytes or characters. If you are stored in the JUNIOR surname in a CHAR (50) column, a column will contain a JUNIOR string + 44 whitespaces that are automatically added to the total column volume.

SOURCE

http://www.fabioprado.net/2011/08/qual-tipo-de-dado-devo-usar-char.html

Share:

Saturday, April 28, 2018

What is DCL used for in SQL?


What is DCL used for in SQL?

  • Monitor database transactions
  • Solving deadlock situations
  • Control access to data stored in a database
  • Control database size and archiving schedule 

 

EXPLANATION

A data control language (DCL) is a syntax similar to a computer programming language used to control access to data stored in a database (Authorization). In particular, it is a component of Structured Query Language (SQL).
Share:

Tuesday, March 20, 2018

If you want to cluster MySQL databases, what software do you use?

If you want to cluster MySQL databases, what software do you use?

  • MySQL Cluster
  • Apache Hadoop
  • Kubernetes
  • Beowulf 
If you want to cluster MySQL databases, what software do you use?

 EXPLANATION

MySQL Cluster provides shared-nothing clustering and auto-sharding for the MySQL database management system. It is designed to provide high availability and high throughput with low latency, while allowing for near linear scalability.

Share:

Friday, February 23, 2018

CRUD is create, read, update and delete. How can we interpret in sql commands?

CRUD is create, read, update and delete. How can we interpret in sql commands?

  • Create, Read, Upgrade and Delete;
  • Create, Read, Update and Delete;
  • Insert, Select, Upgrade and Delet;
  • Insert, Select, Update and Delete; 

 
CRUD is create, read, update and delete. How can we interpret in sql commands?

EXPLANATION

This procedure performed using SQL is known as CRUD - Create, Read, Update and Delete which is nothing more than the composition of the basic operations that an application performs in a database, creating, reading, updating and deleting data. See the abbreviation CRUD mapped below:

Create -> INSERT;

Read -> SELECT;

Update -> UPDATE;

Delete -> DELETE.

SOURCE

https://www.sqlshack.com/creating-using-crud-stored-procedures/

Share:

Friday, December 22, 2017

If you want to create a new login on SQL Server, what is the proper syntax?

If you want to create a new login on SQL Server, what is the proper syntax?

  • CREATE LOGIN login_id WITH PASSWORD = password
  • CREATE LOGIN login_id WITH USE = password
  • CREATE LOGIN login_id USE = password
  • USE LOGIN login_id WITH PASSWORD = password 

 
If you want to create a new login on SQL Server, what is the proper syntax?

EXPLANATION

Somebody on the Microsoft team decided that this syntax – create a login with this password – made sense. Even if it's arbitrary, you can't say it isn't intuitive.
https://msdn.microsoft.com/en-us/library/ms189751.aspx
Share:

Tuesday, November 28, 2017

How do you delete a login on SQL Server?

How do you delete a login on SQL Server?

  • DISABLE LOGIN login_name
  • DELETE LOGIN login_name
  • A login cannot be deleted but only disabled
  • DROP LOGIN login_name

How do you delete a login on SQL Server?

EXPLANATION

In order to delete a login on SQL Server, you write "DROP LOGIN login_name."
Share:

Thursday, November 23, 2017

Which of the following NoSQL databases is considered a document database?

Which of the following NoSQL databases is considered a document database?

  • Cassandra
  • Druid
  • MongoDB
  • HBase 

 
Which of the following NoSQL databases is considered a document database?

EXPLANATION

A NoSQL (originally referring to "non SQL" or "non relational") database provides a mechanism for storing and retrieving data which is modeled in means other than the tabular relations used in relational databases. MongoDB is document-oriented database, or document store, designed for storing, retrieving, and managing semi-structured data.. Cassandra, Druid, and HBase are column databases, a NoSQL object of the lowest level in a keyspace. It is a tuple consisting of three elements: unique name, value, and timestamp.

Share:

Tuesday, November 21, 2017

Which SQL command consults and retrieves information inside of a database?

Which SQL command consults and retrieves information inside of a database?

  • QUERY
  • CONSULT
  • SELECT
  • LOOK 
Which SQL command consults and retrieves information inside of a database?

 EXPLANATION

In order to consult and retrieve some information (or selecting certain information) from a database, doesn't matter which brand, all of them rely on the ANSI SQL standard, whose code is SELECT (INFORMATION) FROM (TABLE) as a usual command.
The actual SELECT may include other parameters but in its base form, that's essentially it.
http://www.w3schools.com/sql/sql_select.asp

Share:

Popular Posts