Archive for the ‘Database’ Category

Page 1 of 212

Generating Random Data in Oracle

Most of the times, production data is not available in development environments. Here, I would like to share a single sql command which can generate random data. But before that, let's address another issue faced by a lot of new oracle users. We need to generate a sequence of numbers using a sql statement. This will generate a number sequence. ... Full story

Deleting Duplicate Rows in Oracle

Deleting Duplicate Rows in Oracle
Deleting duplicate rows from tables is one of the common task oracle developers come across. The data might get duplicated because of missing primary/unique key on the table or batch file getting loaded multiple times. Here I have tried to summarize different ways of deleting this duplicated data. Please note that this is not an extensive list ... Full story

Invisible Indexes in Oracle 11g

Invisible Indexes in Oracle 11g
The effective usage of an index is always a big question. There are instances in production environments, where an index may help the performance of just a single query, while it can degrade the performance of a number of queries. Always the Optimizer can’t guarantee the best suitable index required for the query in an environment ... Full story

Oracle Data Compression

Oracle Data Compression
As the data grows in relational databases (new business requirements, managing audit data etc), the cost associated with the disk systems to store that data and the resources required to manage them becomes vital. Oracle understands this requirement and it is continuously implementing and improving on the compression techniques and algorithms while simultaneously meeting the application scalability ... Full story

Understanding Primary Key(PK) Constraint in Oracle

Understanding Primary Key(PK) Constraint in Oracle
The Primary Key(PK) constraint is the most basic concept of any RDBMS (I am particularly interested in Oracle). Yet, I have noticed people getting confused when it comes to the practical usage and asking questions like: - I have disabled PK and now oracle is doing full table scan. - How PK constraints and indexes are related/different? - How ... Full story

Database Connection Pooling in Tomcat using Eclipse

Database Connection Pooling in Tomcat using Eclipse
Database Connection Pooling is a great technique used by lot of application servers to optimize the performance. Database Connection creation is a costly task thus it impacts the performance of application. Hence lot of application server creates a database connection pool which are pre initiated db connections that can be leverage to increase performance. Apache Tomcat ... Full story

Fast data copy with “Create Table Select From” in PL/SQL

Fast data copy with
Although I work mainly in Java/J2EE, recently I had a requirement in Oracle to take temporary backup of a table and compare the data of original table with this backup table. So I had to copy the data from table A to a temp table TA. First I tried creating temp table normally and copied the ... Full story

Fetch Random rows from Database (MySQL, Oracle, MS SQL, PostgreSQL)

Fetch Random rows from Database (MySQL, Oracle, MS SQL, PostgreSQL)
Ever thought why would one need to fetch random rows from a database table? You may want to display some random information (like articles/pages/links) to your user. I had a requirement wherein I had to fetch 10 random rows from MySQL database and display it on screen. I used following simple query for retrieving random records ... Full story

Full-Text Search using MySQL: Full-Text Search Capabilities

Full-Text Search using MySQL: Full-Text Search Capabilities
Have you ever thought how does the search functionality is implemented in all the websites! Most of the internet blogs and websites are powered by MySQL database. MySQL provides a wonderful way (Full-text Search) of implementing a little search engine in your website. All you have to do is to have MySQL 4.x and above. MySQL ... Full story

Generating Tag cloud with PHP and MySQL

Generating Tag cloud with PHP and MySQL
The basic idea this time is to present a way to form a tag cloud from user input text and text entered in the past. A tag cloud is a visual depiction of user-generated tags, or simply the word content of a site, used typically to describe the content of web sites. for this we will create an HTML form that will accept user text & also ... Full story
Page 1 of 212
Copyright © 2010 ViralPatel.net. All rights reserved.