Archive for September, 2011

First steps for becoming a practical programmer (1)

In the modern daily life, almost every college student might need to program to accelerate his research project.

First you have to know that which programming language could help you reach your goal faster and easier. Actually there are many programming languages available, but to choose a programming language is the most important step, following notes can be useful.

a. C++
i. A good and explicit programming language, C++ is the most favorite programming language among the programmers. A lot of software packages, Operating systems, and virus scanner programs are designed using C++
ii. C++ is useful when you want to write program that has to operate a huge amount of data, it is very fast, and explicit.
iii. For a beginner C++ can be both very helpful or very time consuming, depending on the programmers guide, 
iv. It is very useful for Mathematical, statistical, data analysis, data management, fast applications, and fundamental programs.

b. Fortran
i. Fortran is very much used for mathematical operations, and applications designed for engineering proposes, some famous software such as SAP and Sewer are designed using Fortran

c. Basic
i. Basic is very slow compared to C++ and Fortran,
ii. It is very practical, 
iii. It is very easy to run the program written in Basic
iv. The program is interpreted, not compiled so that it is hard to run it without the interpreter
v. Newer versions such as Visual Basic 6, VBscript, VB .Net and C# are also available,
vi. It is very simple to design a practical program using Visual Basic, of VB .Net
vii. It is not that much explicit
viii. It is very easy to program using Visual Basic and the rest of the family 
ix. It is very easy to write Database management programs using database servers, and connecting it to a data engine is very practical.
x. For Databases applications, it is a very good choice, but rather slow for huge operations.

d. Java
i. Java is a very familiar language for the computer science and engineering researchers,
ii. It is very practical,
iii. Because of the Java Virtual Machine, it can be executed on almost any platform
iv. It is useful for distributed programming, because of compatibility with different devices
v. It is slower than C++ but faster compared to Visual basic
vi. I can be easily connected to different data engines, so it can be useful for database management, and online applications,
vii. Java applets can easily run on browsers and give the programmers chance to write client side programs,
viii. Java servelets can be used for server based applications,  
ix. Java is a class based language

e. PHP
i. PHP, is in fact a server side programming language, it can be easily connected to the MySql, so it makes this language a good choice for online programmers, most of the weblogs and Forums are based on this language.
ii. PHP has a structure very similar to java and C++
iii. Mostly used with apache server
f. ASP
i. ASP is very much similar to PHP, 
ii. It’s more compatible with Oracle and Sql server than the MySql database engine
iii. It is more used on windows machines and IIS is needed to run ASP on server side.
iv. ASP can be written in Javascript, VB, and also Delphi
g. Matlab
i. Matlab is a mathematical and simulation software, which has its own language too, 
ii. It’s very simple and very much practical while dealing with matrices
iii. It is slower than C++ and Visual Basic
iv. Very good choice for those who have lots of graphs and diagrams
v. The simulation facilities in matlab makes it a very good choice for the researches
vi. It has man useful commands and methods for mathematical statements

h. Prolog
i. Mostly used in artificial intelligence
ii. Easy and practical, with a few commands the programmer can do a lot of things

You have to choose one the programming languages above before going to the next step. The language you choose has to be compatible with the work you are doing, and also you have to consider if the environment you are working in supports the language you have chosen.

Written by bini
I am a Researcher.

Learning Oracle Form Builder 5.0: A tutorial for form designers

This is an update to Relational Business System’s popular Learning Oracle books on using the Oracle Corporation’s GUI Development tools and the concepts and techniques programmers need for building Oracle applications. It is a tutorial on the use of the tool Form Builder 5.0. It gives the reader a step-by-step tutorial in creating forms and using the GUI features of Form Builder. Both form creation and graphical enhancement are covered.

List Price: $ 29.95

Price:

Related Oracle Tutorial Products


Is Oracle recruiting MySQL software into its empire?

ForelPublishing.com – Downloadable Ford Manuals in PDF
ForelPublishing.com specializes in digital downloads of vintage Ford manuals. Our products are licensed and approved by the Ford Motor Company and are in the easy to use Adobe PDF format.
ForelPublishing.com – Downloadable Ford Manuals in PDF

Article by Darwin132

With Oracle’s recent .38 billion dollar buyout of Sun Microsystems, some new product recipes are bound to end up on the fattened company’s revisited menu. New head chef Larry Ellison is now directing the flavor of Sun’s software products, and some people are concerned for possible drastic changes, especially during this economic recession and the necessity for Oracle to bring in new channels of revenue. One possible change-of-course could be converting Sun’s incredibly popular MySQL to a pay-for Software, which would bring thousands of businesses and software developers to their feet in protest.

MySQL software allows people and companies alike to access and manage their website databases. MySQL is open source software, which means people can download it free of charge as well as access and contribute to the software’s code. To date, there have been over 11 million installations of the product, including high profile use by companies like Facebook, Google and Wikipedia. In the past, Sun has only marginally monetized MySQL through paid offerings like software updates and extended product support.

Ellison and Oracle could tap into the huge MySQL userbase as a new profit channel by converting it to enterprise software – charging customers through a licensing fee. This could simultaneously provide a gargantuan influx of revenue to Oracle, as well as alienate millions of open-source customers who currently rely on the software. It seems like a drastic strategy, however, the current economic recession could call for Oracle’s management to search for extreme ways to prepare for future leaks in revenue. Although Oracle has so far remained relatively unscathed by the economic depression, their buyout of Sun is clearly forward thinking to potential future hardships.

Ellison has been known to be quite the staunch competitor and would not necessarily let the alienation of current MySQL users deter him from a new business opportunity. With a net worth of approximately billion, Ellison has been known for his hard-nosed leadership, obsession with Samurai warrior culture, and refusal to take ‘no’ as an answer. Whether it be a whale-sized luxury yacht, an unwelcome company buyout, or a change to MySQL’s monetization strategy- he most often gets what he wants. Ellison was most aptly personified during Oracle’s hostile takeover of human resource and recruiting software company PeopleSoft in 2004, jokingly saying he’d shoot opposing CEO Craig Conway (rather than his dog).

Converting MySQL into a paid enterprise service may not be the best move for Oracle, as there are several other open source competitors that current MySQL users could jump to. PostrgreSQL is one such alternative that may welcome a MySQL paid solution, as they would surely gain a large customer influx.

Although transforming MySQL into a paid enterprise service would certainly push a large portion of the current userbase away, there would also be some who would likely stay with the service, even if meant a fee. Many MySQL users have a brand affiliation with the software as well as a deep familiarity with utilizing it.

It is pretty uncertain what would happen if Ellison and Oracle took MySQL in this new direction- although during the current times, anything is possible.

Bringing the best in enterprise, recruiting, and technology news. Feel free to join in the conversation.










Accessing a MySQL Database with a VB.NET Component in an ASP.NET File

Nowadays it’s important to have good databases that can handle large amount of data. In my work, clients always need databases, and typically they require a more powerful solution than an MS Access database file, but without the complexity (or expense) of something like MS SQL Server, IBM DB2, or Oracle. Both the MySQL and PostGreSQL databases fit the bill, but since MySQL is really easy to use in a Windows server, I decided to use it for my work. Getting MySQL to work elegantly with ASP.NET is

List Price: $ 8.00

Price: [wpramaprice asin="B0007MHF72"]

More Download Mysql Products


Simple MySQL tutorial

The Jack Russell Lover’s Ultimate Guide to Training
This ebook is a complete guide for Jack Russells of all ages and Jrt mix breeds. It includes everything you need to know about JRTs to make sure your dog is well-behaved, learns commands, and so much more! The solutions are all in this e-book!
The Jack Russell Lover’s Ultimate Guide to Training

MySQL is a free to use database program that follows the SQL language guidelines so what you will learn here applies to all databases that will accept a SQL connection which is nearly all of them. A database is a collection of tables, each table is rather like a spreadsheet grid, the columns being called ‘fields’ and the rows being called entries.

The fields have types applied which specifies what sort of information they may contain (text,numerical etc) and this information is used by the database when sorting, storing retrieving and manipulating the data stored. To create a database you have to specify a database name, a user name and a password.

Sometimes this information is put in by yourself via your sites control panel, or sometimes you have to email your web hosting company to do it for you. You then need to know the host name for the mysql installation – usually but not always it is ‘localhost’- its worth asking.

Once a database exists it will be blank, you need to decide what to put in it- and we are ready to rock and roll!

Connecting to a MySQL Database from PHP

In php you must do this at the top of each page that uses MySQL use:

$ dbhandle = mysql_connect(hostname, username, password) or die(“Cannot connect to DB”);

Then you must specify what database (it may be a shared installation with thousands on) you wish to work on:

mysql_select_db(databasename) or die(“Connected but error accessing DB”);

Now PHP has opened an internal connection on your server to the database software.

Creating a MySQL Table

You will only need to do this step once at the start of your project, or when you want to add a new table. This lays down a ‘skeleton’ for the data structure you will use. As an example we will have a simple picture gallery manager. This will be a simple list of pictures. Each will have an ID number, the title, the artist or photographers name,the filename where the picture is stored (as a URL so pictures may be taken from off site),the x dimension, the Y dimension, a comments field and finally the number of times the picture is viewed.

We create the table like this:

$ sql_command = “CREATE TABLE `pictures` (
`id` int unsigned NOT NULL auto_increment,
`title` varchar(50) NOT NULL default ‘Unknown Title’,
`artist` varchar(50) NOT NULL default ‘Unknown Artist’,
`url` varchar(50) NOT NULL default ‘http://www.mygallery.com/pics/unknown.jpg’,
`width` int unsigned NOT NULL default ’100′,
`height` int unsigned NOT NULL default ’100′,
`comments` longtext, `views` int unsigned NOT NULL default ’1′,
PRIMARY KEY (`id`),
KEY `search_title` (`title`),
KEY `search_name` (`artist`), ) TYPE=MyISAM;”;
mysql_query($ sql_command);
if(mysql_error())echo “Error creating pictures table -”.mysql_error();

The first line is the instruction to create the table which we are calling pictures. Then we have a line for each field in the table. This specifies the field name, the type of field, the keywords NOT NULL means that the database checks when an entry is created that it is not empty and then the default value is entered if it is. Its a very good idea to use not null and default values wherever possible.

The first field (id) is specified as auto_increment – this means that each time a new entry is created in the table this id number will increase by one automatically. The Comments field is specified as longtext which means you could have the entire contents of war and peace in there, or nothing. The database will handle both extremes. The other text fields are specified as varchar(50) – a max 50 chars long string. You will have to police the length in your PHP program.

Now we have Key definitions. The primary key is the default way that you will usually look up each picture – and it will only ever return a single line because it must be unique for each line. We have set it to ‘id’. So that we can easily list and search by title and artist we have added two other ordinary keys as well called search_title and search_artist. Then we have a TYPE statement and you should never need anything other than MyISAM unless you have a big book about MySQL!

We send the command to the database using mysql_query and check for and report any errors. Thats it! You created a table. Note that its important to use capitals for the commands – the old joke is that SQL is deaf and you have to SHOUT!

Adding an Entry to a MySQL table

To add an entry first you get the data from form fields using $ _POST['fieldname'] or calculate them from your program, retrieve them from the net or whatever. Next you check the lengths of any strings and filter for any harmful characters (especially if the input comes from a public form!). This will filter out bad characters:

For all integer values: $ value=intval(0+$ value);
For all floating numbers: $ value=(intval(10000*(0+$ value)))/10000;rounds off to 5dp
For all strings: Sstring=mysql_real_escape_string($ string);

Having done this you would use:

$ sql = “INSERT INTO pictures (title,artist,url,width,height,comments,views)
VALUES(‘$ title’,'$ artist’,'$ picurl’,`$ picwidth`,’$ picheight’,$ comments,’0′}”;
mysql_query($ sql);
if(mysql_error())echo “Error adding row $ title -”.mysql_error();

Assuming the PHP variable $ title etc were what you stored the data in.

Retrieving an Entry from a MySQL table

If we want just one entry and we know what the id of the picture is (we stored it in $ picid) then:

$ sql = “SELECT * FROM pictures WHERE id=’$ picid’”;
$ result = mysql_query($ sql) or die(mysql_error());
$ row = mysql_fetch_array($ result)

We can then acess the returned data from the $ row array using field names
$ title=$ rows['title'] and so on

Retrieving multiple Entries from a MySQL table

We can retrieve the whole table by leaving out the where clause:

$ sql = “SELECT * FROM pictures”;
$ result = mysql_query($ sql) or die(mysql_error());
$ html=’All pictures in our gallery-”;
while($ row = mysql_fetch_array($ result)){
$ html.=”$ rows['title'] $ rows['artist']“;
}

and show all our pictures… or if we wanted to show them sorted by artist:

$ sql = “SELECT * FROM pictures ORDER BY artist”;

The rest of the code is the same as above. Order by can be order by any field so if we wanted to show them sorted by popularity:

$ sql = “SELECT * FROM pictures ORDER BY views”;

instead!

Deleting an entry or entries from a MySQL table

$ sql=”DELETE FROM example WHERE id=’15′”; would remove one row whose id was 15
$ result = mysql_query($ sql) or die(mysql_error());

or

sql=”DELETE FROM example WHERE artist=’Dudley Dogood’”; removes all pictures by Dudley Dogood $ result = mysql_query($ sql) or die(mysql_error());

Modifying an entry in a MySQL Table

Each time we display a picture in our example we would have to update the number of views. Since we just displayed it we would know the picid and number of views existing so:

$ views++;
$ sql=(“UPDATE pictures SET views=’$ views’ WHERE id=’$ picid’”);
$ result = mysql_query($ sql) or die(mysql_error());

Thats all you need to know to get a simple application up and running! Have fun… A link back would be appreciated if you found this useful. Malcolm at Webmaster Alpha

Written by Mattinblack

Comments Off more...

  • Copyright © 1996-2010 sql tutorial for beginners,sql server tutorial,sql tutorial pdf,sql tutorials. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress