Monday, February 8, 2010

Data Fragmentation, Replication, and Allocation Techniques for Distributed Database Design by anil nain

Data Fragmentation, Replication, and Allocation Techniques for Distributed Database Design

In this lesson, we discuss techniques that are used to break up the database into logical units, called fragments, which may be assigned for storage at the various sites. We also discuss the use of data replication, which permits certain data to be stored in more than one site, and the process of allocating fragments-or replicas of fragments-for storage at the various sites. These techniques are used during the process of distributed database design. The information concerning data fragmentation, allocation, and replication is stored in a global directory that is accessed by the DDBS applications as needed.

Data Fragmentation

In a DDB, decisions must be made regarding which site should be used to store which portions of the database. For now, we will assume that there is no replication; that is, each relation- or portion of relation- is to be stored at only one site. We will discuss replication and its effects later in this section. We also use the terminology of relational databases - similar concepts apply to other data models. We assume that we are starting with a relational database scheme and must decide how to distribute the relations over various sites.

Before we decide on how to distribute the data, we must determine the logical units of the database that are to be distributed. The simplest logical units are the relations themselves; that is, each whole relation is to be stored at a particular site. In our example, we must decide on a site to store each of the relations EMPLOYEE, DEPARTMENT, PROJECTS, WORKS ON and DEPENDENT. In many cases, however, a relation can be divided into smaller logical units for distribution. For example, consider the company database shown in the company. We may want to store the database information relating to each department at the computer site for that department. A technique called horizontal fragmentation can be used to partition each relation by department.

Horizontal Fragmentation

A horizontal fragment of a relation is a subset of the tuples in that relation. The tuples that belong to the horizontal fragment are specified by a condition on one or more attributes of the relation. Often, only a single attribute is involved. For example, we may define three horizontal fragments on the EMPLOYEE relation with the following conditions (DNO=5),(DNO=4), and (DNO=1), each fragment contains the EMPLOYEE tuples working for a particular department. Similarly, we may define three horizontal fragments for the PROJECT relation, with the conditions (DNUM=5),(DMUN=4), and(DMUN=1), each fragment contains the PROJECT tuples controlled by a particular Department. Horizontal fragmentation divides a relation horizontally by grouping rows to create subsets of tuples, where each subset has a certain logical meaning. These fragments can then be assigned to different sites in the distributed system. Derived horizontal fragmentation applies the partitioning of a primary relation (DEPARTMENT in our example) to other secondary relations (EMPLOYEE and PROJECT in our example), which are related to the primary via a foreign key. This way, related data between the primary and the secondary relations gets fragmented in the same way.

Vertical Fragmentation

Each site may not need all the attributes of a relation, which would indicate the need for a different type of fragmentation. Vertical fragmentation divides a relation “vertically” by columns. A vertical fragment of a relation keeps only certain attributes of the relation. For example, we may want to fragment the EMPLOYEE relation into two vertical fragments. The first fragment includes personal information-NAME, DATE, ADDRESS, and SEX- and the second includes work-related information-SSN, SALARY, SUPERSSN, DNO. This vertical fragmentation is not quite proper because, if the two fragments are stored separately, we cannot put the original employee tuples back together, since there is no common attribute between the two fragments. It is necessary to include the primary key or some candid key attribute in every vertical fragment so that the full relation can be reconstructed from the fragments. Hence, we must add the SSN attribute to the personal information fragment.

Notice that each horizontal fragment on a relation R can be specified by a sCi (R) operation in the relational algebra. A set of horizontal fragments whose conditions C1, C2, …, Cn include all the tuples in R —that is, every tuple in R satisfies (C1 OR C2 OR … OR Cn)—is called a complete horizontal fragmentation of R. In many cases a complete horizontal fragmentation is also disjoint: that is, no tuple in R satisfies (Ci and Cj) for any i ¹ j. Our two earlier examples of horizontal fragmentation for the EMPLOYEE and PROJECT relations were both complete and disjoint. To reconstruct the relation R from a complete horizontal fragmentation, we need to apply the UNION operation to the fragment.

A vertical fragment on a relation R can be specified by a pLi (R) operation in the relational algebra. A set of vertical fragments whose projection lists L1, L2, …, Ln include all the attributes in R but share only the primary key attribute of R is called a complete vertical fragmentation of R. In this case the projection lists satisfy the following two conditions.

L1 L2 … Ln = ATTRS(R)

Li Lj = PK(R) for any i ¹ j, where ATTRS(R) is the set of attributes of R and PK(R) is the primary key of R.

To reconstruct the relation R from a complete vertical fragmentation, we apply the OUTER UNION operation to the vertical fragments (assuming no horizontal fragmentation is used). Notice that we could also apply a FULL OUTER JOIN operation and get the same result for a complete vertical fragmentation, even when some horizontal fragmentation may also have been applied. The two vertical fragments of the EMPLOYEE relation with projection lists L1 = (SSN, NAME, BDATE, ADDRESS, SEX) AND L2 = (SSN, SALARY, SUPERSSN, DNO) constitute a complete vertical fragmentation of EMPLOYEE.

Two horizontal fragments that are neither complete nor disjoint are those defined on the EMPLOYEE relation by the conditions (SALARY > 50000) and (DNO = 4); they may not include all EMPLOYEE tuples, but may include common tuples. Two vertical fragments that are not complete are those defined by the attribute lists L1 = (NAME, ADDRESS} and L2 = {SSN, NAME, SALARY}; these lists violate both conditions of a complete vertical fragmentation. Mixed (Hybrid) Fragmentation. We can intermix the two types of fragmentation, yielding a mixed fragmentation. For example, we may combine the horizontal and vertical fragmentations of the EMPLOYEE relation given earlier into a mixed fragmentation that includes six fragments. In this case the original relation can be reconstructed by applying UNION and OUTER UNION (or OUTER JOIN) operations in the appropriate order. In general, a fragment of a relation R can be specified by a SELECT-PROJECT combination of operations pL (sC (R). If C = TRUE (that is, all tuples are selected) and L ¹ ATTRS(R), we get a vertical fragment, and if C ¹ TRUE and L = ATTRS(R), we get a mixed fragment. Notice that a relation can itself be considered a fragment with C = TRUE and L = ATTRS(R). In the following discussion, the term fragment is used to refer to a relation or to any of the preceding type of fragments.

A fragmentation schema of a database is a definition of a set of fragments that includes all attributes and tuples in the database and satisfies the condition that the whole database can be reconstructed from the fragments by applying some sequence of OUTER UNION ( or OUTER JOIN) and UNION operations. It is also sometimes useful—although not necessary—to have all the fragments to be disjoint except for the repetition of primary keys among vertical (or mixed) fragments. In the latter case, all replication and distribution of fragments is clearly specified at a subsequent stage, separately from fragmentation.

Distributed Database Concepts by anil nain


Distributed Database Concepts

Distributed database (DDB) - It is a collection of multiple logically interrelated databases distributed over a computer networks and a distributed database management system (DDBMS) as a software system that manages a distributed database while making tie distribution transparent to the user. A collection of files started at different nodes of network and the maintaining of Inter relationship among them via hyperlinks has become a common organisation on the internet, with file of web pages.

Advantages of Distributed Databases

Distributed database management has been proposed for various reason ranging from organizational, decentralisation and economical processing to greater autonomy. We highlight some of these advantages here.

1. Management of distributed data with different level of transparency: Ideally, a DBMS should be distribution transparent in the sense of hiding the details of where each file (table, relation) is physically stored within the system. Consider the company database that is spread over the network as shown in Figure 6.4.




Figure 6.4: Data distribution and replication among distributed database

Where Employees, Projects and Works_ On are the relation in the Company Database as follows:

EMPLOYEE

FNAME

LANAME

SSN

BDATE

ADDRESS

SEX

SALARY

PROJECT

PNAME

PNUMBER

PLOCATION

DNUM

WORKS_ON

ESSN

PNO

HOURS

· Distributed or network transparency: This refers to freedom for the user from the operational details of the network. It may be divided into location transparency and naming transparency.

Location transparency: It refers to the fact that the command used to perform a task is independent of the location of data and the location of the system where the command was issued.

Naming Transparency: It implies that once a name is specified, the named objects can be accessed unambiguously without additional specification

· Replication transparency: As we show in above figure copies of data may be stored at multiple sites for better availability, performance, and reliability. Replication transparency makes the user unaware of the existence of copies.

· Fragmentation transparency: Two types of fragmentation are possible. Horizontal fragmentation distributes a relation into sets of tuples (rows) and Vertical fragmentation distributes a relation into sub relation where each sub relation is defined by a subset of the column of the original relation. A global query by the user must be transformed into several payment queries. Fragmentation transparency makes the user unaware of the existence of fragments.

1. Increased reliability and availability: Reliability is broadly defined as the probability that a system is running (not down) at a certain point of time, whereas availability is the probability that the system is continuously available during a time interval. When the data and DBMS software are distributed over several sites, one site may fail while other sites continue to operate. Only the data and software that exists at the failed site cannot be accessed. In a centralised system, failure at a single site makes the whole system unavailable to all users.

2. Improved performance: A DDBMS fragments the database by keeping the data closer to where it is needed most. Data localisation reduces the contention for CPU and I/O services and simultaneously reduces access delays involved in Wide Area Network. When a large database is distributed over multiple sites, smaller database exist at each site. As a result, local queries and transactions accessing data at a single site have better performance because of the smaller local databases.

3. Easier Expansion: In a distributed environment, expansion of the system in terms of addition of more data, increasing database size, or addition of more processors is much easier.

anil nain, surekha nain, ojas nain,


Friday, September 4, 2009

DBMS Objective questions by anil nain 9416077273

DBMS Objective questions by anil nain 9416077273
CHAPTER-1
Solved examples
Fill in the blankhs
A DBMS is an interface between ______ and ______ requests. (physical databse, user)
The ______ sub-system provides facilities to optimise DBMS performance. (performance)
Protection and control of database access is the responsibilities of _______ sub-system. (security management)
One of the responsibilities of a ______ is to create database schema. (DBA)
A rectangle in ERD representstion represents ________. (entity set)

T/F
A database is large collection of rather unrelated data.(F)
Data independence is a desirable characteristic of a DBMS.(T)
Information is processed data.(T)
The desirable characteristics of data processing are speed, volume and accuracy.(T)
SQL is a universal database query language.(T)
Unsolved
Fill in the blanks
<<<<>>>>
T/F
1. Logical data independency is easier to achieve than physical data independence.
2. DDL and DML are two different names fo rthe same thing.
3. C and COBOL are examples of DBMS.
4. Query optimization means arranging the queries so that the response time is minimized.
5. The three models of database are heirarchy, network and relational.



CHAPTER-2
Solved
Fill in the blanks
Primary key is ______ level constraint. (column)
The maximum number of characters that can be stored in a CHAR type fo data is _____. (255)
_______ data type can store unstrucrured data. (raw)
_______ operation returns a sub-set of attribute set from a table.(projection)
_______ operation creates new table from two given tables.(join)

T/F
Average, maximumand minimum are aggregate functions that return a single value.(T)
Rollback is the act of undoing certain transaction back to a given point. (T)
Once COMITted the operations performed on database cannot be undone.(T)

Unsolved
Fill in the blanks
<<<<>>>>>
T/F
Referential constraints requires an attibute be used in two tables.
All primary keys are candidate keys but not vice-versa.
Every SELECT command must have one or two WHERE cluses in it.
SQL is the only database language.
Every table must have at least one primary key and three candidate keys.


CHAPTER-3

Solved examples
Fill in the blanks
A relation is in ______ if and only if it is in ___ NF and every non-key attribute is irreducibly dependent on the primary key. (2NF, 1)
______ is the process of relational databse design. (normalization)
T/F
If a table is in 2NF, it may be or may not be in 1NF. (F)
Fourth normal form uses multiple dependency criteria for relation decomposition.(T)

Unsolved
Fill in the blanks
<<>>>
T/F
A table is in 4NF if it is in 3NF and has no multiple sets of multivalued dependencies.
Normailization is an aid to database design.
BCNF has more merits than 3NF.
5NF is the maximum level of normalization possible in the normalization of databse.
Dependency is the basis of normalization.


CHAPTER-4
Solved examples
Fill in the blanks
Natural join is a _______operation. (commutaive)
The graphical representation of a query is ________. (query tree)
T/F
All the queries are equally faster. (F)
Natural join and cartesian product are one and the same operations.(T)

Unsolved
Fill in the blanks
<<<>>>
T/F
Canonical representation of a query tree is also minimum spanning tree.
The order in which operations are cariied out on a relation is significant for the execution speed.
In a cascade sequence of projections, the last one can be ignored.
The four operations of natural join, join, union and intersections are individually associateive.
Heuristics may be applied in query optimization.

CHAPTER-5
Solved examples
Fill in the blanks
A binary lock can have ______ states. (two)
In the ______phase the number of locks increases from zero to maximum. (growing)

T/F
Time stamp is a unique identifier to identify a transaction. (T)
2-phase locking does not guarantee strict schedule.(F)
Unsolved
Fill in the blanks
<<<<<>>>>
T/F
ACID are properties of a transaction.
More storage is neede to apply multiple concurrency techniques.
A red lock is also known as shared lock.
Locking technique always ensures serializability.
Concurrency can occur only in a multi-processor database systems.


CHAPTER-6
Solved examples
Fill in the blanks
Client-server architecture is used to implement _________. (distributed database)
________ implies that once a name is specified, the named objects can be accessed without additional specification.
T/F
A horizontal fragment of a relation is a subset of the tuples in that relation.(T)
Semijoin operations intend to reduce the number of tuples in a relation before it is tranferred.

Unsolved
Fill in the blanks
A _______ is that part of distributed system which makes a request to other parts for a service.
Distributes transparency means _____.
____ is a multidatabase system.
A set of vertical fragments of a relation R, whose projection lists include all the attributes in R but share only the primary key attribute is called _________ vertical fragmentation of R.
To reconstrct a relation from a vertical fragments sequence of ________ operations is employed.

T/F
A client may act as a server for another application.
A distributed database may be highly redundant for performance improvement.
A distributed database uses network to communicate with its components.
Location transparency means that the database should behave differently depending on the location from which iit is being accessed.
Distributed database query optimization focuses on reducing the size of the fragments to be transferred.

Monday, August 17, 2009

UGC NET (NATIONAL ELIGIBILITY TEST) FOR JRF AND ELIGIBILITY FOR LECTURSHIP QUESTION PAPER by anil nain 9416077273

MODEL TESTPAPER(by anil kumar nain)
Section (1) contains 5 Question each carry 5 marks.
Section (11) contains 15 Question each carry 5 marks.
Section (111) contains 5 Question each carry 12 marks.
Section (1V) contains 1 Question each carry 40 marks.
5X5=25
Suppose we wish to degine software for a web based Examination application and hall ticket generation
15X5=75

FIFO page replacement is used with for initial empty pages trams and eight pages. How many pages faults will occur for the references string 0172337103?
What do you mean by authoring tool give its application also. What are various types of authoring tools?
Define phrase structure grammar of type 0,1,2,3 with an example of each.
what are three major multiplexing technique(tamp) and show that
If A=>B then ~B=> ~A.
What are advantages of combining segmentation of paging together?
Differentiates between software engineering and software reveres engineering.
Explain rapid app. Development model with its various RAD.
What is index fast full scan in oracle. Why does it not grant that the output will in shorted order of the index.
Explain how the concept of object identify in object oriented mode define the concept of tuple.
Write on 9085 assembly language program that finds the 2’s complement of again 8 bit integer.
With reference to the worst case behavior determine the complexity of binary search.
Determine the product 1234*758 using divide and conquer technique.
Discuses XML architecture.
Distinguish between Moore and mealytinity sate machining.
State in algorithm for converting a transitive graph into a regular expression with explanations.

5x12=60
Half man tree.
Encoding and decoding of L2 codes.
Main goals of JPEG compression images.
Fourier transforms.
Neural Network sun throughputs fuzzy system sum output.
f(x)=1/1+ex
Switch function x1+x2x3.
LCM Divisible.

One essay type question with internal options 40 marks
Describe the back propagation algorithm assure a feed forward neural network topology with single hidden lodger.
UNIX files protection. What is fiber obstruction providing by xp? How it differ from threads obstruction

Tuesday, June 30, 2009

Anil Nain experience with interview question

Anil Nain(9416077273) experience with interview question
1.) If Interview Asks a question and if i dont know the answer,what i have to do?can i say wrong answer?
If you don’t know the answer fo the question asked by the interviwer , never say wrong answer.Tak atleast few seconds and say , i am sorry sir/madam , at this moment i haven’t able to answer you , i will make sure that i will update my knowledge soon.
The above points makes you to present your frankness and your presentation abilities.
2.) What to answer and what not to answer for "Tell me something about you"?
hi,This kind of questions are best answered by focusing on 5 to 6 strong selling points of yours. when asking this question, the interview is not looking for your history of school work and employment but kind of giving you a chance to sell yourself in about 60 seconds. Why 60 seconds? Try to limit your answers to 60 seconds as far as possible because if you go on talking about your past at length then the interviewer might loose interest in you and the interview might end at that very point. The answer should include your achievements, skills and talents that would enable you to succeed in the position that is being discussed.Make a short, organized statement of your education and professional achievements and professional goals. Then, briefly describe your qualifications for the job and the contributions you could make to the organization.
3.) Would you be willing to relocate if required?
If I get a better learning oppurtunity & growth, then certainly yes. Otherwise, I have to think how much it is feasible from organization's point of view.
4.) What if we don't hire you?
Well, your current position will still remain open and you have to interview atleast one more person.It may be difficult for you to find a more dedicated and knowledgable person than myself. As for me, I have to continue my search for excellent and best in class company where I can get challenging and rewarding work experiance. I thought we had win-win situation.
5.) If you were hiring a person for this job, what would you look for?
In my point of view I would recommend the following things: 1. Required skills for the role.2.Can work in team3.Pro-activeness 4.Loyalty to the work.
6.) Speak about yourself professionally?
You should highlight your projects and your experience with other companies if you have worked with other comapnies.

Wednesday, June 10, 2009

Flash developer and instructor anil nain 9416077273 sonepat haryana

Anil nain 9416077273 has been working in Flash since version 4, focusing mainly on ActionScript. He has been certified as a Flash developer and instructor and now works as a Media Specialist for Ocean Systems Engineering focusing on web-based training. anil also has contributed articles to FlashMagazine.com as well as the MX Developers Journal. He also co-founded EMLlabs.com with Eddie Wilson as a tutorial based site for intermediate to advanced Flash usage. anil is also a very devoted supporter of snowboarding whenever free time and cold weather present themselves.

Thursday, June 4, 2009

technology anil nain most powerfull idea

Technologyanil nain 9416077273Light produced by a computer monitor is not constant. As you read this article, you are viewing approximately 30 separate images a second. Your brain rejects the information it doesn't want to see, and blocks out the frequent moments that your screen is blank. With this in mind, it is important not to make the colors on your web site too busy. This produces unnecessary strain on your eyes. Harsh, contrasting colors should be avoided. Giving people headaches does not aid in selling products!
It should also be noted that there are four factors that determine how color is rendered on your computer monitor: the CPU (the computer's brain), the computer platform (Windows, Mac OS, etc.), the video card, and the monitor itself. What you see may not be what others see. In some cases, royal red may appear as hot pink. Navy blue may look black. During the development process, try to view your site on different computers.
So what do you do?
You may find, in many cases, trial and error is the only way to determine what works. Be patient, and don't hesitate to make changes. The factors in determining color schemes of a web site, or any advertising for that matter, require careful consideration. Remember... Symbolism, Psychology, Gender, and Technology... Color does matter.