Assignment DBMS
Assignment DBMS
Join Dependency-: a join dependency is a constraint on the set of legal relations over
a database scheme. A table is subject to a join dependency if can always be recreated
by joining multiple tables each having a subset of the attributes of . If one of the tables in
the join has all the attributes of the table , the join dependency is called trivial.
Another way to describe a join dependency is to say that the relationships in the join
dependency are independent of each other.
Fourth normal form (4NF) is a level of database normalization where there are no
non-trivial multivalued dependencies other than a candidate key. It builds on the first
three normal forms (1NF, 2NF and 3NF) and the Boyce-Codd Normal Form (BCNF). It
states that, in addition to a database meeting the requirements of BCNF, it must not
contain more than one multivalued dependency.
Example- Consider the database table of a class whaich has two relations R1
contains student ID(SID) and student name (SNAME) and R2 contains course
id(CID) and course name (CNAME).
SID SNAME
S1 A
S2 B
CID CNAME
C1 C
1703283 Page 2
DEPARTMENT OF INFORMATION TECHNOLOGY,CEC LANDRAN
CID CNAME
C2 D
S1 A C1 C
S1 A C2 D
S2 B C1 C
S2 B C2 D
Example – Consider the above schema, with a case as “if a company makes a
product and an agent is an agent for that company, then he always sells that product
for the company”. Under these circumstances, the ACP table is shown as:
Table – ACP
A1 PQR Nut
A1 PQR Bolt
A1 XYZ Nut
A1 XYZ Bolt
A2 PQR Nut
The relation ACP is again decompose into 3 relations. Now, the natural Join of all the three relations will be shown as:
Table – R1
AGENT COMPANY
A1 PQR
A1 XYZ
1703283 Page 3
DEPARTMENT OF INFORMATION TECHNOLOGY,CEC LANDRAN
AGENT COMPANY
A2 PQR
Table – R2
AGENT PRODUCT
A1 Nut
A1 Bolt
A2 Nut
COMPANY PRODUCT
PQR Nut
PQR Bolt
XYZ Nut
XYZ Bolt
Result of Natural Join of R1 and R3 over ‘Company’ and then Natural Join of R13
and R2 over ‘Agent’and ‘Product’ will be table ACP.
1703283 Page 4
DEPARTMENT OF INFORMATION TECHNOLOGY,CEC LANDRAN
fully depends on this composite key is Total_Hours .The scheme of this new relation
that we have named HOURS_ASSIGNED is as foloows:
The second relation contains Roll no as its Primary key,because Rollno fully determine
the Name, System_Used, and Hourly_rate . This scheme is as follows-:
The third relation contains Course_Code as its Primary key,because Course_Code fully
determine the Course_Name,Teacher_Name.The Scheme is as foloows:-
COURSE(course_code,Course_name,Teacher_name)
HOURS_ASSIGNED
STUDENT_SYSTEM_CHARGE
1703283 Page 5
DEPARTMENT OF INFORMATION TECHNOLOGY,CEC LANDRAN
COURSE
Update Anomalies happen when the person charged with the task of keeping all the records current
and accurate, is asked, for example, to change an employee’s title due to a promotion. If the data is
stored redundantly in the same table, and the person misses any of them, then there will be multiple
titles associated with the employee. The end user has no way of knowing which is the correct title.
Deletion Anomalies happen when the deletion of unwanted information causes desired information
to be deleted as well. For example, if a single database record contains information about a
particular product along with information about a salesperson for the company and the salesperson
quits, then information about the product is deleted along with salesperson information.
1. An XML declaration (which is technically optional, but recommended in most normal cases
2. A document type declaration that refers to a DTD (which is optional, but required if you want
validation)
1703283 Page 6
DEPARTMENT OF INFORMATION TECHNOLOGY,CEC LANDRAN
Instance
The data model represented as a sequence.
Instance document
A document using and conforming to the same sequence/XML tree.
Sequence
An order collection of zero or more items. A sequence cannot be a member of
a sequence. A single item appearing individually is modeled as a sequence
containing one item.
Element
A node within the sequence that may contain
Node
Any item represented in the XML tree/sequence.
Root Node
The topmost element of the tree. All other elements and nodes must be
contained within the root node.
Item
A node or an atomic value.
Value space
The part of an item that contains data rather than additional elements.
Atomic type
A primitive simple type or a type derived by restriction from another atomic
type.
Atomic value
A value contained in the value space that is an atomic type.
QName
The qualified name of an element. It must conform to naming rules of XML
objects. (i.e. must start with a letter or underscore, case-sensitive, cannot start
with the letters xml(in any case), can contain letters, digits, hyphens,
underscores, and periods, cannot contain spaces.)
1703283 Page 7
DEPARTMENT OF INFORMATION TECHNOLOGY,CEC LANDRAN
1703283 Page 8