Showing posts with label advance database management system. Show all posts

What are the characteristics of data in database?

Following are the characteristics of Data in a database:
  • Shared : Date in a database is shared among different users and applications. 
  • Persistence: Data in a database exist permanently in the sense, the data can live beyond the scope of the process that created it. 
  • Validity/Integrity/Correctness: Data should be correct with respect to the real world entity that they represent. 
  • Security: Data should be protected from unauthorized access. 
  • Consistency: Whenever more than one data element in a database represents related real-world values, the values should be consistent with respect to the relationship. 
  • Non-redundancy: No two data items in a database should represent the same real-world entity. 
  • Independence: The three levels in the schema (internal, conceptual and external) should be independent of each other so that the changes in the schema at one level should not affect the other levels.
Learn more »

What are the characteristics of modern DBMS?

database management system stores data in such a way that it becomes easier to retrieve, manipulate, and produce information.

Characteristics

Traditionally, data was organized in file formats. DBMS was a new concept then, and all the research was done to make it overcome the deficiencies in traditional style of data management. A modern DBMS has the following characteristics −
  • Real-world entity − A modern DBMS is more realistic and uses real-world entities to design its architecture. It uses the behavior and attributes too. For example, a school database may use students as an entity and their age as an attribute.
  • Relation-based tables − DBMS allows entities and relations among them to form tables. A user can understand the architecture of a database just by looking at the table names.
  • Isolation of data and application − A database system is entirely different than its data. A database is an active entity, whereas data is said to be passive, on which the database works and organizes. DBMS also stores metadata, which is data about data, to ease its own process.
  • Less redundancy − DBMS follows the rules of normalization, which splits a relation when any of its attributes is having redundancy in values. Normalization is a mathematically rich and scientific process that reduces data redundancy.
  • Consistency − Consistency is a state where every relation in a database remains consistent. There exist methods and techniques, which can detect attempt of leaving database in inconsistent state. A DBMS can provide greater consistency as compared to earlier forms of data storing applications like file-processing systems.
  • Query Language − DBMS is equipped with query language, which makes it more efficient to retrieve and manipulate data. A user can apply as many and as different filtering options as required to retrieve a set of data. Traditionally it was not possible where file-processing system was used.
  • ACID Properties − DBMS follows the concepts of Atomicity,Consistency, Isolation, and Durability (normally shortened as ACID). These concepts are applied on transactions, which manipulate data in a database. ACID properties help the database stay healthy in multi-transactional environments and in case of failure.
  • Multiuser and Concurrent Access − DBMS supports multi-user environment and allows them to access and manipulate data in parallel. Though there are restrictions on transactions when users attempt to handle the same data item, but users are always unaware of them.
  • Multiple views − DBMS offers multiple views for different users. A user who is in the Sales department will have a different view of database than a person working in the Production department. This feature enables the users to have a concentrate view of the database according to their requirements.
  • Security − Features like multiple views offer security to some extent where users are unable to access data of other users and departments. DBMS offers methods to impose constraints while entering data into the database and retrieving the same at a later stage. DBMS offers many different levels of security features, which enables multiple users to have different views with different features. For example, a user in the Sales department cannot see the data that belongs to the Purchase department. Additionally, it can also be managed how much data of the Sales department should be displayed to the user. Since a DBMS is not saved on the disk as traditional file systems, it is very hard for miscreants to break the code.
Learn more »

Explain the difference between Hash indexes and B+-tree indexes. In particular, discuss how equality and range searches work, using an example.


A Hash index is constructed by using a hashing function that quickly maps an search key value to a specific location in an array-like list of elements called buckets. The buckets are often constructed such that there are more bucket locations than there are possible search key values, and the hashing function is chosen so that it is not often that two search key values hash to the same bucket. A B+-tree index is constructed by sorting the data on the search key and maintaining a hierarchical search data structure that directs searches to the correct page of data entries.

Insertions and deletions in a hash based index are relatively simple. If two search values hash to the same bucket, called a collision, a linked list is formed connecting multiple records in a single bucket. In the case that too many of these collisions occur, the number of buckets is increased. Alternatively, maintaining a B+-tree’s hierarchical search data structure is considered more costly since it must be updated whenever there are insertions and deletions in the data set. In general, most insertions and deletions will not modify the data structure severely, but every once in awhile large portions of the tree may need to be rewritten when they become over-filled or under-filled with data entries.

