IT Questions and Answers :)

Monday, December 31, 2018

AES Encryption uses which cipher?

AES Encryption uses which cipher?

  • RC6
  • Serpent
  • Rijndael
  • Twofish 

 
AES Encryption uses which cipher?

EXPLANATION

AES (Advanced Encryption Standard) is a NIST standard for encryption using the Rijndael cipher.
The cipher selected for AES was determined through an open call for new algorithms in 1997. The finalists for selection were Rijndael, Serpent, Twofish, RC6, and MARS, with Rijndael being the winning algorithm.
Share:

Friday, December 14, 2018

What command would you use to create a row in SQL?

What command would you use to create a row in SQL?

  • INSERT
  • MAKE
  • ADD
  • CREATE 

 
What command would you use to create a row in SQL?

EXPLANATION

To create a row in a SQL database, you use the command INSERT.

If we want to insert a single row in a table emp.

Query:
insert into emp values(101,’hari’);

It will add a new row has employee id 101 and employee name ‘hari’ into th emp table.

Share:

In Windows, what do you get if you change the extension of an (unprotected) Excel file from .xlsx to .zip?

In Windows, what do you get if you change the extension of an (unprotected) Excel file from .xlsx to .zip?

  • A file that MS EXCEL cannot open
  • Nothing useful at all
  • A corrupt ZIP file
  • The original spreadsheet as a set of XML files within the ZIP 

In Windows, what do you get if you change the extension of an (unprotected) Excel file from .xlsx to .zip?

EXPLANATION

Since Office 2007 Microsoft has used Open XML to store non-password protected documents.  These are then combined into a single compressed file using
the  docx, xlsx, pptx, etc. extensions.   Even though the XML files are quite large, they compress very well.
Share:

Thursday, December 13, 2018

Which of the following is a security advantage of using NoSQL vs. SQL databases in a three-tier environment?

Which of the following is a security advantage of using NoSQL vs. SQL databases in a three-tier environment?

  • NoSQL databases are not vulnerable to SQL injection attacks.
  • NoSQL databases perform faster than SQL databases on the same hardware.
  • NoSQL databases encrypt sensitive information by default.
  • NoSQL databases are not vulnerable to XSRF attacks from the application server 

 
Which of the following is a security advantage of using NoSQL vs. SQL databases in a three-tier environment?

EXPLANATION

A NoSQL (originally referring to "non SQL" or "non relational")[1] database provides a mechanism for storage and retrieval 
of data that is modeled in means other than the tabular relations used in relational databases. Such databases have existed since the late 1960s, but did not obtain the "NoSQL" moniker until a surge of popularity in the early twenty-first century,[2] triggered by the needs of Web 2.0 companies such as Facebook, Google, and Amazon.com.[3][4][5] NoSQL databases are increasingly used in big data and real-time webapplications.[6] NoSQL systems are also sometimes called "Not only SQL" to emphasize that they may support SQL-like query languages.

SOURCE

https://en.wikipedia.org/wiki/NoSQL

Author Orginally copied from

http://webcache.googleusercontent.com/search?q=cache:KiyrP91akesJ:https://www.briefmenow.org/comptia/sql-databases-in-a-three-tier-environment-3/&hl=en&gl=us&strip=1&vwsrc=0



Share:

Thursday, December 6, 2018

What does the Transact-SQL server RAND function do?

What does the Transact-SQL server RAND function do?

  • Aggregates a subset of random numbers
  • Generate a random number
  • Requests a range of numbers from a subset
  • Selects an random number from subset 

 
What does the Transact-SQL server RAND function do?

EXPLANATION




 SQL Server: RAND Function
This SQL Server tutorial explains how to use the RAND function in SQL Server (Transact-SQL) with syntax and examples.

Description

In SQL Server (Transact-SQL), the RAND function can be used to return a random number or a random number within a range.

Syntax

The syntax for the RAND function in SQL Server (Transact-SQL) is:
RAND( [seed] )

Parameters or Arguments

seed
Optional. If specified, it will produce a repeatable sequence of random numbers each time that seed value is provided.

Note

  • The RAND function will return a value between 0 and 1 (not inclusive), so value > 0 and value < 1.
  • The RAND function will return a completely random number if no seed is provided.
  • The RAND function will return a repeatable sequence of random numbers each time a particular seed value is used.

Random Decimal Range

To create a random decimal number between two values (range), you can use the following formula:
SELECT RAND()*(b-a)+a;
Where a is the smallest number and b is the largest number that you want to generate a random number for.

SELECT RAND()*(25-10)+10;
The formula above would generate a random decimal number between 10 and 25, not inclusive.
TIP: This formula would generate a random decimal number that is > 10 and < 25 but it would never return exactly 10 or 25.

Random Integer Range

To create a random integer number between two values (range), you can use the following formula:
SELECT FLOOR(RAND()*(b-a+1))+a;
Where a is the smallest number and b is the largest number that you want to generate a random number for.
SELECT FLOOR(RAND()*(25-10+1))+10;
The formula above would generate a random integer number between 10 and 25, inclusive.
TIP: This formula would generate a random integer number that is >= 10 and <= 25.

Applies To

The RAND function can be used in the following versions of SQL Server (Transact-SQL):
  • SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005

Example of Random Number

Let's explore how to use the RAND function in SQL Server (Transact-SQL) to generate a random number between 0 and 1, not inclusive.
For example:
SELECT RAND();
Result:  0.143811355073783     (no seed value, so your answer will vary)

SELECT RAND(9);
Result:  0.713741056982989     (with seed value of 9)

SELECT RAND(-5);
Result:  0.713666525097956     (with seed value of -5)

Example of Random Decimal Range

Let's explore how to use the RAND function in SQL Server (Transact-SQL) to generate a random decimal number between two numbers (ie: range).
For example, the following would generate a random decimal value between 1 and 10, not inclusive (random number would be greater than 1 and less than 10):
SELECT RAND()*(10-1)+1;
Result:  5.09104269717813      (no seed value, so your answer will vary)

SELECT RAND(9)*(10-1)+1;
Result:  7.4236695128469       (with seed value of 9)

SELECT RAND(-5)*(10-1)+1;
Result:  7.42299872588161      (with seed value of -5)

Example of Random Integer Range

Let's explore how to use the RAND function in SQL Server (Transact-SQL) to generate a random integer number between two numbers (ie: range).
For example, the following would generate a random integer value between 10 and 20, inclusive:
SELECT FLOOR(RAND()*(20-10+1))+10;
Result:  19                   (no seed value, so your answer will vary)

SELECT FLOOR(RAND(9)*(20-10+1))+10;
Result:  17                   (with seed value of 9)

SELECT FLOOR(RAND(123456)*(20-10+1))+10;
Result:  10                   (with seed value of 123456)
 
Share:

Tuesday, December 4, 2018

What is the largest partition size supported by native DOS running FAT16?

What is the largest partition size supported by native DOS running FAT16?

  • 3GB
  • 2GB
  • 1GB
  • 512MB 
What is the largest partition size supported by native DOS running FAT16?

EXPLANATION

Due to the mathematical limitations of FAT16, without an overlay file or special driver the largest partition size is 2GB.The limit on partition size was dictated by the 8-bit signed count of
sectors per cluster, which originally had a maximum power-of-two value of 64. With the standard hard disk sector size of 512 bytes, this gives a maximum of 32 KiB cluster size, thereby fixing the "definitive" limit for the FAT16 partition size at 2 GiB for sector size 512.

SOURCE

https://en.wikipedia.org/wiki/File_Allocation_Table

Share:

Popular Posts