Professional Documents
Culture Documents
Indexed sequential file organization. =In indexed sequential file organization, the records are stored in sequence according to a primary key and an index is created to allow random access of the file. This type of organization also allows the file to be accessed sequentially. Indexed sequential is the most commonly used type of file organization. A sequential file contains records organized in the order they were entered. The order of the records is fixed. The records are stored and sorted in physical, contiguous blocks within each block the records are in sequence. Records in these files can only be read or written sequentially. Once stored in the file, the record cannot be made shorter, or longer, or deleted. However, the record can be updated if the length does not change. (This is done by replacing the records by creating a new file.) New records will always appear at the end of the file. If the order of the records in a file is not important, sequential organization will suffice, no matter how many records you may have. Sequential output is also useful for report printing or sequential reads which some programs prefer to do.
In a web browser, an access key or accesskey allows a computer user immediately to jump to a specific part of a web page via the keyboard. They were introduced in 1999 and quickly achieved near-universal browser support. In the summer of 2002, a Canadian Web Accessibility[1] consultancy did an informal survey to see if implementing accesskeys caused issues for users of adaptive technology, especially screen reading technology used by blind and low vision users. These users require numerous keyboard shortcuts to access web pages, as pointing and clicking a mouse is not an option for them. Their research showed that most key stroke combinations did in fact present a conflict for one or more of these technologies, and their final recommendation was to avoid using accesskeys altogether.
24.(a)
The ER data modeling techniques is based on the perception of a real world that consists of a set of basic objects called entities, and of relationships among these objects. In ER modeling, data is described as entities, relationships, and attributes. In the following section, entities and attributes are discussed. Later, entity types, their key attributes, relationship types, their structural constraints, and weak entity types are discussed. In the last, we will apply ER modeling to our case study problem "Library management system".
An entity may be physical or abstract. A person, a book, car, house, employee etc. are all physical entities whereas a company, job, or a university course, are abstract entities.
Attributes
After you identify an entity, then you describe it in real terms, or through its attributes. Attributes are basically properties of entity. We can use attributes for identifying and expressing entities. For example, Dept entity can have DeptName, DeptId, and DeptManager as its attributes. A car entity can have modelno, brandname, and color as its attributes. A particular instance of an attribute is a value. For example, "Bhaskar" is one value of the attribute Name. Employee number 8005 uniquely identifies an employee in a company. The value of one or more attributes can uniquely identify an entity.
Fig 7.7 - Entity and its attributes In the above figure, employee is the entity. EmpNo, Name, Designation and Department are its attributes. An entity set may have several attributes. Formally each entity can be described by set of <attribute, data value> pairs.
In a "normal execution" of any single distributed transaction, i.e., when no failure occurs, which is typically the most frequent situation, the protocol comprises two phases:
1. The commit-request phase (or voting phase), in which a coordinator process attempts to prepare all the transaction's participating processes (named participants, cohorts, or workers) to take the necessary steps for either committing or aborting the transaction and to vote, either "Yes": commit (if the transaction participant's local portion execution has ended properly), or "No": abort (if a problem has been detected with the local portion), and 2. The commit phase, in which, based on voting of the cohorts, the coordinator decides whether to commit (only if all have voted "Yes") or abort the transaction (otherwise), and notifies the result to all the cohorts. The cohorts then follow with the needed actions (commit or abort) with their local transactional resources (also called recoverable resources; e.g., database data) and their respective portions in the transaction's other output (if applicable).
Note that the two-phase commit (2PC) protocol should not be confused with the two-phase locking (2PL) protocol, a concurrency control protocol.
and
is defined as:
(3.2 )
It is the set of tuples that are in or . This operation may be applied to the relations of the same arity only, so all the tuples in the result have the same number of components (values).
and
, defined as:
(3.3 )
but not in
. It is required that
and
have
and
is defined as:
(3.4 )
Assume that
has arity
and
has arity
possible (
and last
form a tuple in
of arity
, then:
(3.5 )
onto components
, where
are distinct
integers in range
-tuples
such that
there is some
-tuple
in
for which
for
For example
from fourth and second component of . Instead of using locations, attribute names can be used as well. Assuming that above projection can also be denoted as by the following relation schema: The Selection is denoted as:
(3.6 )
is the relation schema for the above relation. Then the . The resulting relation . can be described
Where
is a relation and
is a formula involving: is
represented by
(and),
(or),
(not).
Then
in
the
-th component
of is substituted for any occurrences of in formula , the formula becomes true. As for projection if a relation has named columns, then the formula in the
selection can refer to columns by name instead of by number. The arity of the same as the arity of .
is
There are also some other algebraic operations defined as: Intersection, Quotient, Join, Natural Join or Semijoin. They are all derived from the basic ones. The Intersection can be defined as:
(3.7 )
Thus its functionality is provided by difference, that is why it is not considered to be recognized as a basic operation.
and
is denoted as , and
. Assuming that
and
are relations
respectively, and
(3.8 )
-Join) of
and
on columns and
is defined as:
(3.9 )
Where
is
the arity of
. In other words, these are all the tuples in the Cartesian product of
and
-th component of
stands in relation
to the
th
component of
. If
is '
The Natural Join is a special case of the Join. It is applicable only when both columns that are named by attributes. Assuming that names used for both and , then the Natural Join is defined as:
and
have
(3.1 0)
such that
components
by relation and :
, written
(3.1 1)
where
Relational Algebra becomes a natural way to formulate queries. Having selection and projection, a question about a single relation can be asked. Adding Cartesian product, the query can concern more than one relation. Applying union or difference, several queries can be combined, to form a more sophisticated one.