Thursday, May 23, 2013

SQL Data Types

Here’s a list of all the formal data types that ISO/IEC standard SQL recognizes. In addition to these, you may define additional data types that are derived from these.
Exact Numerics:
  • INTEGER
  • SMALLINT
  • BIGINT
  • NUMERIC
  • DECIMAL
Approximate Numerics:
  • REAL
  • DOUBLE PRECISION
  • FLOAT
Binary Strings:
  • BINARY
  • BINARY VARYING
  • BINARY LARGE OBJECT
Boolean:
  • BOOLEAN
Character Strings:
  • CHARACTER
  • CHARACTER VARYING (VARCHAR)
  • CHARACTER LARGE OBJECT
  • NATIONAL CHARACTER
  • NATIONAL CHARACTER VARYING
  • NATIONAL CHARACTER LARGE OBJECT
Datetimes:
  • DATE
  • TIME WITHOUT TIMEZONE
  • TIMESTAMP WITHOUT TIMEZONE
  • TIME WITH TIMEZONE
  • TIMESTAMP WITH TIMEZONE
Intervals:
  • INTERVAL DAY
  • INTERVAL YEAR
Collection Types:
  • ARRAY
  • MULTISET
Other Types:
  • ROW
  • XML

How to Remove Unwanted Objects in Your Digital Photos

You can easily remove a piece of content (an object, background, or unlikable person) from a digital photo by using your image-editing program. You can replace that removed piece, and no one can even tell that you removed anything. To get rid of something in a digital picture
1

Select the unwanted element with a selection tool, as shown in this figure.

Don’t worry about getting a little of the surrounding image, as long as it doesn’t remove someone else’s arm or the side of a face.
2

Press Delete to get rid of the selected element.

The background layer or any other underlying layer’s content now shows through the hole, like in this figure.
3

Fill the hole with other content.

You can copy content from elsewhere and paste it onto the hole or use the Clone tool to fill in the hole with sampled content from elsewhere in the image, as this figure shows.
If you want to remove a person from a photo but he or she is partially blocking other photo elements, consider bringing someone in from another picture and putting him or her in place of the person you’re deleting.

Securing Your Access 2003 Database as an MDE File

If you make an Access 2003 database for other people — especially people who may be a teeny bit clueless about Access — you may want to lock up your database to prevent other users from making changes that may break it. You can add security in the form of user names and passwords, but a simpler option is to turn your database from an MDB file to an MDE file.
An MDE file is the same as a regular Access MDB database file, with the following changes:
  • All VBA procedures are compiled — converted from human-readable code (more or less readable, anyway) to a format that only the computer understands. This change prevents a database user from reading or changing your VBA code.
  • No one can create forms or reports or modify the existing ones (you can't even open them in Design view). You can't import any, either.
Be sure to keep a copy of your original MDB file! If you need to make changes to your VBA code, forms, or reports (or create new ones), you need to use the MDB file, not the MDE file. MDE files are most commonly used for the front-end database when you split an application into two databases (front end and back end).

Creating an MDE file

Saving your MDB file as an MDE file is easy. Follow these steps:
1. Make sure your database is in Access 2002/2003 file format by opening the database.
Take a look at the title bar of the Database window. (Press F11 if it's not visible.) If the title bar says "(Access 2000 file format)" then you need to convert it to the latest file format.
2. Choose Tools --> Database Utilities --> Make MDE File.
Access closes the database to do the conversion. Then you see the Save MDE As dialog box.
3. Specify the folder and file name for the file and click the Save button.
Access creates the new MDE file while leaving the original MDB file untouched. Then the new MDE file opens.
If Access runs into a problem while making the MDE file, a message appears with a Show Help button. Click the button to find out what's wrong.

Making updates later

Sooner or later, you are going to want to make a new report or fix an annoying typo in a form. You have to go back to your MDB file to make these kinds of changes, because you can't make changes in an MDE file.
If the MDE file is a front-end file, with no data stored in it, you can just make your changes to the original MDB file and resave it as an MDE file. Because all your data lives in the back-end database, you're all set.
However, if your MDE file contains tables full of valuable information, you can't just abandon it. If you use the MDE file to do data entry and editing, that file contains your up-to-date tables. The original MDB file has editable forms, reports, and VBA code, but doesn't have the latest version of the data stored in your tables. Not a problem.
Follow these steps to update your MDE file:
1. Rename your MDE file as a backup file.
For example, add today's date to the end of the file name (right before the .mde part). You're about to create a new MDE file, but you don't want to lose the data in this file.
2. Open the original MDB file and make any changes to contain the forms, reports, and VBA code that you want.
If you plan to make drastic changes, make a backup copy of the MDB first.
3. Choose Tools --> Database Utilities --> Make MDE File and save it as an MDE file with the name that your MDE file originally had.
Now you have an updated MDE file with new, improved forms, reports, and VBA procedures, but with old data. You also have an updated MDB file with your new, improved forms, reports, and VBA code (but out-of-date tables).
4. Delete all the tables from this new MDE file.
In the Database window, click the Tables button in the Objects list, click each table in the list that appears in the right pane and then press the Delete key for each table. You need to confirm each deletion by clicking the Yes button. Deleting tables sounds dangerous, but remember you have all these tables stored safely in your old MDE file.
5. Import the tables from the old MDE file to the new one.
Choose File --> Get External Data --> Import and choose the name you gave your old MDE file in Step 1.
You see the Import Objects dialog box, with tabs for Tables, Queries, Forms, Reports, and other objects.
6. Click the Select All button with the Tables tab selected and then click OK.
Access imports your tables from the original MDE to the new MDE files, replacing the older data in the tables.
7. Import any queries or macros in the old MDE database that you created or changed.
Repeat Steps 5 and 6, but use the Queries and Macros tabs on the Import Objects dialog box to import whatever has changed.
If you are going to do this often, consider splitting your table into a front end and a back end. With a split database, you don't have to re-import your updated tables: You can just leave them in the unchanged back-end database.

How to Draw a Table Line by Line in Word 2007

The Draw Table command lets you draw complicated tables in your Word 2007 documents by using a simple set of drawing tools. This command is ideal for creating tables that aren’t a simple grid of rows and columns.
1

Select the Insert tab, click the Insert Table button in the Tables group, and then choose the Draw Table command.

The cursor changes to a small pencil.
2

Draw the overall shape of the table by dragging the pencil pointer to create a rectangular boundary.

When you release the mouse button, a table with a single cell is created. In addition, the Ribbon displays the Design tab under Table Tools.
3

Carve the table into smaller cells.

For example, to split the table into two rows, point the cursor somewhere along the left edge of the table and then click and drag a line across the table to the right edge. When you release the mouse button, the table splits into two rows.
You can use this technique to continue carving up the table into smaller cells.
4

Use the Line Style and Line Weight drop-down controls to change the style or size of lines in the table.

These controls are the top and middle buttons on the left side of the Draw Borders group, located on the Design tab under Table Tools. You can change the style of a line you’ve already drawn by tracing over the line with a new style.
5

If you make a mistake, click the Eraser button and erase the mistaken line segment.

The Eraser button is in the Draw Borders group and looks like a table with an eraser in the corner. Click the Draw Table button if you want to draw additional segments after using the Eraser tool.
6

When you’re done, click anywhere outside of the table.

Share a Printer on Your Network

Because many households or offices have several computers but only one printer, you need to share the printer on your network. To let everyone on the network print on that printer, share it by following these steps on the Vista computer connected to the printer:

1Click the Start menu, choose Network, and click the Network and Sharing Center button along the top.

2The Network and Sharing Center window appears

Turn on Printer Sharing and click Apply.

3Look in the Printer Sharing category and click the Off button to reveal the menu. When the menu drops down, choose Turn On Printer Sharing and click Apply to share that printer with the network.
Now, tell your other networked PC (or PCs) about your newly shared printer by following these steps:

Click the Start menu, choose Control Panel, and select Printers from the Hardware and Sound category.

4The Printers window lists icons for any installed printers

Click the Add a Printer button.

5The Add Printer window appears

Choose Add a Network, Wireless, or Bluetooth Printer and click Next.

6Your PC glances around the network for the other PCs’ shared printer. When it finds it, click its name and click Next to install it. If it doesn’t find it, move to Step 4.

Choose The Printer That I Want Isn’t Listed and then click Browse to go to the shared printer.

7Clicking the Browse button fetches a list of your networked PCs. Double-click the PC with the attached printer, and Vista lists the printer’s name.

Double-click the shared printer’s icon and click Next.

Vista finally connects to your networked printer. You may also need to install the printer’s software on your PC before it can print to the networked printer.

How to Access Another Computer's Disk Drives from Your Laptop

You can use your laptop to access another computer's disk drives over a network. To be more specific, however, you don't really access the entire disk drive. No, only specific folders on the drive are up for sharing. Even then, your access may be restricted by password, or you can only read, and not write or modify, any files in that folder.
No matter what, if a computer user shares a folder on the network, that folder shows up as available for your laptop to use. Choose Control Panel from the Start menu, and then choose either Network Center (Vista) or Network Connections (XP).
image0.jpg In Windows Vista, open a computer icon in the Network window, shown above, to see whether any folders or disk drives are available.
image1.jpg In Windows XP, shared resources are listed directly in the My Network Places window, as shown above.
To access a specific folder, double-click to open it, just as you would open any folder on your own hard drive. The contents of that folder are displayed on the screen, just as though it were a folder on your laptop's hard drive. Remember that the folder isn’t on your hard drive; it's a folder elsewhere on the network.
If the folder is password-protected, you're asked to provide a password for access to the folder.
After the network folder is open, you can access files in the folder just as though they were on your own laptop. Note that some folders can be shared as read-only, in which case the files and folders cannot be renamed or deleted or their contents modified.
Remember to practice polite network etiquette and close a network folder when you’re done using it. If you forget and don't close the folder, a connection still exists between your laptop and the computer sharing that folder. If so, an error message may appear if the network connection goes down or the other computer disconnects from the network.
 dummies.com

Understanding WEP Weaknesses

Security researchers have discovered security problems that let malicious users compromise the security of WLANs (wireless local area network) that use WEP (Wired Equivalent Privacy) — these, for instance:
  • Passive attacks to decrypt traffic: These are based on statistical analysis.
  • Active attacks to inject new traffic from unauthorized mobile stations: These are based on known plaintext.
  • Active attacks to decrypt traffic: These are based on tricking the access point.
  • Dictionary-building attacks: These are possible after analyzing enough traffic on a busy network.
The biggest problem with WEP is when the installer doesn't enable it in the first place. Even bad security is generally better than no security.
When people do use WEP, they forget to change their keys periodically. Having many clients in a wireless network — potentially sharing the identical key for long periods of time — is a well-known security vulnerability. If you keep your key long enough, someone can grab all the frames he needs to crack it.
Can't blame most access-point administrators for not changing keys — after all, the WEP protocol doesn't offer any key management provisions. But the situation is dangerous: When someone in your organization loses a laptop for any reason, the key could become compromised — along with all the other computers sharing the key. So it's worth repeating . . .
Shared keys can compromise a wireless network. As the number of people sharing the key grows, so does the security risk. A fundamental tenet of cryptography is that the security of a system is largely dependent on the secrecy of the keys. Expose the keys and you expose the text. Share the key, and a cracker only has to crack it once. Moreover, when every station uses the same key, an eavesdropper has ready access to a large amount of traffic for analytic attacks.
As if key management problems weren't enough, you have other problems with the WEP algorithm. Check out these bugbears in the WEP initialization vector:
  • The IV is too small and in cleartext. It's a 24-bit field sent in the cleartext portion of a message. This 24-bit string, used to initialize the key stream generated by the RC4 algorithm, is a relatively small field when used for cryptographic purposes.
  • The IV is static. Reuse of the same IV produces identical key streams for the protection of data, and because the IV is short, it guarantees that those streams will repeat after a relatively short time (between 5 and 7 hours) on a busy network.
  • The IV makes the key stream vulnerable. The 802.11 standard does not specify how the IVs are set or changed, and individual wireless adapters from the same vendor may all generate the same IV sequences, or some wireless adapters may possibly use a constant IV. As a result, hackers can record network traffic, determine the key stream, and use it to decrypt the ciphertext.
  • The IV is a part of the RC4 encryption key. The fact that an eavesdropper knows 24-bits of every packet key, combined with a weakness in the RC4 key schedule, leads to a successful analytic attack that recovers the key after intercepting and analyzing only a relatively small amount of traffic. Such an attack is so nearly a no-brainer that it's publicly available as an attack script and as open-source code.
  • WEP provides no cryptographic integrity protection. However, the 802.11 MAC protocol uses a non-cryptographic Cyclic Redundancy Check (CRC) to check the integrity of packets, and acknowledges packets that have the correct checksum. The combination of non-cryptographic checksums with stream ciphers is dangerous — and often introduces vulnerabilities. The classic case? You guessed it: WEP.
    There is an active attack that permits the attacker to decrypt any packet by systematically modifying the packet, and CRC sending it to the AP and noting whether the packet is acknowledged. These kinds of attacks are often subtle, and it is now considered risky to design encryption protocols that do not include cryptographic integrity protection, because of the possibility of interactions with other protocol levels that can give away information about ciphertext.
Only one of the problems listed above depends on a weakness in the cryptographic algorithm. Therefore substituting a stronger stream cipher will not help. For example, the vulnerability of the key stream is a consequence of a weakness in the implementation of the RC4 stream cipher — and that's exposed by a poorly designed protocol.
One flaw in the implementation of the RC4 cipher in WEP is the fact that the 802.11 protocol does not specify how to generate IVs. Remember that IVs are the 24-bit values that are pre-pended to the secret key and used in the RC4 cipher. The IV is transmitted in plaintext. The reason we have IVs is to ensure that the value used as a seed for the RC4 PRNG is always different.
RC4 is quite clear in its requirement that you should never, ever reuse a secret key. The problem with WEP is that there is no guidance on how to implement IVs.
Microsoft uses the RC4 stream cipher in Word and Excel — and makes the mistake of using the same keystream to encrypt two different documents. So you can break Word and Excel encryption by XORing the two ciphertext streams together to get the keystream to dropsout. Using the key stream, you can easily recover the two plaintexts by using letter-frequency analysis and other basic techniques. You'd think Microsoft would learn. But they made the same mistake in 1999 with the Windows NT Syskey.
The key, whether it's 64 or 128 bits, is a combination of a shared secret and the IV. The IV is a 24-bit binary number. Do we choose IV values randomly? Do we start at 0 and increment by 1? Or do we start at 16,777,215 and decrement by 1? Most implementations of WEP initialize hardware using an IV of 0; and increment by 1 for each packet sent. Because every packet requires a unique seed for RC4, you can see that at higher volumes, the entire 24-bit space can be used up in a matter of hours. Therefore we are forced to repeat IVs — and to violate RC4's cardinal rule against ever repeating keys. Ask Microsoft what happens when you do. Statistical analysis shows that all possible IVs (224) are exhausted in about 5 hours. Then the IV re-initializes, starting at 0, every 5 hours.
 dummies.com
Custom Search
Powered By Blogger