Subscribe by Email


Showing posts with label Delete. Show all posts
Showing posts with label Delete. Show all posts

Sunday, June 23, 2013

Explain the various File Operations

A number of operations can be carried out on a file. However, there are 6 basic file operations. As we know a file is an ADT or abstract data type. Certain operations need to be considered for defining a file. Operating systems makes calls to these operations. 

Following are the six basic operations:

1. Creation of a file: 
- This operation involves two steps. 
- Firstly, a sufficient space has to be found for storing the file in the file system. - Secondly, for this new file an entry should be made in the directory.

2. Writing to a file: 
- For writing data to a file, a system call has to be made with name and the data to be written as its arguments. 
- A writer pointer is kept by the system at the location in the file where the next write operation is to be carried out. 
- This pointer is updated whenever a write operation occurs.

3. Reading from a file: 
- Just like the write operation, in order to read information from a file, a system call has to be generated along with the name of the file and the location of the content to be read as its arguments. 
- Here, instead of a write pointer there is a read pointer that will indicate the location where the next read operation is to take place. 
- The location at which the current operation is being carried out is kept as a “per – process current – file – position” pointer since the process is either writing to or reading from the file. 
- The same pointer can be used by both the read and write operations in order to reduce the complexity of the system as well as for saving space.

4. Re-positioning within a file: 
- System carries out search in the directory looking for the appropriate entry. 
When found, the current file position pointer is re-pointed to this position. 
This file operation does not require carrying out any input or output operation in actual. 
- Another name for this file operation is the file seek.

5. Deletion of a file: 
- For deletion of the file, the system searches through the directory to find the appropriate entry. 
- When found, the space held by this file is released and the entry in the directory is destroyed so that this space can be reused by other files.  

6. Truncating a file: 
- Sometimes you may require deleting only the contents of a file while keeping it attributes. 
- Deleting the file and recreating it is not an efficient solution. 
- This file operation lets you to erase the contents of the file but save its attributes.
- But here the length attribute of the file will be changed to zero after truncation. 
- The file space is released after truncating.


The above mentioned six basic file operations constitute the minimal file operations set. These operations are primary ones and if combined can perform some other secondary file operations such as copying. A table known as the open file table is maintained by the operating system that stores all the information about the files that are currently open. When the file is closed, its entry is deleted from the open file table. Some files have to be opened explicitly with the function open() before using it. The name of the file is passed as an argument to this function. Then it looks in the directory for this file and an entry is made in the open file table.  Each file has some access rights. It is in these access modes that a process uses the file. A process can perform only those operations which are permitted by the access rights of the file. 


Wednesday, March 14, 2012

What are major activities in database testing?

Before going to the main topic i.e., the major activities that are carried out in data base testing, we will first have an insight on what is data base testing actually.

WHAT IS DATABASE TESTING?

- Data base testing as it suggests itself, it is the testing of the data or values retrieved from the data base of that software system or application under testing.

- The retrieved data should match exactly with the data mentioned in the records of the data base.

- Data base testing is not an easy thing to carry out.

- It calls for a great need of expertise in reading the data base record tables, writing procedures and queries for the data base.

- Data base testing works well with all sorts of application softwares be it any application written either in SQL or Oracle languages.

- But normally, data base testing finds it way in the testing of applications that work with all sorts of sensitive data like finance, banking or health insurances etc.

- Such applications require extensive data base testing since any error in the retrieved data can cause the users lot to suffer.

MAJOR ACTIVITIES OF DATABASE TESTING
Now we are going to discuss about the working of the data base testing or what all are the major activities taking place in a data base testing.

- A lot of understanding and knowledge of the software system or application under the testing is required i.e., the tester needs to know all about the type of data base being used by the software system or application.

- All the existing data tables in the application data base are figured out.

- All the possible queries are written for the figured out tables to be executed.

- All the tables are tested individually for the verification and validation of the data contained in them.

- For complex data bases the queries are obtained from the developer and the functionalities are tested.

- The data base of a software system or application is indeed its back bone and needs to be tested thoroughly.

- In a data base testing not only the data base undergoes testing, but also the features and functionality of the software system or application.

- As if this is not enough, all the actions taking place like deletion or addition are also tested.

- The added values or data are checked against the records of the data base i.e., whether or not they are exactly same.

- The deleted is checked for whether or not it has been really deleted from the data base.

- Every action being performed is tested for its efficiency as it will affect the overall well being of the data base.

- These days with the introduction of the business logic, the data bases have become more complex.

- Though the business logic makes the whole data base complex in nature, it cannot be neglected since it plays a very crucial role in the implementation of the applications.

- After the implementation of the business rules or logic, the data base values are again checked for their correctness.

- The coupling of the data bases to the libraries also poses a problem for the data base testing besides the following:

1. Data base schemas
2. Data base tables
3. Verification of the data base after every execution of test cases.
4. Cleaning up of the data base for every new test case execution.
5. Carrying out the whole data base testing manually is absolutely impossible or perhaps a nightmare.
6. Writing short test codes that are easy to understand.

One needs to carry out data base testing very carefully and with understanding since any faltering can disrupt the whole testing process.


Facebook activity