Welcome to Brothersoft QA Community, coolAarti.
Download MYSQL 4.1 from
http://www.brothersoft.com/mysql-download-250553.html?bottom
Click on "Server 1 Brothersoft(CDN for Global)" under the software name.
Or copy and paste this direct download link to your download manager:
http://files.brothersoft.com/development/databases/mysql-essential-4.1-win32.msi
Post back if you need more detailed instruction.
Download the MySQL program from brothersoft. The program size is relatively small and therefore should not take long to download with an efficient Internet connection. You can also purchase this by phone.
Run the install file. It will ask you a serious of questions and you will have to perform the initial setup of the program. If you don't want to fool with the majority of the settings, you can use the typical setup option and always change the setup later. In order to use the program to run your server database, you will need the MySQL setting "Configure the MySQL Server Now" to be checked.
Troubleshoot MySQL; this may be rather challenging if you are not trained in database or server technologies. There are some common tests you can run that will do an adequate job, however the exact test depends on your setup. If you have trouble, you can always use the forums at the website where you downloaded the software.
Buy a server running Mac OS X. If you can't seem to get MySQL working on your server, you could just go out and buy a Mac server. These servers come with the software pre-installed and with most of the configuration issues already worked out.
Download and install jTDS JDBC driver for SQL Server if you find it missing.
Enable TCP/IP for SQL Server Express as shown below. By default, TCP/IP is disabled, in which case the JDBC engine cannot connect to it and gives the following error: "Network error IOException: Connection refused: connect." Expand SQL Server 2005 Network Configuration node. In the right pane, select "Protocols for SQL Express." It will show protocols and their statuses. Select "Enable" for TCP/IP.
Select "Properties" from the TCP/IP context menu.
Select the "IP Addresses" tab in the "Properties" dialog box.
Set the TCP Dynamic Ports field to blank (empty). As a result, SQL Server Express will not choose a port automatically at restart.
Enter the correct port number in the TCP Port field under IPAll node.
Press "OK" to save and apply these settings.
Restart SQL Server Express, and start a command window.
Type "netstat -an". If your port number is, say, 5000, it should show up in the output of this command.
TCP 0.0.0.0:5000(your port no.) 0.0.0.0:0 LISTENING
This is a test that the new port number is being used.
Prepare to enable SQL Server Authentication Mode for logins if you get the following error with the default Windows Authentication mode: "Login failed for user ''. The user is not associated with a trusted SQL Server connection."
You may have to create a new user or enable logging in with this mode for the current one, as shown below.
Start Microsoft SQL Server Management Studio Express (SSMSE), and connect to SQL Server Express.
Right-click "Properties" from your database's context menu in the Object Explorer window.
Select the "Security" tab in the "Server Properties" dialog box, and check the "SQL Server and Windows Authentication Mode" check box.
Press "OK" in the "Properties" dialog box to save these settings.
Pull up "Security / Logins" in the Object Explorer window, and select the existing system login "sa."
Select "Status" page in the "Login Properties" dialog box that appears if you see a red down arrow against the login "sa." A red arrow means that either login with this mode is not enabled for "sa," or there is no password.
Select the "Login: Enabled" radio button.
Go to the General page on the same "Properties" dialog, and enter a password for "sa." The password should be fairly cryptic as this is the system administrator.
Press "OK" to save these changes to the dialog box. Note: If you refresh the Object Explorer page now, there should be no red down arrow against "sa."
Write Java source code in your client application to connect to SQL Server Express now, using jTDS driver for JDBC. Here is a sample piece of test code:
import java.sql.*;
public class testConnection
{
public static void main(String[] args)
{
DB db = new DB();
db.dbConnect(
"jdbc:jtds:sqlserver://localhost:1433/tempdb","sa","");
}
}
class DB
{
public DB() {}
public voidn dbConnect(String db_connect_string,
String db_userid, String db_password)
{
try
{
Class.forName("net.sourceforge.jtds.jdbc.Driver");
Connection conn = DriverManager.getConnection(
db_connect_string, db_userid, db_password);
System.out.println("connected");
}
catch (Exception e)
{
e.printStackTrace();
}
}
};
Click the "Start" menu. Type "services.msc" in the "Start Search" text field and press "Enter," or click "Run," type "services.msc" and press "Enter." The Windows "Services" console opens up.
Right-click all the ViewPoint services that begin with "SNWL" by right-clicking and choosing "Stop" from the pop-up menu.
Stop the "MSSQL$SNWL" and "SQLAgent$SNWL" services also by right-clicking and choosing "Stop."
Access the following directory in your system, using Windows Explorer: [ViewPoint Folder]\MSDE\Data\MSSQL$SNWL\Data.
Copy all the ".mdf" files under the "Data" folder and save them on a different location on you computer, temporarily.
Click the "Start" menu. Type "appwiz.cpl" (without quotes) and press "Enter," or click "Run," type "appwiz.cpl" and press "Enter." The "Add/Remove Programs" utility opens up.
Select "ViewPoint" from the list and confirm the removal by clicking the "Change/Remove" button.
Delete the "ViewPoint" folder that was previously accessed through Windows Explorer, and restart your computer.
Download and Install ViewPoint, launching the corresponding ".exe" or "VPS.exe" file. Complete the installation and reboot your system.
Access the Windows "Services" console and stop all the services that correspond to ViewPoint, as in Step 2 and Step 3 from the Unistall section.
Access the new ViewPoint's "Data" directory in your computer: [New ViewPoint Folder]\MSDE\Data\MSSQL$SNWL\Data and delete all the new database files within that "Data" folder.
Copy and the old ".mdf" (database) files that were copied to a temporary location on your computer, and paste them into this new folder.
Access the "Services" console again and start the "MSSQL$SNWL" service by right-clicking and choosing "Start."
Start the following "SNWL" services by right-clicking and choosing "Start."
SNWL Update Manager
SNWL ViewPoint Scheduler
SNWL ViewPoint Summarizer
SNWL ViewPoint Syslog Collector
SNWL ViewPoint WebServer
Open the SQL query editor and create a new database called SampleDB. Choose this database for the query session.
Create Database SampleDB;
Use SampleDB;
These examples were created using the query editor within Microsoft SQL Server 2008 Management Studio Express.
Create two tables, Customers and Sales, and then add a few records to both tables using the following script.
Create Table Customers
( CustomerID int Primary key,
Name varchar(50),
Status varchar(10));
Insert into Customers Values (1, 'John Smith', 'New');
insert into Customers Values (2, 'Mary Jones', 'New');
Insert into Customers Values (3, 'Fred Adams', 'New');
Create Table Sales
( SalesID int Primary Key,
CustomerID int References Customers,
Amount int);
insert into Sales Values (1, 1, 500);
insert into Sales Values (2, 1, 250);
insert into Sales Values (3, 3, 50);
Create a nested query, combining an Update with a Select statement that sets Customer status to Active for those Customers who have activity in the Sales table.
update Customers
Set Status = 'Active'
where CustomerID In
(Select CustomerID From Sales);
This is a standard SQL Update statement that sets the Status field to Active for a selected set of records in the Customer table. In a nested query, the Where clause includes one or more Select statements surrounded by parentheses (). Each Select statement returns a list of values that can be compared to a field in the table. In this case, only those Customer records that have Customer IDs found in the Sales table will be updated.
Create a second nested query using a Select statement that aggregates sales totals.
update Customers
Set Status = 'Premium'
where CustomerID In
(Select CustomerID From Sales
group by CustomerID
Having sum(Amount) > 250);
When analyzing nested queries, start with the Select statements found in the Where clause. In this case, the Sales table is aggregated by Customer ID (Group By CustomerID) to total the sales amounts (Sum(Amount)). Only those with total sales greater than $250 are chosen. This list is then used to filter which Customer records are updated (customer 1).
Create one more nested query that selects Customer records that are not found in the Sales table.
update Customers
Set Status = 'Inactive'
where CustomerID Not In
(Select CustomerID From Sales);
This query first selects a list of Customer IDs found in the Sales table (1 and 3) and then updates those not found in the list (customer 2).
Creating a SQL connection is fairly straightforward, whether you are on the command line or accessing a database from a program. The syntax will be slightly different depending on what SQL distribution and programming language you are using. The following examples give the syntax for using MySQL because it is by far the most commonly installed form of SQL. No matter how you are connecting, you will first need some basic information, including the SQL server's hostname, a username and password for connecting to the server and the name of the database you will be using.
Command Line
If you have access to a terminal where SQL is installed and have a username with permissions to use SQL, the connection process is extremely simple. Simply run the command for whatever form of SQL you are using. For instance, with MySQL you just type mysql on the terminal. You will then be prompted for a MySQL username and password and will then have access if these are correct.
Connecting to MySQL with PHP
PHP is the most common programming language used to interface with MySQL. First you need to assign variable names for the information that will need to be passed to MySQL to connect to the database. This information includes the hostname (usually "localhost"), the MySQL username, the corresponding password and the name of the database you will be using. A string is denoted by a $ and all lines must be separated by semicolons in PHP. It looks something like this:
$server = "localhost";
$username = "your_username";
$password = "your_password";
$db = "database";
Next you need to set a variable that connects to MySQL and select the proper database. You connect to MySQL using the "mysql_connect" command and you select the database using the "mysql_select_db" command. The "mysql_connect" command should look something like this:
$dbconnect = mysql_connect($server, $username, $password)
or die("Connection to MySQL failed");
echo "Connected to MySQL";
The "or die" command declares a message to display if the connection fails. The "echo" command tells PHP what to display if the connection goes through without a hitch.
To select the database you use the "mysql_select_db" command. The "mysql_select_db" command should look something like this:
mysql_select_db($db, $dbconnect) or die ($db . " not found." . $username);
echo "Database " . $db . " selected";
This command selects the database defined by the variable $db using the database connection information stored in the variable $dbconnect to select the proper database. The "or die" command once again defines what should be displayed as text on the screen if the connection fails and the "echo" command displays text on the screen if the database selection is successful. Periods in PHP add statements together.
Finally, to close your connection to the database, you issue the command "mysql_close" with the variable containing the database name in parenthesis. In our example it would look something like this:
mysql_close($db);
Connecting In Other Ways
Every programming language will have its own syntax for connecting to a MySQL server and selecting a database. Some will be very similar to PHP, like Perl, and some will be considerably different. For instance, if you are connecting to a MySQL via MySqlConnection with .NET, it will look something like this: Server=Server_Name;Database=Database_Name;UserID=Username;Password=Password;Trusted_Connection=False
The segregation of duties for a DBA, or Database Administrator, refers to the duties that this individual is responsible for, and how (or to whom) they are delegated. Because the maintenance and upgrading of a database is often a large project, many individuals are needed in order to fulfill the role efficiently. Each person might only have a certain degree of access to the database, usually leaving full access to a central administrator.
Duties
A database administrator will generally have a variety of duties to either delegate to other professionals or to undertake himself. These duties will include troubleshooting (answering or dealing with problems that may arise within the system), performance optimization (making sure the database runs as smoothly as possible, or is able to be improved), database creation, startup and shutdown (the basic function of this role) and system security (protection from internal and external threats). Delegating these and other functions is a clear must for any institution using a large database. Giving all of these duties to one individual is known as a "security red flag" and is inviting trouble in the future.
Advantages of Segregation
The segregation of duties is a preferable option for businesses and auditors for a few reasons---mainly to do with either accidental or deliberate error. A single database administrator would have a great deal of control over a system database, whereas delegating the job's multiple duties spreads the responsibility, and therefore the level of access, across a wide range of personnel. This makes accidental errors easier to spot; an error is likely to negatively affect another individual, leading to a quicker realization that something has gone wrong. Segregating duties also makes deliberate fraud more difficult, as such an event would need the collusion of multiple members in order to succeed.
Administrator Controls
Controls on the central database administrator are vital, as it wouldn't be worth going through the trouble of delegation for security when a single individual can bypass these controls. Restrictions must be placed on the administrator in order to safeguard the integrity of the database. For instance, you might have another individual review any and all updates the administrator makes to the database. Other controls should include read-only access when it comes to the day-to-day operations of the database and other important functions (i.e. movement of production, scriptwriting). Only in the case of emergencies should a database administrator be given full unrestricted access.
In some cases, recompilation can be an annoyance for a server environment. Certain programs, however, give you an option to parametrize queries to prevent recompilation altogether. A forced DBA refers to a database that has been parametrized in this way.
Use
Parametrization might be necessary in cases where there's particularly high recompilation in a certain query's results. This is usually the case when a high number of queries are being executed, due to many queries being repeated.
Keep It Simple
Unfortunately, complex queries cannot be parametrized. Forced DBA is only available for simple queries.
Warning
Forced DBAs have been known to affect the performance of queries negatively. A forced DBA option should only be used rarely.
HTML tables allow your Web pages to display data in an easily readable format. They are relatively simple to set up, but they can be confusing for a beginner because while the rows of a table are clearly defined within the code, the columns are not. Don't worry. Just master a couple basic concepts, and you'll be "writing columns" in no time.
Basic Elements
Start by setting up the basic framework. HTML tables begin and end with <table> tags. The information within tables is arranged in rows, each of which is marked with <tr> tags (for "table row"). Columns are created by the <td> ("table data") tags within the rows. Each set of <td> tags is called a "cell." Let's set up a basic table with the first and last names of the first three American presidents:
<table>
<tr><td>No.</td><td>First name</td><td>Last Name</td></tr>
<tr><td>1</td><td>George</td><td>Washington</td></tr>
<tr><td>2</td><td>John</td><td>Adams</td></tr>
<tr><td>3</td><td>Thomas</td><td>Jefferson</td></tr>
</table>
Note that this table does not define any columns, unlike the way rows are defined with the <tr> tags. The number of columns is defined by the number of <td> cells. Here, each row has three cells, so there will be three columns. Always have the same number of cells in each row, even if you don't have a value to put in a particular cell; this is how the browser keeps the columns aligned.
Setting Widths
Adjust the size of your table, and the individual columns within it, with the "width" property. You can define a table's width either as a fixed number of pixels or as a percentage of the width of the surrounding element. (If there is no surrounding element, then it's the width of the browser window.) So, if you wanted your table to be half the width of the window, your first line would read:
<table width="50%">
If you wanted it to be 650 pixels, you'd write:
<table width="650px">
If you specify no widths, then the browser will set its own using the length of the data in the cells.
You set the widths of columns the same way--as a fixed number of pixels or as a percentage. Do this by adding a width property to the cells in the top row. From our example:
<table width="50%">
<tr><td width="20%">No.</td><td width="40%">First name</td><td width="40%">Last Name</td></tr>
Note that these percentages are relative to the width of the table, not the surrounding element. This table will take up half (50 percent) of the width of the browser window. The columns will then be 20, 40 and 40 percent of that width. If you neglect to set the width for a column, the browser will simply assign it the remainder of the usable space; if more than one column have undefined widths, the browser will split the remainder equally. If you choose to set columns by pixels, either make sure that all columns add up to the width of the table, or leave one column undefined and let the browser set it.
Colspans
Merge cells across columns with the "colspan" property. Let's say that, for some odd reason, you wanted to replace John Adams in our example with "Massachusetts' favorite son John Adams," and you wanted it to span the space for both "First Name" and "Last Name." Simply define his "First Name" cell as spanning two columns:
<tr><td>2</td><td colspan="2">Massachusetts' favorite son John Adams</td></tr>
Desk checking is a way to confirm the logic of a computer program's algorithm, ensuring there are no bugs or mistakes present. The process is done manually without computer assistance.
Function
To perform a desk check, an analyst prints out a hard-copy version of the computer program and goes over it manually, line by line.
Features
Desk-check results are documented on a table for easy reference. The table typically has columns for the line number, which is the code line being executed; one column for all variables used, with variables listed in alphabetical order; a condition column, which is either true or false; and an input/output column, which shows the end results.
Time Frame
A desk check is performed before the algorithm is coded.
Considerations
Desk checking is not as prevalent as it once was. Many program checks are done onscreen or with advanced debugging systems, reducing the need for pen and paper.
Misconceptions
A desk check is not the same as a test plan. While a desk check is concerned with checking an algorithm's logic, a test plan is only focused on whether the outputs are correct for the inputs.
Some information is best presented by using a grid table. When you add a grid table to a document, information is arranged in vertical columns and horizontal rows. The intersection of a column and a row is called a cell. Grid styles allow you to format the cells of the grid using background color, font styles, and borders. Applying the right grid table styles makes information easier to read and understand. A number of predefined styles are available. You can also customize the grid style options to draw attention to specific data.
Borders
You can select whether to display lines between the columns and rows and around around the table itself. These lines are called borders. You can select to display only top, bottom, left, or right borders. You can even choose to display no borders at all.
Header row
The header row is the top row in the table. It is often used to provide labels for the columns. You can select to display the header row using a different style than the other rows in the table.
Totals row
The totals row is the last row in the table. In a table that shows mathematical or accounting data, you might choose to display a sum of the column values in the last row and apply a separate style to the totals row.
First or last column
You can also apply a different style to the first or last column. For example, a matrix of data, such as one that charts the monthly rainfall for multiple cities, requires a label for each column and for each row. By applying the same style to the header row and to the first column, you can identify those cells as containing labels.
Banded rows
When you select the banded rows option, you cause one style to be applied to even numbered rows and a different style to be applied to odd numbered rows. This technique can help make it easier for readers to see the values on each individual row.
Banded columns
The banded columns option is similar to the banded rows option, but applies the alternating style to columns. This technique is used to help draw a reader's eye to the data stored within a column.
Monotype fonts are also known as monospace or fixed width fonts. The letters or characters in these fonts occupy the same amount of space, meaning that a lowercase letter i occupies the same amount of space as an uppercase letter M. Tim North, author of the e-book "Better Writing Skills" says in a Nov. 9, 2004, article in the Web Design Library that fixed width fonts are used by programmers to line up code. They are also used in tables as they fit into columns better than variable width fonts. Fixed width fonts are not the best choice for reading as they are not as natural to the eye.
Web Monotype Fonts
The Andale Mono font and the Courier New font are monotype fonts that are commonly used in the Windows operating system. They are also available on Mac operating systems. These fonts are compatible with Unix and Linux operating systems. The Courier New font was created to imitate the fonts used in typewriters. It is often used in tables and in technical documentation. The Courier New font family includes Courrier New Bold, Courrier New Italic and Courrier New Bold Italic fonts. As with any font, the font must be installed on the PC and must be supported by the browser to display properly
Windows Monotype Fonts
In addition to the Andale Mono font and the Courier New font, the Consolas and Lucida Console fonts are also used frequently in Microsoft Windows applications, such as Microsoft Word, Windows XP and Windows Vista. This font is also supplied with Office MAC 2008 and Windows Server 2008. Lucida console is useful for compacting letters in capitalized titles in posters and displays and in manual headers or tables.
Mac Monotype Fonts
The Courier and Monaco fonts are common Mac fonts. Monaco was designed help readers differentiate between numbers and letters that often appear identical in other fonts. The capital letter O, for example, is often identical or nearly identical to the number zero and the lowercase letter l closely resembles the number one. This causes problems for computer users needing to enter exact passwords or security codes, although it is usually not an issue for someone reading a book or an article in which the context makes the difference obvious.
Unix and Linux Monotype Fonts
Courier and Luxi Mono are fonts commonly used in the Unix and Linux operating systems. Luxi Mono is a serif font which resembles Roman letters. It is decorative but still compacts letters into a fixed width.
A database test plan can cover different things depending on the scenario. A full database migration would require a wide ranging test. A change to a single application could require a detailed analysis of data in a few tables.
Performance
A new database, or a large change to an old one, usually requires a performance test. At the simplest level, this could involve running some of your largest transactions or reports. A larger database with a greater change could involve using automated testing tools to challenge the system with a quantity of complex data.
Functionality
After a migration or application changes, it is important to note whether the application can function. Run through a set of transactions designed to work out the areas where changes occurred.
Integrity
Build queries to test data integrity. Run transactions against the database, then use the queries to check the data is being created, deleted and updated correctly. While performance and the ability to work in a system are important, it is data integrity problems that can lie hidden for months which cause the most anguish in the end.
Connections
Test connections from the other systems that access the database. Make sure the database accounts they use are functional. Some simple queries or transactions from these remote systems will suffice.
Metrics
With any test plan, the most important part is that it exists. Decide ahead of time what is to be measured and how it is to be measured. Changes can always be made and additional tests can be performed.