erection hard herbal penis size stay

just another regularban.info web blog

MEMBERS:

Efficient SQL Databases

Don't be fooled by seeming simplicity. A lot of developers get comfortable with a certain way of designing a database for their web applications that they miss out on techniques they should rather employ to make things run faster and more efficiently. A lot of developers don't bear in mnd that the small site they are creating now might grow into something incredibly large and complex, and the database they designed has become bloated and doesn't scale well to meet the demands of the increased traffic.

This article hopes to provide web developers with a few techniques to help make their database and queries faster and more efficient.

1. Avoid Character Types

When you are designing a database, it is so easy to set all data types to the VARCHAR type as it can then contain any data you want; numbers or text. But character data is amongst the most inefficient data type you can get. If a field is only going to contain numbers, then make it one of the appropriate types (INT, DOUBLE, etc).

Also, wherever possible in your web development code, try to use numeric data types as opposed to characters. One of the most common things a script has to store are flags like whether someone answered yes or no to a question, etc. You could of course store it as 'Y' or 'N' but why not store it as 0 and 1?

The reason this makes a difference is when you have a database, for example, with over 500 000 entries, and are running a SELECT on that field, comparisons are processed a lot faster for numeric data types than character types. Also, if you need to return data to the calling script, numeric data is less memory intensive than character data. In addition, your web development language (PHP, ASP, etc) would also be able to process and perform functions on numeric data better than character data.

I am not trying to convince you never to use character data types. Sometimes it is a necessity, but if you can find ways to reduce the amount of character data processed by your SQL database, the better your server will cope.

2. Normalization

Normalizing a database is really quite a complex process. It is a process that describes a way to design a database structure to avoid repetition of data in your database and can lead to significant performance benefits if employed correctly. However, the entire process of normalisation is a bit beyond the scope of this article as it can fill books on its own, but any developer designing a database should seriously consider becoming knowledgable about normalisation and employing it in their own designs.

For a good tutorial on this process: http://www.keithjbrown.co.uk/vworks/mysql/mysql_p7.php

3. DateTime vs Timestamp fields

This actually relates to 1. a bit. The big difference to bear in mind here is that a field of type DATETIME is actually stored as a series of characters. A field of type TIMESTAMP is actually stored as an integer. So therefore, a more efficient way of storing dates is using the timestamp method. The timestamp has its drawbacks however. For one, you cannot store a date early than 1 January, 1970. Also, timestamps in your script will need recalculating to get to the character format. Because of this recalculation, it may not be better to store as timestamp. It really is a case of testing which format works better for your needs.

4. Use LIMIT where possible

In your queries, if you are doing a SELECT to a database and you only expect a certain number of results, using the LIMIT statement can speed your query up incredibly.

For example, if you have a table of users and you need to run a query to search for one users record, you can use a query like:

SELECT user_name FROM users WHERE user_id = 453;

This query is perfectly valid and will return the right result. But you also know there will only be ONE result. The query above will search the database, find what you want, but then still continue searching after that. It would run a lot faster if you could tell the query that once it has found what you are looking for to stop searching. LIMIT can do this, as this query shows:

SELECT user_name FROM users WHERE user_id = 453 LIMIT 1;

Imagine this scenario. You have a table called logins, that records every login from a user. It currently contains over 2 000 000 records, and you want to find the first time a user logged in. Now bear in mind that because this table inserts data over time, it is already sorted for by date. You could do the following query:

SELECT MIN(login_date) FROM logins WHERE user_id = 4876;

This will return the record you want, but SQL will now have to get all dates for that user, sort them and then return the lowest value to you. Our table is already date sorted simply because of the way it records data for us. So using LIMIT can be more effective:

SELECT login_date FROM logins WHERE user_id = 4876 LIMIT 1;

Because it is sorted, the first one will always be a users first login.

5. Avoid using LIKE

If you have tried to employ 1. above, then hopefully you will be in a scenario where you do not need to use LIKE all that much. LIKE is one of the most inefficient ways of searching a table. LIKE performs a text comparison search in a field and with no wildcards is as efficient as a direct comparison; i.e. WHERE name = 'Jane' is equivalent to WHERE name LIKE 'Jane'. It is when you start introducing the wildcard characters like '%' that things get really hairy.

If you do have to use LIKE, then at least try and make efficient use of the wildcards. These are '_' (underscore) and '%'. Let me explain all this with a real world example.

In a project I was involved in, we had a SQL database storing logs generated automatically from a mail server. Unfortunately, the mail server pretty much just dumped a very long string of text data into a field that contained the data we wanted. A script had to be written to find all logs that referred to a login by a user into the POP server. The only way we could do this was to search every record for a string in the msg field that had the text "User logged in" in it. The first query developed was something like this:

SELECT msg FROM logs WHERE msg LIKE '%User logged in%';

This query took on average of about 35 minutes to process. Obviously not an ideal situation. The way the LIKE worked here was that it had to parse through every single portion of each and every record in the msg field looking for text that matched "User logged in" anywhere in the text. We were able to determine eventually that the text "User logged in" occured at the end of that text in the msg field and so we altered the query:

SELECT msg FROM logs WHERE msg LIKE '%User logged in';

The '%' at the end was removed as we do not want to worry about text after because there is none. The query now only compares text to our string in the msg field at the end of the field and no longer parses through the entire piece of text stored in msg. The query now ran in under 2 minutes. (This was actually still too long, but how we optimised from there is a little beyond the scope of this article.)

Hopefully with all these elements put into practice on your next web development project, you can have a database that runs quickly, efficiently, uses as little resources as possible and wont grind to a halt when the load suddenly increases.

Gareth McCumskey works as the Systems Developer for Synaq, a South African based Linux support and services provider. He has been involved in web development for over nine years and programming since he was 13.

 


Top 5 Must-Have Tips for Managing A Successful Website

If you have ever been to a "bad" website, you didn't need an expert to tell you it was a bust. Maybe you didn't know exactly why it was bad, but dysfunctional web sites tend to exhibit similarities that make them unlikely success stories.

For instance, have you ever visited a site and wondered "what are they selling anyway?" I know I have. I get frustrated with websites like these and quickly start my search again for a website that focuses on the information I was looking for.

A well designed website can either make or break your website success. The tips below will help you get started and to learn what works for a successful website. These tips are by no means all-inclusive; you will also learn a lot through "trial and error" just as with any brick and mortar business. These tips will however, help you to avoid web blunders that hinder even more seasoned web developers and designers.

Must-Have Tip #1 - Make it clear what you do. Find a niche market and don't try to be a "jack of all trades" selling multiple and unrelated products, services, or information. Instead, figure out who your target market will be, and what products and/or services you provide that will appeal to this market. Then, stay on topic; don't throw in a bunch of irrelevant information just to try and lure visitors. They will resent the deception and you'll lose customers.

Note: It is very important to note that search engine crawlers index and categorize your website based on the text and content you provide on each page. The content on each page is also compared to all other pages on your site, so having a cohesive set of pages that focus on your niche product or service is always better than trying to provide too many products or services.

Must-Have Tip #2 - Do your visitors know how to contact you? You would be surprised how many websites leave no way for a customer to contact them with questions or to order their products and services. Think about it this way: if you stopped into a store that provided widgets, and no one was around to help you or answer questions, how comfortable would you feel spending money with that company? You wouldn't, of course, because if they can't even make themselves available for questions before the sale, they certainly won't take time for you after the sale.

If you worry about getting too much spam, or receiving unwanted phone calls by leaving your contact information on your site, make sure to add your business phone to the federal "Do Not Call" list, and use a contact form instead of just providing your email address. This won't eliminate the problem of spam (what does?) but it will make it more difficult to abuse your contact information.

Note: Always respond to email in a timely manner. Treat them as you would any business phone call. Customers typically expect a higher-than-average response rate when shopping or doing business on the internet; if it takes you longer than 24 hours to respond to an email you will probably lose a customer. Even an "I received your email and will respond to your question shortly" is better than waiting too long to get back to a customer.

Must-Have Tip #3 - Don't use flash introductory pages. Everyone knows they are fun and entertaining, but if your site is designed for sales, a business, or for a professional purpose, what will they add to your site? In fact, for many, these are just another added aggravation they have to wade through to get to the information they really want.

Note: If you must use a flash intro, be sure there is a "Skip" feature clearly marked so visitors can bypass it if they choose.

Must-Have Tip #4 - Focus your web copy on satisfying the needs of your customer. Content can make or break the sale, or determine whether a visitor stays or finds another site to shop. Be sure to provide your costumers with unique and interesting words to help pique their interest and differentiate your products and services from your competitor's.

A well-thought through home page and a few articles that prompt a desired action, while simultaneously provide information to help your visitors quickly (in one or two clicks max) find and pay for products and services will keep them interested, and coming back again and again for future information and purchases.

Note: Consider hiring a contact writer if you're at a loss with web content. This may be a significant investment, but the results, and the success of your site, will definitely be worth it in the long run!

Must-Have Tip #5 - Update, update, update. This cannot be stressed enough; if you provide no reason for visitors to show up on your site again, why would they? If the information is the same week after week, month after month, who would want to? Even your local Wal-Mart will provides weekly sales flyers to entice shoppers back to their store! Keep your site fresh and updated!

In closing, I am sure you are reading this article because you want a professional website. If you have programming skills and can write your own code, great! If not, there are many affordable, quality online website builders available; many hosting packages also provide web software and templates. With a little elbow grease and effort, you can build and maintain a successful website as well!

