Tuesday, February 24, 2015

Codd's Twelve Rules - Rule 9 - Logical Data Independence


Codd's Twelve Rules - Rule 9 - Logical Data Independence



Rule 9
Logical Data Independence
Rule
“The ability to change the conceptual (logic) schema without having to change the next higher level external schema or application programs”.
“Insulation of application programs and terminal users from the negative effects of information-preserving changes of the logical database schema”.
Description
1. The addition or removal of new entities, attributes, or relationships to the conceptual schema should be possible without having to change existing external schemas or having to rewrite existing application programs.
2. Logical Data independence means if we add some new columns or remove some columns from table then the user view and programs should not change.
3. The term "Logical Data Independence" refer to the ability to present the stored information in different ways to different users. The way you store the data and the way you present it to a particular user is independent. Different users perceive the same data differently.
Example
If user B add a new column salary in his view/table then it will not effect the external view user; user A, but internal view of database has been changed for both users A & B. Now user A can also print the salary. It means if we change in view then program which use this view need not to be changed.
For a table with the schema Employee(Eno, Ename, Street, City, Salary), a view with the attributes (Eno, Ename) will not be affected if any other attributes of Employee is altered.
More examples/illustrations can be tried in the following links;

Achievement
Logical Data Independence is more difficult to achieve when compared to Physical Data Independence since application programs are heavily dependent on the logical structure of the data that they access.
Some DBMS that fulfills this property
Almost all Relational DBMSs support this property with certain limits (say for example if columns or tables removed).
Together, Rule 8 Physical Data Independence and Rule 9 Logical Data Independence, specify that specific access or storage techniques used by the RDBMS—and even changes to the structure of the tables in the database—shouldn’t affect the user’s ability to work with the data.


Monday, February 23, 2015

Codd's Twelve Rules - Rule 8 - Physical Data Independence


Codd's Twelve Rules - Rule 8 - Physical Data Independence



Rule 8
Physical Data Independence
Rule
Changes in the physical level must not lead to a change in the next higher level called logical level.
Description
Any change in the physical level (lowest level that talks about how data is stored in a database, say for example, in arrays or linked lists etc.) must not lead to a change in the logical level (tables, columns, rows etc.).
Applications that are defined on the physical level should be able to continue to work even when changes are made to the internal implementation of data storage and access methods.
The way the data stored physically must be independent of how its accessed logically.
Example
For example, relations are stored as unordered files. If the change from unordered files to some other representation would not require a change in the table design, attribute types etc.
Some DBMS that fulfills this property
Almost all Relational DBMSs support this property.



Sunday, February 22, 2015

Comparison of Replication Alternatives in Distributed Database Design


Comparison of Replication Alternatives / Full replication, Partial replication, and Partitioning - A comparison / Comparison of various data allocation alternatives in distributed database


Comparison of Data allocation or Replication Alternatives

First few definitions to recall.
Allocation of fragments  – after completing fragmentation process, the next important step is to allocate those fragments to different locations/sites [servers]. Careful allocation leads to reduced communication as well as increased performance.
Full replication                - availability of same copy of a database in multiple locations/sites is referred as full replication.
Partial replication          - database gets fragmented and some of the fragments are replicated(multiple copies of same fragment) and maintained at many locations/sites. This kind of distribution is called partial replication.
Partitioning                     - a non-replicated database is called as partitioned database. That is, a table is fragmented and each fragment is stored at different locations.

Full Replication
Partial Replication
Partitioning
Query Processing
Easy
Same copy of database available at different sites, hence query processing is easy.
Same level of difficulty
A query generated at different sites for the data residing at some other sites, the query need to be processed to understand location in which data resides and to find an optimal execution strategy.
Directory Management
Easy or does not exist
All tables are of similar structure; hence we do not need Global catalog. The regular data dictionary used in centralized database systems is enough.
Same level of difficulty
We need Global catalog to know the data and its location.
Concurrency Control
Moderate
Simultaneous read can be allowed at all the replicas by any number of transactions. Simultaneous write can be permitted at only one replica at a time. Any write transaction needs to change the data at all locations. Hence, the concurrency control is moderate.
Difficult
Data are fragmented as well as replicated. It is difficult to handle concurrent transactions which involves data from replicated copies or fragmented and replicated copies.
Easy
In partitioned database, data at different sites are unique to that site in which the data resides; handling concurrent transactions is just like handling concurrent executions in a centralized database. Hence, it is considered easy.
Reliability
Very high
Multiple copies of same database increase the availability. Failure of any site would not cause trouble in accessing data. Still data can be accessed from sites that are alive. Hence, reliability is very high.
High
Availability of multiple copies for few fragments would still support reliability.
Low
As individual fragments at individual sites are unique, they are vulnerable to single point of failure. Hence, the reliability is low.
Reality
Possible application
Realistic application
Possible application





Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents