Showing posts with label RDBMS. Show all posts
Showing posts with label RDBMS. Show all posts

Friday, May 6, 2011

Three Views (External, Conceptual and Internal) of Data in database.

DBMS is a collection of interrelated files and a set of programs that allow several users to access and modify these files. A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details of how the data is stored and maintained. However, in order for the system to be usable, data must be retrieved efficiently.

The concern for efficiently leads to the design of complex data structure for the representation of data in the database. However since database systems are often used by non computer professionals, this complexity must be hidden from database system users. This is done by defining levels of abstract as which the database may be viewed, there are logical view or external, conceptual view and internal view or physical view.

External view: This is the highest level of abstraction as seen by a user. This level of abstraction describes only the part of entire database.

Conceptual view: This is the next higher level of abstraction which is the sum total of user's views. This level describes what data are actually stored in the database. This level contains information about entire database in terms of a small number of relatively simple structures.

Internal level: This is the lowest level of abstraction at which one describes how the data are physically stored. The interrelationship of any three levels of abstraction is illustrated in image here.

Three Views of Data. Click on the image to enlarge.

What are Entities and Attributes in a database?

Entities and Attributes: The real world which is being attempted to market on to the database would consist of occasionally a tangible object such as an employee, a component in an inventory or a space or it may be intangible such as an event, a job description, identification numbers or an abstract construct. All such items about which relevant information is stored in the database are called Entities. The qualities of the entity which we store as information are called the attributes. An attribute may be expressed as a numb or as a text. It may even be a scanned picture, a sound sequence, a moving picture which is now possible in some visual and multi-media databases.

Data processing normally concerns itself with a collection of similar entities and records information about the same attributes of each of them. 1h the traditional approach, a programmer usually maintains a record about each entity and a data item in each record relates to each attribute. Similar records are grouped into files and such a 2-dimensional array is sometimes referred to as a flat file.

What are Data-items in a Database?

Data-items: The term data item is the word for what has traditionally been called the field in data processing and is the smallest unit of data that has meaning to its users. The phrase data element or elementary item is also sometimes used. Although the data item may be treated as a molecule of the database, data items are grouped together to form aggregates described by various names. For example, the data recurred is used to refer to a group of data items and a program usually reads or writes the whole records. The data items could occasionally be further broken down into what may be called an automatic level for processing purposes. For example, a data item such as a date would be a composite value comprising the day, date and year. But for doing date arithmetic these may have to be first separated before the calculations are performed. Similarly an identification number may be a data item but it may contain further information embedded in it. For example, the IGNOU uses a 9 digit enrollment number. The first 2 digits of these numbers reflect the year of admission, the next 2 digits refer KI the Regional Centre where the student has first opted for admission, the next 4 digits are simple sequence numbers and the last digit is a check digit. For purposes of processing, it may sometimes be necessary to split the data item.

Standardization of data items can become a fairly serious problem in a large corporate with several divisions or plans. ‘Each such unit tends to have its own ways of referring to the data items related to personal accounting, engineering, sales, production, purchase activities, etc. It would be extremely desirable if at the stage of adopting the database approach a commitment from the top management is acquired for prospective standardization across the enterprise for schemas of the data items.

Sunday, May 1, 2011

What is audit trail or audit journal in database?

The DBMS has certain routines that maintain audit trail or a journal. An audit trail or a journal is a record of an update operation made on the database. Audit trails may be used to trace the occurrence of an incorrect activity. The audit trail records:

Who (user or the application program and a transaction number)
When (time and date)
Where (location of the user and/or the terminal)
What (identification of the data affected, as well as before-and-after image of that portion of the database that was affected by the update operation).

What is mandatory access control?

In mandatory access control each data object is tagged or labeled with a certain classification level, and each user is given a certain clearance level. A given data object can then be accessed only by users with the appropriate, clearance. Mandatory schemes are, thus, comparatively rigid.

Most DBMS support either discretionary access control or mandatory access control or both. In fact most of the DBMS support discretionary control, and some systems support mandatory control as well, thus, discretionary control is, thus, more likely to be encountered in practice.

Sunday, April 17, 2011

What is discretionary control?

In discretionary control, a given user will typically have different access rights on different objects. Different users will typically have different rights on the same object. Discretionary schemes are, thus, flexible. Discretionary control can be compared with the access control in the UNIX operating system. In UNIX file system, access permissions of user, group and others (ugo) are associated with each file. All three (ugo) has the combination of read, write and execute permission on the file.

Various aspect to the security problem in a database

The various aspects to the security problem are:
  1. Legal, social and ethical aspects (for example, does the person making the request, say for withdrawing money from a bank, has legal rights for making the requested transaction?)
  2. Physical controls (for example, is the computer or terminal room always locked or otherwise guarded.)
  3. Policy Questions (for example, how does the enterprise owning the system decide who should be allowed access and to what?)

