Saturday, March 27, 2010

Windows 7 hardware requirements and tools: Study guide

QUESTION 1
A ________ places a new copy of Windows on a new drive partition, or onto an existing partition, that contains an earlier version of Windows. Your customers' files, settings and programs are not kept.

* Clean install
* Upgrade install
* Partial install
* Full install

QUESTION 2
Which of the following are not examined by the Windows 7 tool, Reliability Monitor?

* Application install/removals
* Driver install/removals
* Hardware failures
* Security logs

QUESTION 3
Which of the following is not a minimum Windows 7 hardware requirement?

* 1 GB RAM (32-bit)
* 2 GB RAM (64-bit)
* 8 GB available disk space (32-bit)
* Internet access


QUESTION 4
True or false: Windows 7 hardware requirements include kernel-mode drivers on an x64-bit version of Windows 7, and these drivers need to be digitally tested and signed.

* True
* False


QUESTION 5
If a disk pauses and thrashes each time you switch between running applications or documents, you need to __________.

* Change your BIOS settings
* Add more RAM
* Use Microsoft�s ReadyBoost
* Put a hard drive and an optical drive on the same channel


QUESTION 6
When Windows Activation Technology determines whether your customer's copy of Windows 7 needs reactivation, each hardware component is assigned a relative weight. Which is the correct order (from highest to lowest)?

* Motherboard (and CPU), hard drive, network interface card (NIC), graphics card and RAM
* RAM, graphics card, NIC, hard drive and motherboard (and CPU)
* Hard drive, NIC, graphics card, RAM and motherboard (and CPU)
* NIC, graphics card, RAM, motherboard (and CPU) and hard drive


QUESTION 7
When navigating the Windows 7 tool, Device Manager, which of the following is not an option under View in the menu bar?

* Arrange devices by type or connection
* View resources by type or connection
* Show hidden devices, such as a PS/2 keyboard, when a USB keyboard is present
* Add legacy hardware


QUESTION 8
True or false: The main difference between a standard Windows application and a command-line program is that it doesn't use a graphical display or pull-down menus.

* True
* False


QUESTION 9
What does the system called Self-Monitoring, Analysis and Reporting Technology (SMART) monitor?

* Hardware performance
* Application performance
* Signs of disk problems
* Virtual memory


QUESTION 10
The Microsoft Management Console is a graphical user interface-based component in Windows 7 that accommodates administrative tools called _______.

* Performance monitors
* Snap-ins
* Console taskpads
* Data sources

Tuesday, May 5, 2009

How to use string functions to make an SQL join

I am trying to make an inner join on columns in which a value is stored differently, for example, in one column it is application:username and in another it is username (not starting with application). Can you explain how to do this with an example?

This is accomplished by using string functions to extract the username from the application:username values.

Consider these sample tables:

Table1      Table2
username username
Tom asdf:Tom
Dick asdf:Dick
Harry asdf:Harry
qwerty:Tom
qwerty:Dick
qwerty:Harry
asdfTom
Tom
oops:

The SUBSTRING function, which extracts a substring from a string value, will be needed. But what if there are application values of different lengths? Then we need to take the substring starting at a different point in the username column, and this will vary depending on where the colon is.

This is a job for the POSITION function.

SELECT Table1.username
, Table2.username
FROM Table1
INNER
JOIN Table2
ON SUBSTRING(Table2.username
FROM POSITION(':' IN Table2.username) + 1
) = Table1.username

Here, the POSITION function finds the position of the colon in Table2.username. For asdf:username it's in position 5, and for qwerty:username it's in position 7. By adding 1, we begin extracting the substring at the next character. Since there is no FOR length parameter specified, the substring goes all the way to the end. The extracted substring is then compared to Table1.username to match rows.

If the Table2.username value does not contain a colon, however, then the POSITION function returns 0 as the position. By adding 1, we begin extracting the substring at the first character. Thus the entire value will be compared to Table1.username to match rows. This may or may not result in a match, depending on the data, but at least the query will run. We need to add 1, simply because a FROM 0 value for the SUBSTRING function will usually fail.

Another problem is if the Table2.username value contains a colon but nothing after it. Then the POSITION value will be equal to the length of the string, and the FROM value will be 1 greater than that, so the SUBSTRING function might fail again. To get around this, just tack an extra space onto the Table2.username value:

    ON SUBSTRING(Table2.username || ' '
FROM POSITION(':' IN Table2.username) + 1
) = Table1.username

If the colon is in the last position, then the SUBSTRING function will return the space. Of course, this probably won't match any Table1.username, so this is fairly safe. And luckily, trailing spaces do not make a difference when it comes to matching values, so the other rows will continue to join properly.