Roxanne Weber teaches "Guaranteed website in 3 sessions" through her eLearning website (http://www.dimensionsolutions.com). She is an internet business and web development consultant and has worked with internet businesses for more than 10 years. She owns and manages the "Dimension Solutions Web Learning Community" website and forum for Dimension Solutions Training & Coaching.

If you're ready to develop and maintain your own professional website that you control, you may be ready for the "Guaranteed website in 3 sessions" training and coaching solutions (visit our site at http://www.dimensionsolutions.com for more information); after all, who could be more of an expert about your website than you!

Roxanne Weber - EzineArticles Expert Author

 


Semantic Web

Introduction

Semantic web as defined by the creator of the web Tim Berners-Lee is "a web of data, in some ways like a global database" (Berners-Lee, 1998). To elaborate further Mr. Berners-Lee explains in an interview held by IDG Now, data is expressed on computers as associated files with applications that deal specifically with information, an example would be, data in calendars, bank systems, spreadsheets, and database application. Looking at a web page, data is not clearly defined and not associated with any of the applications usually on computers. Semantic web will allow data to interact and connect together; it will bring on a common data format for all applications, for databases and web pages alike (Moon, 1999). Semantic web is not to build an artificial intelligence system which allows computers to understand what humans write on web pages; on the contrary, it is an attempt to make web pages more understandable and well-defined to support automatic extraction of data from within web content (Berners-Lee, 1998).

Analysis

The emergence of the web and the way HTML took off was driven by how society's needed to grew, from Internet chat to file transfer to high-end communities through blogs and wiki's. HTML was not limited to web content, knowledge base and help files adapted the language as a format to document software applications and provide training material. The revolution of technologies on the Internet allowed companies like Google to index pages; a thought that was very far away, says Tim Berners-Lee in his lecture at MIT. Web services have evolved to pave the road for distributed information and modular programming allowing interoperability among sites. Through XML, data in one site can be used by another using the common protocols and standards supported by both (Berners-Lee, 1998). XML defines schemas that deal with fields of data, what is required is a system that can tell the computer what sort of information (data) it can derive from within a page (Moon, 1999). With Web 3.0 a site will provide data that can be navigated through and extracted from multiple sites, this is a result of the fact that semantic web data model is closely related to a relational database where records of data share common fields that connect them together (Berners-Lee, 1998).

The solution provided to support semantic web is in the form of metadata that describes the data contained on web pages. Resource Description Framework (RDF) is a base to manage metadata; it is the ground that computers can use to exchange and interact with applications on the Web (W3C RFC, 1999). The applications for RDF include digital libraries, online catalogs, and indexing systems that are usually associated with content and content relationships models deployed in most web pages. With RDF data within business portals will be analyzed and identified as resources, properties, or statements transparent to the domain, further more, the specifications will merge with other documents to comprise a framework of classes. Classes organized as a hierarchy comprises a schema that can be reusable as metadata definitions along side multiple platforms. Resources created in this hierarchy can be identified using a resource identifier (URI), which enables a document given to a machine with this identification to be recognized by the system and triggers it to dig and find similar data (Berners-Lee, 1998).

Implications

Semantic web can be the solution to overpower the limitations of current information management systems in finding and extracting data from unorganized resources. RDF is meant to describe any data regardless of its character, location, source, or type, the concept of URI is richer to uniquely identify any object on the web (Berners-Lee, 1998). The pillars of Semantic web are standards and common protocols that are the bases for knowledge representation; HTML, RDF, the data language resource description web ontology language (OWL) that describes to the machine what is going on, in addition to RDF1 which is a query language to make inquiries among machines much easer, will all emerge and collaborate to bring in more to the web and more intelligent programs that will bring the Internet more closer (Cleave, 2004).

The current research and implementation of Abilene network and the Next Generation Internet (NGI) Internet 2 of high-performance backbone network linking major universities and research labs across the US, is a good foundation for what Semantic web can do, and represent the perfect platform for grid computing, digital libraries, virtual laboratories, and distance learning (Abilene, Internet2). Internet2 or I2 was developed by a group of universities in 1996 providing improved connectivity standards to reach 10gbps (gigabits per second). With more than 227 universities and libraries connected, network based applications and experimental programs can run on this network of high-bandwidth connection feeding on the latest technology of gigabit Ethernet and IP protocol version 6 (Reardon, 2004). Semantic web standards can be the base of material and data distributed on this network, providing the best test platform to explore the full potential and what can be achieved.

Conclusion

Tim Berners-Lee believes that with Web 3.0 we can succeed and fantastic things can happen, but the infrastructure need to be built, laws of privacy and security need to be revised and honored, further more, the web need to remain open for researchers to allow for continuous upgrade and development. Semantic web will kick off when individuals materialize the need to work on data processing, and think about collaborating their data, with company's information and that of the government (Moon, 1999).

References:

  1. Berners-Lee, Tim. 1998. Semantic Web Road map.W3C team. (14 October 1998) http://www.w3.org/ DesignIssues/Semantic (accessed 16 Jul 2007)
  2. Moon, Peter. 1999. The future of the Web as seen by its creator. IT World IDG Now (7 July 1999) http://www.itworld.com/Tech/4535/070709future/ (accessed 14 Jul 2007)
  3. W3C RFC. 1999. Resource Description Framework (RDF) Model and Syntax Specification. W3 Consortium (5 January 1999) http:// www.w3.org/TR/PR-rdf-syntax/ (accessed 20 Jul 2007)
  4. Cleave, Kenith Van. 2004. Regis University Database Practicum Experience. Regis University. (14 November 2004) http:// trackit.arn.regis.edu/dba/Thesis%2520Papers/

    kvancleave_2004Bfinalreport_20041118.pdf (accessed 16 Jul 2007)

  5. Abilene, Internet2. http://abilene.internet2.edu/about/ (accessed 17 Jul 2007)
  6. Reardon, Marguerite. 2004. Internet2: 2004 and beyond. CNET, News (24 August 2004) http:// news.com.com/2100-1034_3-5321053.html (accessed 19 Jul 2007)

A webmaster and a developer with 7 years in-the-field experience in web related technologies. As a certified Internet webmaster Have taught computer programming at New Horizons Computer learning center and worked as an Online Marketing manager and an IT development manager for several companies.

For more information visit: http://www.sallyahmed.com

 


Pages 
* About

Archives
    * February 2008
    * January 2008

Categories:
* Uncategorized

Last Updated:

regularban.info is proudly powered by WordPress MU running on  regularban.info.
Create a new blog and join in the fun!
Entries (RSS) and Comments (RSS).