03-05-2012, 04:50 PM
database
download.pdf (Size: 35.4 KB / Downloads: 53)
what is a database?
a dbms is a complex softwaresystem that is used to manage,store and manipulate
data and metadata used to describe the data.
--------------------------------------------------------------------------------
---
what is a key?what are different keys in database?
a key is nothing but a attribute or group of attributes.they are used to perform
some specific operation depending on their operation.the keys are classified
into primary key,secondary key,alternative keysuper key,candidate key,compound
or concatinated or composite key.
--------------------------------------------------------------------------------
---
what is a primary key?
primary key:an attribute to identify a record uniquely is considered to be
primary key.for eg in the student table student_no is the primary key because it
can be used to identify unique record or unique student.
--------------------------------------------------------------------------------
---
what is a secondary key?
an attribute used to identify a group of records satisfying a given condition is
said to be a secondary key.in the employee table designation is a secondary key
because more than one employee can have the same designation.
--------------------------------------------------------------------------------
---
what is a candidate key?
register no usually alloted in the exams is also unique for each student in that
case for identifying a student uniquely either student_no or register_no can be
used.here two different candidates are contesting for primary key post.any of
them can be selected as primary key.
--------------------------------------------------------------------------------
---
what is an alternate key?
if any one of the candidate keys among the different candidate keys available is
selected as primary key then remaining keys are called alternate key.
--------------------------------------------------------------------------------
---
what is a super key?
with primary key if any other attribute is added then that combination is called
super key in other words,primary key is the minimum possible super key.in the
student table student_no+student_name is one the super key.
--------------------------------------------------------------------------------
---
what is a composite key?
if the primary key is combination of more than one key then it is calles the
composite key.in the table called marks student_no+subject is the composite key.
--------------------------------------------------------------------------------
---
what is a relation?
a relation consists of a homogeneous set of tuples.
--------------------------------------------------------------------------------
---
what is a table?
it is the representation of a relation having records as rows and attributes as
columns.
--------------------------------------------------------------------------------
---
what is an attribute?
an object or entity is characterised by its properties or attributes.in
relational database systems attributes corresponds to fields.
--------------------------------------------------------------------------------
---
what is a domain?
the set of allowable value for the attribute is the domain of the attribute.
--------------------------------------------------------------------------------
---
what is a tuple?
tuples are the members of a relation.an entity type having attributes can be
represented by set of these attributes called tuple.
--------------------------------------------------------------------------------
---
what is a selection?
an operation that selects only some of the tuples in the relation is known as
selection operation.the selection operation yields a horizontal subset of a
given relation.
--------------------------------------------------------------------------------
---
what is a join operation?
the join operation allows the combination of two relations to form a new
relation.
--------------------------------------------------------------------------------
---
waht are base operations in relational algebra?
union:
the term of the relation as performed by combining the tuples from one
relation with those a second relation to produce a third
relation.duplicate tuples are eliminated.the the relation must be union
compatable.
difference:
the difference of two relations is a third relation having tuples that occur in
the first relation but not in the second relation.
intersection:
the intersection operation selects the common tuples from the two relations.
cartesian product:
the cartesian product of two relations is the concatination of tuples belonging
to the two relations.a new resultant scheme is created consisting of
concatination of all possible combination of tuples.
--------------------------------------------------------------------------------
---
what are different dbms facilities?
how many types of facilities are provided by a dbms?
1)the data definition facility or data definition language(DDL)
2)the data manipulation facility or data manipulation language(DML)
3)the data control facility(DCL)
--------------------------------------------------------------------------------
---
what is data definition language?
data scheme is specified by a set of definitions which are expressed b a special
language called a DDL.
--------------------------------------------------------------------------------
---
what is a data directory or data dictionary?
the result of compilation of DDL statements is a set of tables which are stored
in a special file called data dictionary or data directory.