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.