Beruflich Dokumente
Kultur Dokumente
UNIT 1
PART A
1. Write the characteristics that distinguish the Database approach with the File based
approach?
There are a number of characteristics that distinguish the database approach with the file-
based approach.
Self-Describing Nature of a Database System
Sharing of data and Multiuser system
Enforcing Integrity Constraints
Restricting Unauthorized Access
Data Independence
Transaction Processing
Providing multiple views of data
Control Data Redundancy
2. Point out the disadvantages of file processing system.
5. Is it possible for several attributes to have the same domain? Illustrate your answer with
suitable examples.
Domain is a set of possible values for an attribute.
Yes,It is possible for several attributes to have the same domain.
Example :
Physical level
Logical level
View leve
7. List out the Codd's Rule.
Rule 0: The Foundation rule: This rule states that for a system to qualify as an RDBMS,
it must be able to manage database entirely through the relational capabilities.
There must be Insert, Delete, Update operations at each level of relations. Set operation like
Union, Intersection and minus should also be supported.
The database should be able to conforce its own integrity rather than using other programs. Key
and Check constraints, trigger etc should be stored in Data Dictionary. This also
make RDBMS independent of front-end.
Rule 11 : Distribution Independence
A database should work properly regardless of its distribution across a network. This lays
foundation of distributed database.
8. Create your own example for one to one and one to many relationship.
Relationship between a person and a drivers license is an example for an to one
relationship.
A car and its parts is an example for one to many relationship. Each part belongs to one
car and one car has multiple parts.
In database design, the cardinality or fundamental principle of one data table with
respect to another is a critical aspect. The relationship of one to the other must be precise
and exact between each other in order to explain how each table links together.
In the relational model, tables can be related as any of "one-to-many" or "many-to-
many". This is said to be the cardinality of a given table in relation to another.
12. Explain about weak entity set with suitable example.
Payment entity set in Bank database management system is an example for weak entity
set. Though the payment number is generated separately for each loan several loan may
share the same payment number. We cant take payment number as primary key hence
payment entity set is an example for weak entity set.
13. Define Functional dependency.
Functional dependency is a constraint between two sets of attributes in a relation from
a database.Funtional dependency describes the relationship between attributes in a
relation.For example A B if A and B are attributes of relation R,and B is functionally
dependent on A ,if each value of A is associated with exactly one value of B.
14. Classify different types of Anomalies in relational databases.
Insertion anomalies(We are not able to insert valid value)
Deletion anomalies(We are not able to perform delete without losing a valid
information).
Modification anomalies(We have to update multiple rows).
15. Describe about lossless decomposition.
Property of decomposition which ensures that no spurious tuples are generated when
relations are reunited through a natural join operation is known as loss less
decomposition.
author nationality
We can easily see that the only key is the set {author, book title}.
The same data can be stored in a BCNF schema. However, this time we would need three tables.
Author Nationality
author nationality
The key of the first table is {author}. The key of the second table is {book title}. The key of the
third table is {author, book title}. There are no functional dependencies violating the BCNF
rules, so the schema is in Boyce-Codd normal form.
PART A
1. In static SQL how database will be accessed In dynamic SQL, how database will be
statement.
3. SQL statements are compiled at compile SQL statements are compiled at run time.
time.
generation of application plan are done at generation of application plan are done at
5. It is generally used for situations where data It is generally used for situations where
is distributed uniformly. data is distributed non-uniformly.
PREPARE statements are not used. and PREPARE statements are used.
Although the main purpose of a FOREIGN KEY constraint is to control the data that can
be stored in the foreign key table, it also controls changes to data in the primary key
table.
A VIEW is actually a query and the output of the query becomes the content of the view.
The VIEW can be treated as a base table and it can be QUERIED, UPDATED,
INSERTED INTO, DELETED FROM and JOINED with other tables and views.
A VIEW is a data object which does not contain any data. It's contents are the resultant of
a base table. They are operated just like base table but they doesnt contain any data of
their own.
A view can be accessed with the use of SQL SELECT statement like a table. A view can
also be made up by selecting data from more than one table.
8. Give the syntax to create the table.
12. Give the syntax for display the data based on condition
Select [ Distinct / Unique ] ( *columnname [ As alias}, .]
From tablename
[ where condition ]
[ Group BY group _by_expression ]
[Having group_condition ]
[ORDER BY {col(s)|expr|numeric_pos} [ASC|DESC] [NULLS FIRST|LAST]];