Hash indexes are especially good at equality searches because they allow a record look up very quickly with an average cost of 1.2 I/Os. B+-tree indexes, on the other hand, have a cost of 3-4 I/Os per individual record lookup. Assume we have the employee relation with primary key eid and 10,000 records total. Looking up all the records individually would cost 12,000 I/Os for Hash indexes, but 30,000-40,000 I/Os for B+- tree indexes.

For range queries, hash indexes perform terribly since they could conceivably read as many pages as there are records since the data is not sorted in any clear grouping or set. On the other hand, B+-tree indexes have a cost of 3-4 I/Os plus the number of qualifying pages or tuples, for clustered or unclustered B+-trees respectively. Assume we have the employees example again with 10,000 records and 10 records per page. Also assume that there is an index on sal and query of age ¿ 20,000, such that there are 5,000 qualifying tuples. The hash index could cost as much as 100,000 I/Os since every page could be read for every record. It is not clear with a hash index how we even go about searching for every possible number greater than 20,000 since decimals could be used. An unclustered B+-tree index would have a cost of 5,004 I/Os, while a clustered B+-tree index would have a cost of 504 I/Os. It helps to have the index clustered whenever possible. 
Learn more »

What is the difference between a webserver and an application server? What funcionality do typical application servers provide?

A web server handles the interaction with the client’s web browser. Application servers are used to maintain a pool of processes for handling requests. Typically, they are the middleware tier between the web server and the data sources such as database systems. Application servers eliminate the problems with process- creation overload and can also provide extra functionality like abstracting away heterogeneous data sources and maintaining session state information.



When is an XML document well-formed? When is an XML document valid? 

An XML document is valid if it has an associated DTD and the document follows the rules of the DTD. An XML document is well-formed if it follows three guide- lines: 
  1.  it starts with an XML declaration, 
  2. it contains a root element that contains all other elements and 
  3. all elements are properly nested. 
Learn more »

What is CGI? Why was CGI introduced? What are the disadvantages of an architecture using CGI scripts?


CGI (Common Gateway Interface) specifies how the web server communicates other programs on the server. CGI programs are used to pass HTML form data to other programs that process that data. Each page request will create a new process on the server, which is a performance issue when requests are scaled up. 
Learn more »

Discuss the strengths and weaknesses of the trigger mechanism. Con- trast triggers with other integrity constraints supported by SQL.


A trigger is a procedure that is automatically invoked in response to a specified change to the database. The advantages of the trigger mechanism include the ability to perform an action based on the result of a query condition. The set of actions that can be taken is a superset of the actions that integrity constraints can take (i.e. report an error). Actions can include invoking new update, delete, or insert queries, perform data definition statements to create new tables or views, or alter security policies. Triggers can also be executed before or after a change is made to the database (that is, use old or new data).

There are also disadvantages to triggers. These include the added complexity when trying to match database modifications to trigger events. Also, integrity constraints are incorporated into database performance optimization; it is more difficult for a database to perform automatic optimization with triggers. If database consistency is the primary goal, then integrity constraints offer the same power as triggers. Integrity constraints are often easier to understand than triggers. 
Learn more »

Explain the following terms briefly: attribute, domain, entity, relationship, entity set, relationship set, one-to-many relationship, many-to-many relationship, participation constraint, overlap constraint, covering constraint, weak entity set, aggregation, and role indicator.

Attribute - a property or description of an entity. A toy department employee entity could have attributes describing the employee’s name, salary, and years of service.

Domain - a set of possible values for an attribute.

Entity - an object in the real world that is distinguishable from other objects such as the green dragon toy. Relationship - an association among two or more entities.

Entity set - a collection of similar entities such as all of the toys in the toy department.

Relationship set - a collection of similar relationships

One-to-many relationship - a key constraint that indicates that one entity can be associated with many of another entity. An example of a one-to-many relationship is when an employee can work for only one department, and a department can have many employees.

Many-to-many relationship - a key constraint that indicates that many of one entity can be associated with many of another entity. An example of a manyto-many relationship is employees and their hobbies: a person can have many different hobbies, and many people can have the same hobby.

Participation constraint - a participation constraint determines whether relationships must involve certain entities. An example is if every department entity has a manager entity. Participation constraints can either be total or partial. A total participation constraint says that every department has a manager. A partial participation constraint says that every employee does not have to be a manager.

Overlap constraint - within an ISA hierarchy, an overlap constraint determines whether or not two subclasses can contain the same entity.

Covering constraint - within an ISA hierarchy, a covering constraint determines where the entities in the subclasses collectively include all entities in the superclass. For example, with an Employees entity set with subclasses HourlyEmployee and SalaryEmployee, does every Employee entity necessarily have to be within either HourlyEmployee or SalaryEmployee?

Weak entity set - an entity that cannot be identified uniquely without considering some primary key attributes of another identifying owner entity. An example is including Dependent information for employees for insurance purposes.

Aggregation - a feature of the entity relationship model that allows a relationship set to participate in another relationship set. This is indicated on an ER diagram by drawing a dashed box around the aggregation.

Role indicator - If an entity set plays more than one role, role indicators describe the different purpose in the relationship. An example is a single Employee entity set with a relation Reports-To that relates supervisors and subordinates.
Learn more »

What are the advantages of using oracle over other databases?

There are several advantages of using ORACLE database over other database. The most important things are, 
  • It does all the functionality like other database. User can create, delete, update, manage database; assign privileges; assign roles; security and backup and recovery.
  • It provides both enterprise level products, patches, security and support as well as open source resources. 

Customer Satisfaction

  • One advantage of using Oracle databases is due to Oracles belief in customer satisfaction. For example, all Oracle databases are backward compatible. This allows businesses to upgrade their systems without a complete overhaul of their database system. This provides efficient and low-cost updates. In addition, new versions of Oracle databases provide new features while keep the popular features from older versions. This ensures that their product is based on the customer's function rather than what is cost-effective for Oracle.

Functionality

  • Oracle databases are used for practically all corporation level applications. Thus, Oracle databases dominate the banking industry. Ten of the world's top banks use Oracle databases to conduct their business. This is primarily due to Oracle's functionality. They provide a combination of high-level technology and integrated business solutions. This is a perfect for practically all corporations that have huge amounts of data to store and access.

Reliability
  • Another important advantage offered by Oracle databases are their reliability. Oracle is a database that delivers excellent performance when challenged with demanding tasks. The ACID test, which is an important tool used to ensure the integrity of data stored, was easily passed by Oracle databases. This test is important since reliable data storage is the main purpose of a database. Thus, Oracle databases have been proven to deliver high integrity of data storage.

Flashback Technology

  • Oracle databases incorporate Flashback technology, which is a significant advantage. In the event of an application outage, due to any number of reasons, it is important not to lose data stored on a database system. Oracle's Flashback technology allows for efficient recovery of data incorrectly deleted or lost. Thus, Flashback technology essentially removes human error and increases database recovery time. In the end, this feature allows for a simplified management and administrative process.

Other Advantages

  • Oracle databases have also successfully featured the four properties that all database systems must have. These four properties are atomicity, consistency, isolation and durability. All four of the properties are well maintained by Oracle databases, thus providing a reliable and competent database system.
Learn more »

Discuss the ACID properties of a database transaction with suitable example.

There are four properties of database. They are as follows:

Atomicity

Atomicity refers to the ability of the database to guarantee that either all of the tasks of a transaction are performed or none of them are. Database modifications must follow an all or nothing rule. Each transaction is said to be atomic if when one part of the transaction fails, the entire transaction fails.

Consistency

The consistency property ensures that the database remains in a consistent state before the start of the transaction and after the transaction is over (whether successful or not). For example, in a storefront there is an inconsistent view of what is truly available for purchase if inventory is allowed to fall below 0, making it impossible to provide more than an intent to complete a transaction at checkout time. An example in a double-entry accounting system illustrates the concept of a true transaction. Every debit requires an associated credit. Both of these happen or neither happen.
A distributed data system is either strongly consistent or has some form of weak consistency. Once again, using the storefront example, a database needs to provide consistency and isolation, so that when one customer is reducing an item in stock and in parallel is increasing the basket by one, this is isolated from another customer who will have to wait while the data store catches up. At the other end of the spectrum is BASE (Basically Available Soft-state Eventual consistency).
Weak consistency is sometimes referred to as eventual consistency, the database eventually reaches a consistent state. Weak consistency systems are usually ones where data is replicated; the latest version is sitting somewhere in the cluster, older versions are still out there. Eventually all nodes will see the latest version.

Isolation

Isolation refers to the requirement that other operations cannot access or see the data in an intermediate state during a transaction. This constraint is required to maintain the performance as well as the consistency between transactions in a database. Thus, each transaction is unaware of another transactions executing concurrently in the system.

Durability

Durability refers to the guarantee that once the user has been notified of success, the transaction will persist, and not be undone. This means it will survive system failure, and that the database system has checked the integrity constraints and won't need to abort the transaction. Many databases implement durability by writing all transactions into a transaction log that can be played back to recreate the system state right before a failure. A transaction can only be deemed committed after it is safely in the log.
Durability does not imply a permanent state of the database. Another transaction may overwrite any changes made by the current transaction without hindering durability.
Learn more »

What do you mean by spatial Database? Explain with its architecture


Definition
A spatial database is a database that is optimized to store and query data that represents objects defined in a geometric space. Most spatial databases allow representing simple geometric objects such as points, lines and polygons. Some spatial databases handle more complex structures such as 3D objects, topological coverage’s, linear networks etc.

Examples of Spatial Database data
·      geographic space - GIS, LIS, urban planning, ...
·      the universe-astronomy
·      a VLSI design
·      a model of the brain (or someone's brain) - medicine
·      a molecule structure

Characteristics of spatial databases
·      A spatial database system is a database system.
·      It offers spatial data types (SDTs) in its data model and query language.
·      It supports spatial data types in its implementation, providing at least spatial indexing and efficient algorithms for spatial join.
·      Spatial databases use a spatial index to speed up database operations.


Architecture of Spatial Database Management System

The above figure illustrates architecture of SDBMS on top of an ORDBMS (Object Relational DBMS). This is three-layer architecture.
1.     Spatial Application: This is the top layer. It does not interact with the ORDMBS but goes through a middle layer called spatial database.
2.     Spatial Database: This is the middle layer. The middle layer is where mot of available spatial domain knowledge is encapsulated and the layer is plugged into the OR-DBMS.
3.     ORDBMS- It is object relational Database and hence deals with entity, objects etc.
Learn more »

Important questions related to Advanced Database Mangement System.


ADBMS
1.     What do you mean by database? What are different types of database? Write its advantages and disadvantages over file systems?
2.     What do you understand by Concurrency Control? Explain with example.
3.     What is transaction in database? Explain properties of transaction. Explain several states of transaction with a suitable block diagram.
4.     What do you mean by Performance Tuning in database? Write its detailed procedures for performance tuning.
5.     What do you understand by distributed relational model? How does it differ from relational model?
6.     What are the database security considerations? Explain with suitable examples.
7.     Differentiate between user defined abstract data types and structured types. How does super classes and sub classes different?
8.     Explain specialization and generalization with suitable examples.
9.     What do you mean by active database? Explain its characteristics.
10. Explain the concept of temporal database.
11.  What do you mean by spatial database? Explain its concepts, architecture and importance. 
12.  What do you mean by query processing? Explain query optimization methods with suitable examples.
13. What is GIS? Explain its importance, examples and advantages.
14.  What is data warehouse? Explain its characteristics and architecture.
15.  What do you mean by data mining? How is it useful in real world? What are the steps involved in data mining?
16. What do you mean by multimedia database? What are the types of data involved in multimedia database?
17.  Differentiate between object oriented database concepts and object relational database concepts.
18. What do you mean by Web Services? Explain the importance of XML with examples.
19.  What do you understand by mobile database? Explain mobile architecture with examples.
20.  What do you understand by transient data and persistent data? Explain with example.
Learn more »

What are different types of DBMS?

Different Types of database Management System

The DBMS can be classified according to the number of users and the database site locations. These are:

On the basis of the number of users:
  • Single-user DBMS
  • Multi-user DBMS
 
On the basis of the site location
 
  • Centralized DBMS
  • Parallel DBMS
  • Distributed DBMS
  • Client/server DBMS
The DBMS can be  multi-user or single-user. The configuration of the hardware and also the size of the organization can confirm whether or not it's a multi-user system or one user system.

In single user system the information resides on one laptop and is just accessed by one user at a time. This one user could style, maintain, and write information programs.

Due to great deal of information management most systems square measure multi-user. during this state of affairs the information square measure each integrated and shared. A information is integrated once identical data isn't recorded in 2 places. as an example, each the Library department and also the Account department of the school information may have student addresses. despite the fact that each departments could access completely different parts of the information, the students' addresses ought to solely reside in one place. it's the work of the DBA to form positive that the software package makes the proper addresses out there from one central enclosure.

Centralized Database System

The centralized DBMS system consists of one processor along side its associated knowledge storage devices and alternative peripherals. it's physically confined to one location. knowledge will be accessed from the multiple websites with the employment of a electronic network whereas the info is maintained at the central site.
                   centralized database system consists of a single processor

Disadvantages of Centralized Database System

  • When the central site computer or database system goes down, then every one (users) is blocked from using the system until the system comes back.
  • Communication costs from the terminals to the central site can be expensive.

Parallel Database System

Parallel information system design consists of a multiple Central process Units (CPUs) and information storage disk in parallel. Hence, they improve process and Input/Output (I/O) speeds. Parallel information systems area unit utilized in the appliance that ought to question extraordinarily giant databases or that ought to method a particularly sizable amount of transactions per second.

Advantages of a Parallel Database System

  • Parallel database systems are very useful for the applications that have to query extremely large databases (of the order of terabytes, for example, 1012 bytes) or that have to process an extremely large number of transactions per second (of the order of thousands of transactions per second).
  • In a parallel database system, the throughput (that is, the number of tasks that can be completed in a given time interval) and the response time (that is, the amount of time it takes to complete a single task from the time it is· submitted) are very high.

Disadvantages of a Parallel Database System

  • In a parallel database system, there· is a startup cost associated with initiating a single process and the startup-time may overshadow the actual processing time, affecting speedup adversely.
  • Since process executing in a parallel system often access shared resources, a slowdown may result from interference of each new process as it completes with existing processes for commonly held resources, such as shared data storage disks, system bus and so on.

Distributed Database System

A logically interrelated collection of shared data physically distributed over a computer network is called as distributed database and the software system that permits the management of the distributed database and makes the distribution transparent to users is called as Distributed DBMS.
 
It consists of a single logical database that is split into a number of fragments. Each fragment is stored on one or more computers under the control of a separate DBMS, with the computers connected by a communications network. As shown, in distributed database system, data is spread across a variety of different databases. These are managed by a variety of different DBMS software running on a variety of different operating systems. These machines are spread (or distributed) geographically and connected together by a variety of communication networks.
                         logically interrelated collection of shared data physically distributed over a computer network is called as distributed database

Advantages of Distributed Database System

 
• Distributed database architecture provides greater efficiency and better performance.
• A single database (on server) can be shared across several distinct client (application) systems.
• As data volumes and transaction rates increase, users can grow the system incrementally.
• It causes less impact on ongoing operations when adding new locations.
• Distributed database system provides local autonomy.
 

Disadvantages of Distributed Database System

 
• Recovery from failure is more complex in distributed database systems than in centralized systems.

Client-Server DBMS

Client/Server architecture of database system has two logical components namely client, and server. Clients are generally personal computers or workstations whereas server is large workstations, mini range computer system or a mainframe computer system. The applications and tools of DBMS run on one or more client platforms, while the DBMS soft wares reside on the server. The server computer is caned backend and the client's computer is called front end. These server and client computers are connected into a network. The applications and tools act as clients of the DBMS, making requests for its services. The DBMS, in turn, processes these requests and returns the results to the client(s). Client/Server architecture handles the Graphical User Interface (GUI) and does computations and other programming of interest to the end user. The server handles parts of the job that are common to many clients, for example, database access and updates.

Multi-Tier client server computing models

In a single-tier system the database is centralized, which means the DBMS Software and the data reside in one location and the dumb terminals were used to access the DBMS as shown.
                 single-tier system the database is centralized
The rise of personal computers in businesses during the 1980s, the increased reliability of networking hardware causes Two-tier and Three-tier systems became common. In a two-tier system, different software is required for the server and for the client. Illustrates the two-tier client server model. At the early stages client server computing model was called two-tier-computing model in which client is considered as data capture and validation tier and Server was considered as data storage tier. This scenario is depicted.

Problems of two-tier architecture

 
The need of enterprise scalability challenged this traditional two-tier client-server model. In the mid-1990s, as application became more complex and could be deployed to hundreds or thousands of end-users, the client side, now undergoes with following problems:
                     two-tier client-server model
• A' fat' client requiring considerable resources on client's computer to run effectively. This includes disk space, RAM and CPU.
• Client machines require administration which results overhead.

Three-tier architecture

By 1995, three-tier architecture appears as improvement over two-tier architecture. It has three layers, which are:
 
First Layer: User Interface which runs on end-user's computer (the client) .

Second Layer: Application Server It is a business logic and data processing layer. This middle tier runs on a server which is called as Application Server.

Third Layer: Database Server It is a DBMS, which stores the data required by the middle tier. This tier may run on a separate server called the database server.
As, described earlier, the client is now responsible for application's user interface, thus it requires less computational resources now clients are called as 'thin client' and it requires less maintenance.

Advantages of Client/Server Database System

  1. Client/Server system has less expensive platforms to support applications that had previously been running only on large and expensive mini or mainframe computers
  2. Client offer icon-based menu-driven interface, which is superior to the traditional command-line, dumb terminal interface typical of mini and mainframe computer systems.
  3. Client/Server environment facilitates in more productive work by the users and making better use of existing data.Client/Server database system is more flexible as compared to the Centralized system
  4. Client/Server database system is more flexible as compared to the Centralized system.
  5. Response time and throughput is high.
  6. The server (database) machine can be custom-built (tailored) to the DBMS function and thus can provide a better DBMS performance.
  7. The client (application database) might be a personnel workstation, tailored to the needs of the end users and thus able to provide better interfaces, high availability, faster responses and overall improved ease of use to the user. + A single database (on server) can be shared across several distinct client (application) systems.

Disadvantages of Client/Server Database System

  1. Programming cost is high in client/server environments, particularly in initial phases.
  2. There is a lack of management tools for diagnosis, performance monitoring and tuning and security control, for the DBMS, client and operating systems and networking environments.
Learn more »

What are the advantages and disadvantages of database management system?

Advantages of DBMS

The management system has promising potential blessings, that square measure explained below:

1. dominant Redundancy: In filing system, every application has its own non-public files, that can't be shared between multiple applications. 1:his will typically result in substantial redundancy within the keep knowledge, which ends up in wastage of cupboard space. By having centralized information most of this will be avoided. it's unimaginable that each one redundancy ought to be eliminated. generally there square measure sound business and technical reasons for· maintaining multiple copies of identical knowledge. in a very information system, but this redundancy are often controlled.

For example: just in case of school information, there is also the quantity of applications like General workplace, Library, Account workplace, Hostel etc. every of those applications could maintain the subsequent info into own non-public file applications:

It is clear from the higher than file systems, that there's some common knowledge of the coed that has got to be mentioned in every application, like Rollno, Name, Class, Phone_No~ Address etc. this may cause the matter of redundancy which ends up in wastage of cupboard space and tough to take care of, however just in case of centralized information, knowledge are often shared by range of applications and therefore the whole school will maintain its computerised knowledge with the subsequent database:

                        

It is clear within the higher than information that Rollno, Name, Class, Father_Name, Address,

Phone_No, Date_of_birth that square measure keep repeatedly in filing system in every application, needn't be keep repeatedly just in case of information, as a result of each different application will access this info by connection of relations on the premise of common column i.e. Rollno. Suppose any user of Library system want the Name, Address of any explicit student and by connection of Library and General workplace relations on the premise of column Rollno he/she will simply retrieve this info.

Thus, we will say that centralized system of package reduces the redundancy of information to nice extent however cannot eliminate the redundancy as a result of RollNo continues to be recurrent all told the relations.

2. Integrity are often enforced:
Integrity {of knowledge|of knowledge|of information} means data in information is often correct, specified propaganda can't be keep in information. so as to take care of the integrity of information, some integrity constraints square measure implemented on the information. A package ought to give capabilities for outlining and implementing the constraints.

For Example: allow us to take into account the case {of school|of school|of faculty} information and suppose that college having solely BTech, MTech, MSc, BCA, BBA and BCOM categories. But if a \.,ser enters the category MCA, then this propaganda should not be keep in information ANd should be prompted that this can be an invalid knowledge entry. so as to enforce this, the integrity constraint should be applied to the category attribute of the coed entity. But, just in case of filing system tins constraint should be implemented on all the applying individually (because all applications have a category field).

In case of package, this integrity constraint is applied just the once on the category field of the

General workplace (because category field seems just the once within the whole database), and every one different applications can get the category info regarding the coed from the final workplace table that the integrity constraint is applied to the full information. So, we will conclude that integrity constraint are often simply implemented in centralized package system as compared to filing system.

3. Inconsistency are often avoided : once identical knowledge is duplicated and changes square measure created at one web site, that isn't propagated to the opposite web site, it offers rise to inconsistency and therefore the 2 entries relating to identical knowledge won't agree. At such times the info is alleged to be inconsistent. So, if the redundancy is removed probabilities of getting inconsistent knowledge is additionally removed.

Let us once more, take into account the faculty system and suppose that just in case of General_Office file

it is indicated that Roll_Number five lives in Amritsar however in library file it's indicated that

Roll_Number five lives in Jalandhar. Then, this can be a state at that tIle 2 entries of identical object don't consider {each different|one another} (that is one is updated and other is not). At such time the information is alleged to be inconsistent.

An inconsistent information is capable of supply incorrect or conflicting info. thus there ought to be no inconsistency in information. It are often clearly shown that inconsistency are often avoided in centralized system alright as compared to filing system ..

Let us take into account once more, the instance of school system and suppose that RollNo five is .shifted from Amritsar to Jalandhar, then address info of Roll range five should be updated, whenever Roll range and address happens within the system. just in case of filing system, the data should be updated individually in every application, however if we tend to build updation solely at 3 places and forget to create updation at fourth application, then the full system show the inconsistent results regarding Roll range five.

In case of package, Roll range and address happens along solely single time in General_Office table. So, it wants single updation {and then|then|so|and thus} AN different application retrieve the address info from General_Office that is updated so, all application can get this and latest info by providing single update operation and this single update operation is propagated to the full information or all different application mechanically, this property is termed as Propagation of Update.

We can say the redundancy of information greatly have an effect on the consistency of information. If redundancy is a smaller amount, it's simple to implement consistency of information. Thus, package system will avoid inconsistency to nice extent.

4. knowledge are often shared: As explained earlier, the info regarding Name, Class, Father a reputation etc. of General_Office is shared by multiple applications in centralized package as compared to filing system thus currently applications are often developed to work against identical keep knowledge. The applications is also developed while not having to make any new keep files.



5. Standards are often implemented : Since package may be a central system, thus commonplace are often implemented simply is also at Company level, Department level, National level or International level. The standardized knowledge is incredibly useful throughout migration or interchanging of information. The filing system is AN freelance system thus commonplace can't be simply implemented on multiple freelance applications.

6. proscribing unauthorized access: once multiple users share a information, it's doubtless that some users won't be approved to access all info within the information. for instance, account workplace knowledge is commonly thought-about confidential, and thence solely approved persons square measure allowed to access such knowledge. additionally, some users is also allowable solely to retrieve knowledge, whereas different square measure allowed each to retrieve and to update. Hence, the sort of access operation retrieval or update should even be controlled. Typically, users or user teams square measure given account numbers protected by passwords, that they will use to realize access to the information. A package ought to give a security and authorization system, that the DBA uses to make accounts and to specify account restrictions. The package ought to then enforce these restrictions mechanically.

7. resolution Enterprise demand than Individual Requirement: Since many varieties of users with varied level of technical data use a information, a package ought to give a range of program. the necessities of the enterprise square measure additional vital than the individual user necessities. So, the DBA will structure the information system to supply AN overall service that's "best for the enterprise".

For example: A illustration are often chosen for the info in storage that provides quick access for the foremost vital application at the value of poor performance in another application. But, the filing system favors the individual necessities than the enterprise necessities

8. Providing Backup and Recovery: A package should give facilities for convalescent from hardware or code failures. The backup and recovery system of the package is answerable for recovery. for instance, if the pc system fails within the middle of a posh update program, the recovery system is answerable for ensuring that the .database is fixed up to the state it absolutely was in before the program started execution.

9. value of developing and maintaining system is lower: it's abundant easier to retort to out of the blue requests once knowledge is centralized in a very information than once it's keep in a very typical filing system. though the initial value of fixing of a information are often massive, however the value of developing and maintaining application programs to be way not up to for similar service victimisation typical systems. The productivity of programmers are often higher in victimisation non-procedural languages that are developed with package than victimisation procedural languages.

10. knowledge Model are often developed :
The centralized system is ready to represent the advanced knowledge and interfile relationships, which ends up higher knowledge modeling properties. the info madding properties of relative model relies on Entity and their Relationship, that is mentioned thoroughly in chapter four of the book.

11. Concurrency management : package systems give mechanisms to supply synchronous  access of information to multiple users.

Disadvantages of package


The disadvantages of the information approach square measure summarized as follows:

1. quality : the availability of the practicality that's expected of an honest package makes the package a very advanced piece of code. information designers, developers, information directors and end-users should perceive this practicality to require full advantage of it. Failure to know the system will result in dangerous style selections, which may have serious consequences for a company.

2. Size : The quality and breadth of practicality makes the package a very massive piece of code, occupying several megabytes of space and requiring substantial amounts of memory to run expeditiously.

3. Performance: usually, a File primarily based system is written for a particular application, like invoicing. As result, performance is mostly superb. However, the package is written to be additional general, to cater for several applications instead of only one. The impact is that some applications might not run as quick as they accustomed.

4. Higher impact of a failure: The centralization of resources will increase the vulnerability of the system. Since all users and applications think about the ~vailabi1ity of the package, the failure of any element will bring operations to a halt.



5. value of package: the value of DBMS varies considerably, betting on the setting and practicality provided. there's additionally the continual annual maintenance value.

6. further Hardware costs: The disk storage necessities for the package and therefore the information could necessitate the acquisition of further cupboard space. what is more, to attain the desired performance it's going to be necessary to buy a bigger machine, maybe even a machine dedicated to running the package. The procural of further hardware leads to any expenditure.



7. value of Conversion: In some things, the value oftlle package and additional hardware is also insignificant compared with the value of changing existing applications to run on the new package and hardware. This value additionally includes the value of coaching employees to use these new systems and presumably the utilization of specialist employees to assist with conversion and running of the system. This value is one in all the most reasons why some organizations feel tied to their current systems and can't switch to fashionable information technology.
Learn more »

What is XPath? Explain about its features with example.

Xpath is a language for finding information in an XML documents. It has following features:
  • XPath is a syntax for defining parts of an XML document
  • XPath uses path expressions to navigate in XML documents
  • XPath contains a library of standard functions
  • XPath is a major element in XSLT
  • XPath is a W3C recommendation.
XPath Nodes
In XPath, there are seven kinds of nodes: 
  • element, 
  • attribute, 
  • text, 
  • namespace, 
  • processing-instruction, 
  • comment, and 
  • document nodes.
Example
Look at the following XML document:
<?xml version="1.0" encoding="ISO-8859-1"?>

<bookstore>
  <book>
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
  </book>
</bookstore>
Example of nodes in the XML document above:
<bookstore> (root element node)

<author>J K. Rowling</author> (element node)

lang="en" (attribute node)

XPath Syntax
XPath uses path expressions to select nodes or node-sets in an XML document.

Selecting Nodes

XPath uses path expressions to select nodes in an XML document. The node is selected by following a path or steps. The most useful path expressions are listed below:
ExpressionDescription
nodenameSelects all nodes with the name "nodename"
/Selects from the root node
//Selects nodes in the document from the current node that match the selection no matter where they are
.Selects the current node
..Selects the parent of the current node
@Selects attributes
In the table below we have listed some path expressions and the result of the expressions:
Path ExpressionResult
bookstoreSelects all nodes with the name "bookstore"
/bookstoreSelects the root element bookstore
Note: If the path starts with a slash ( / ) it always represents an absolute path to an element!
bookstore/bookSelects all book elements that are children of bookstore
//bookSelects all book elements no matter where they are in the document
bookstore//bookSelects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element
//@langSelects all attributes that are named lang


Predicates

Predicates are used to find a specific node or a node that contains a specific value.
Predicates are always embedded in square brackets.
In the table below we have listed some path expressions with predicates and the result of the expressions:
Path ExpressionResult
/bookstore/book[1]Selects the first book element that is the child of the bookstore element.
Note: IE5 and later has implemented that [0] should be the first node, but according to the W3C standard it should have been [1]!!
/bookstore/book[last()]Selects the last book element that is the child of the bookstore element
/bookstore/book[last()-1]Selects the last but one book element that is the child of the bookstore element
/bookstore/book[position()<3]Selects the first two book elements that are children of the bookstore element
//title[@lang]Selects all the title elements that have an attribute named lang
//title[@lang='eng']Selects all the title elements that have an attribute named lang with a value of 'eng'
/bookstore/book[price>35.00]Selects all the book elements of the bookstore element that have a price element with a value greater than 35.00
/bookstore/book[price>35.00]/titleSelects all the title elements of the book elements of the bookstore element that have a price element with a value greater than 35.00


Selecting Unknown Nodes

XPath wildcards can be used to select unknown XML elements.
WildcardDescription
*Matches any element node
@*Matches any attribute node
node()Matches any node of any kind
In the table below we have listed some path expressions and the result of the expressions:
Path ExpressionResult
/bookstore/*Selects all the child nodes of the bookstore element
//*Selects all elements in the document
//title[@*]Selects all title elements which have any attribute


Selecting Several Paths

By using the | operator in an XPath expression you can select several paths.
In the table below we have listed some path expressions and the result of the expressions:
Path ExpressionResult
//book/title | //book/priceSelects all the title AND price elements of all book elements
//title | //priceSelects all the title AND price elements in the document
/bookstore/book/title | //priceSelects all the title elements of the book element of the bookstore element AND all the price elements in the document
Learn more »