What is Database Security?

Generally the terms "security" and "integrity" are considered to be same, but these two concepts are quite distinct. Security refers to the protection of data against unauthorized disclosure, alteration or destruction; integrity refers to the accuracy or validity of data. In other words:
  • Security involves ensuring that users are allowed to do the things they are trying to do;
  • Integrity involves ensuring that the things they are trying to do are correct.
Now the Question arises that why do we need Security?

Friday, April 15, 2011

Data Dictionary in Database management system

Database management system provide a facility known as data definition language (DDL), which can be used to define the conceptual scheme and also give some details about how to implement this scheme in the physical devices used to store the data.

This definition includes:
  • All entity sets and their associated attribute as well as the relationships among the entity sets.
  • Any constraints that have to be maintained, including the constraints on the value that can be assigned to a given attribute and the constraints on the value assigned to different attributes in the same or different records.

What are Physical and Logical data independence?

Physical data independence is the ability to modify the physical schema without causing application programs to be rewritten. Modifications at the physical level are occasionally necessary to improve performance.

Logical data independence is the ability to modify the logical schema without causing application programs to be rewritten. Modifications at the logical level are necessary whenever the logical structure of the database is altered. It is more difficult to achieve.

Define Data Independence in a database system

The data independence can be defined as "the immunity of applications to change in storage structure and access techniques" which clearly implies that applications concerned do not depend on ally one particular storage structure or access technique.

We can also say that data independence is the ability to modify a schema definition in one level without affecting a schema in the next higher level.

What are the Disadvantages of Data Dependence in Database Systems?

In database systems, data dependence is undesirable for two reasons:
  1. Different applications will need different views of the same data. Suppose there are two applications, A and B. Let A stores records in decimal and B stores records in binary. If application C using A and B is data dependent then C will not be able to integrate A and B. So, major work of programmers, done in applications A and B will be wasted. But, it will still be possible to integrate the two files and to eliminate the redundancy, provided the DBMS is ready and able to perform all necessary conversions between the stored representations chosen and the form in which each application wishes to see it.

What is Data Dependence in Database Systems?

Data dependence is the way in which the data is organized in secondary storage, and the technique for accessing it, are both dictated by the requirements of the application under consideration, and moreover that knowledge of that data organization and that access technique is built into the application logic and code.

Advantages of Conventional or Centralized DBMS

Following are the main advantages of Conventional or Centralized Database management system (DBMS):
  1. Redundancy can be reduced: As we know that in non-database systems (file oriented systems) each application has its ow11 private files, because of which there exists considerable redundancy in stored data, resulting in wastage of storage space.

What are the disadvantages of file-oriented approach in information processing?

File-oriented approaches which came into being with the first commercial applications of computers did provide an increased efficiency in the data processing compared to earlier manual paper record-based systems as the demand for efficiency and speed increased the computer-based simple file oriented approach to information processing started suffering from the following significant disadvantages.

Discuss Traditional File Oriented Approach

The traditional file-oriented approach to information processing for each application has a separate master file and its own set of personal files. An organization needs flow of information across these applications also, and this requires sharing of data, which is significantly lacking in the traditional approach. One major limitation of such a file-based approach is that the programs become dependent on the files and the files become dependent upon the programs.

What are Database Instances and Database Schemas?

Databases change over time as information is inserted and deleted. 'The collection of information stored in the database at a particular moment is called an instance of the database. The overall design of the database is called the database schema. If schema change at all, they change very infrequently.

What is Database management system (DBMS)

A database-management system (DBMS) consists of a collection of interrelated data and a set of programs to access those data. The primary goal of the DBMS is to provide an environment that is both convenient and efficient to use in retrieving and storing database information. Thus we can say that, a database management system is a combination of hardware and software that can be used to set up and monitor a database, and can manage the updating and retrieval of database that has been stored in it.

What are the advantage of database system over any traditional file system?

The benefits of database system over any traditional file system are very obvious as data in database (at least in large system), is integrated as well as shared, thus, a database eliminates redundancy and unnecessary repetition of data, and also as a consequence, database lets multiple users access the same piece of data.

What is a Database System (DS)?

A database system is essentially a sophisticated, computerized record keeping system, a repository for a collection of computerized data files. A database system maintains information and makes that information available on demand, for this purpose a database system provides set of facilities to perform such operations. For example, adding new empty files in database, inserting new data in existing files, retrieve data, update data, delete data, query the database etc. Thus we can say that a database system stores data and provides information related to data. Although some people use "data" and "information" synonymously, but some prefer to distinguish between two. Data refers to the values actually stored in the database and information refers to the meaning of those values as understood by user.