Month: March 2014

Friend Function

Posted on



class greater



int no1,no2,no3;

public :







greater(int x,int y,int z)






friend int larger(greater &);


int larger(greater &g)


if(g.no1>g.no2 && g.no1>g.no3)

return g.no1;

else if(g.no2>g.no1 && g.no2>g.no3)

return g.no2;


return g.no3;


void main()


greater g(45,66,56);

cout<<“greater no is “<<larger(g);




Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:

Using 2D Array

Posted on




void main(){


int a[10][10],i,j,sum=0,m,n;


cout<<“\nEnter the row and column of matrix: “;




cout<<“\nEnter the elements of matrix: “;




cout<<“\nThe matrix is\n”;














cout<<“\n\nSum of the diagonal elements of a matrix is: “<<sum;




Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:


Using XSL

Posted on Updated on

To run this application we have to create to file one is xml and another xsl.


<?xml version =”1.0″?><?xml:stylesheet type=”text/xsl” href=”fourth.xsl”?>

<!DOCTYPE firstxsl SYSTEM “first.dtd”>



<heading> stylesheet </heading>

<body> learning xml </body>




<?xml version=”1.0″?><xsl:stylesheet xmlns:xsl=”; result-ns=”html”>

<xsl:template match=”/”>



<xsl:template match=”*”>



<xsl:template match=”text()”>

<xsl:value-of select=”.”/>


<xsl:template match=”first”>


<font color=”red”>

<xsl:apply-templates select=”heading”/>



<font color=”green”>

<xsl:apply-templates select=”body”/>




E. F. Codd’s 12 rules

Posted on

  • · Foundation Rule – A relational database management system must manage its stored data using only its relational capabilities.
  • · Information Rule – All information in the database should be represented in one and only one way – as values in a table.
  • · Guaranteed Access Rule – Each and every datum (atomic value) is guaranteed to be logically accessible by resorting to a combination of table name, primary key value and column name.
  • · Systematic Treatment of Null Values – Null values (distinct from empty character string or a string of blank characters and distinct from zero or any other number) are supported in the fully relational DBMS for representing missing information in a systematic way, independent of data type.
  • Dynamic On-line Catalog Based on the Relational Model – The database description is represented at the logical level in the same way as ordinary data, so authorized users can apply the same relational language to its interrogation as they apply to regular data.
  • · Comprehensive Data Sublanguage Rule – A relational system may support several languages and various modes of terminal use. However, there must be at least one language whose statements are expressible, per some well-defined syntax, as character strings and whose ability to support all of the following is comprehensible:
  1. data definition
  2. view definition
  3. data manipulation (interactive and by program)
  4. integrity constraints
  5. authorization
  6. Transaction boundaries (begin, commit, and rollback).


  • · View Updating Rule – All views that are theoretically updateable are also updateable by the system.
  • ·  High-level Insert, Update, and Delete – The capability of handling a base relation or a derived relation as a single operand applies nor only to the retrieval of data but also to the insertion, update, and deletion of data.
  • · Physical Data Independence – Application programs and terminal activities remain logically unimpaired whenever any changes are made in either storage representation or access methods.
  • · Logical Data Independence – Application programs and terminal activities remain logically unimpaired when information preserving changes of any kind that theoretically permit unimpairment are made to the base tables.
  • · Integrity Independence – Integrity constraints specific to a particular relational database must be definable in the relational data sublanguage and storable in the catalog, not in the application programs.
  • · Distribution Independence – The data manipulation sublanguage of a relational DBMS must enable application programs and terminal activities to remain logically unimpaired whether and whenever data are physically centralized or distributed.
  • · Nonsubversion Rule – If a relational system has or supports a low-level (single-record-at-a-time) language, that low-level language cannot be used to subvert or bypass the integrity rules or constraints expressed in the higher-level (multiple-records-at-a-time) relational language.

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:


Posted on Updated on

  • A file is a collection of data stored in a disk with a specific name and a directory path. When a file is opened for reading or writing, it becomes a stream.
  •  The stream is basically the sequence of bytes passing through the communication path. There are two main streams: the input stream and the output stream.
  • The input stream is used for reading data from file (read operation) and the output stream is used for writing into the file (write operation).
  •  The System.IO namespace has various classes that are used for performing various operations with files, like creating and deleting files, reading from or writing to a file, closing a file, etc.
  • The following table shows some commonly used non-abstract classes in the System.IO namespace:

I/O Class



Reads primitive data from a binary stream.


Writes primitive data in binary format.


A temporary storage for a stream of bytes.


Helps in manipulating a directory structure.


Used for performing operations on directories.


Provides information for the drives.


Helps in manipulating files.


Used for performing operations on files.


Used to read from and write to any location in a file.


Used for random access of streamed data stored in memory.


Performs operations on path information.


Used for reading characters from a byte stream.


Is used for writing characters to a stream.


Is used for reading from a string buffer.


Is used for writing into a string buffer.



  • The FileStream class in the System.IO namespace helps in reading from, writing to and closing files. This class derives from the abstract class Stream.
  •    To create a FileStream object to create a new file or open an existing files. The syntax for creating a FileStream object is as follows:


Dim <object_name> As FileStream = New FileStream(<file_name>, <FileMode Enumerator>, <FileAccess Enumerator>, <FileShare Enumerator>)
  • For example, for creating a FileStream object F for reading a file named sample.txt:
Dim f1 As FileStream = New FileStream("test.dat", FileMode.OpenOrCreate, FileAccess.ReadWrite)

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:


Posted on

  •  Data structure is an arrangement of data in a computer’s memory or even disk storage. An example of several common data structures are arrays, linked lists, queues, stacks, binary trees, and hash tables.
  • Algorithms, on the other hand, are used to manipulate the data contained in these data structures as in searching and sorting.
  •  Many algorithms apply directly to a specific data structures. When working with certain data structures you need to know how to insert new data, search for a specified item, and deleting a specific item.
  •  Commonly used algorithms include are useful for:
  •   Searching for a particular data item (or record).
  •  Sorting the data. There are many ways to sort data, i.e. simple sorting and Advanced sorting.
  •  Iterating through all the items in a data structure. (Visiting each item in turn so as to display it or perform some other action on these.)


Data Structure Advantages Disadvantages
Array Quick inserts
Fast access if index known
Slow search
Slow deletes
Fixed size
Ordered Array Faster search than unsorted array Slow inserts
Slow deletes
Fixed size
Stack Last-in, first-out acces Slow access to other items
Queue First-in, first-out access Slow access to other items
Linked List Quick inserts
Quick deletes
Slow search
Binary Tree Quick search
Quick inserts
Quick deletes
(If the tree remains balanced)
Deletion algorithm is complex
Red-Black Tree Quick search
Quick inserts
Quick deletes
(Tree always remains balanced)
Complex to implement
2-3-4 Tree Quick search
Quick inserts
Quick deletes
(Tree always remains balanced)
(Similar trees good for disk storage)
Complex to implement
Hash Table Very fast access if key is known
Quick inserts
Slow deletes
Access slow if key is not known
Inefficient memory usage
Heap Quick inserts
Quick deletes
Access to largest item
Slow access to other items
Graph Best models real-world situations Some algorithms are slow and very complex

Posted By -Vissicomp Technology Pvt. Ltd.

Website -:

Data Warehousing – Security

Posted on

  •  The objective data warehouse is to allow large amount of data to be easily accessible by the users. Hence allowing user to extract the information about the business as a whole. But we know that there could be some security restrictions applied on the data which can prove an obstacle for accessing the information. If the analyst has the restricted view of data then it is impossible to capture a complete picture of the trends within the business.
  • The data from each analyst can be summarised and passed onto management where the different summarise can be created. As the aggregations of summaries cannot be same as that of aggregation as a whole so It is possible to miss some information trends in the data unless someone is analysing the data as a whole.

Factor to Consider for Security requirements

  • The following are the parts that are affected by the security hence it is worth consider these factors.
  • User Access
  • Data Load
  • Data Movement
  • Query Generation


  • Adding the security will affect the performance of the data warehouse, therefore it is worth determining the security requirements early as possible. Adding the security after the data warehouse has gone live, is very difficult.
  •  During the design phase of data warehouse we should keep in mind that what data sources may be added later and what would be the impact of adding those data sources. We should consider the following possibilities during the design phase.
  • Whether the new data sources will require new security and/or audit restrictions to be implemented?
  • Whether the new users added who have restricted access to data that is already generally available?
  • This situation arises when the future users and the data sources are not well known. In such a situation we need to use the knowledge of business and the objective of data warehouse to know likely requirements.


Vissicomp Technology Pvt. Ltd.

Website -: