0% found this document useful (0 votes)
472 views12 pages

POD Question Bank Answer

The document provides answers to questions related to database concepts. It includes definitions of key terms like entity sets, relationships, generalization, domains, constraints and normal forms. It also provides examples to explain concepts like generalization, domains, primary and foreign keys, normalization forms and DDL/DML commands. The document aims to help students understand fundamental database concepts through definitions and examples.

Uploaded by

Aayush Waghere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
472 views12 pages

POD Question Bank Answer

The document provides answers to questions related to database concepts. It includes definitions of key terms like entity sets, relationships, generalization, domains, constraints and normal forms. It also provides examples to explain concepts like generalization, domains, primary and foreign keys, normalization forms and DDL/DML commands. The document aims to help students understand fundamental database concepts through definitions and examples.

Uploaded by

Aayush Waghere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

POD Question Bank Answer

Chapter 3:
1. Draw the enhanced E-R diagram for College Management System and show
strong entity set, weak entity set, super class and sub class. (4M)
Ans:

2. Describe enhanced ER model with the help of example. (4M)


Ans: Enhanced ER is a high-level data model that incorporates the extensions to
the original ER model. It is created to design more accurate database
schemas. EER reflects data properties and constraints more precisely. It also
includes more complex requirements than traditional application.

It is a diagrammatic technique for displaying the following concepts:


• Sub Class and Super Class
• Specialization and Generalization
• Union or Category Aggregation
These concepts are used when they comes in EER schema and the resulting
schema diagrams called as EER Diagrams.

For example: Square, Circle, Triangle are the sub class of Shape super class.
3. Explain Generalization with Example (4M)
Ans: Generalization uses bottom-up approach where two or more lower level
entities combine together to form a higher level new entity if they have
common attributes in common. The new generalized entity can further
combine together with lower level entity to create a further higher level
generalized entity.

For Example, STUDENT and FACULTY can be generalized to a higher level


entity called PERSON

4. Give difference between Generalization and specialization (2M)


Ans:
5. Define primary key and candidate key.(2 M)
Ans:
Primary key: The PRIMARY KEY uniquely identifies each record in a database
table. Primary keys must contain unique values. A primary key column
cannot contain NULL values. Each table should have a primary key, and each
table can have only one primary key.

Candidate key: A minimal super key is called a candidate key. An entity set
may have more than one candidate key. A candidate key is a column, or set
of columns, in a table that can uniquely identify any database record without
referring to any other data. Each table may have one or more candidate keys,
but one candidate key is special, and it is called the primary key.

Chapter 4:

6. Define the term database schema and instance. (2M)


Ans:
Schema: The overall design of the database is known as schema.
Database designers design database schemas to help programmer to
understand the database.

Instance: The collection of information stored in the database at a


particular moment is called an instance of the database.

7. Write syntax to create table and give one example. (2M)


Ans:
Syntax of Create table:
CREATE TABLE table_name(
column1 datatype (size),
column2 datatype(size),
column3 datatype(size),
.....
columnNdatatype(size) );

Example:
CREATE TABLE Employee(
Name VARCHAR(100),
Email VARCHAR(100),
Age NUMBER(3)
);
8. Explain referential constraint with syntax and example. (4M)
Ans: Referential Integrity
Referential integrity ensures the relationship between the Tables. We can
apply this using a Foreign Key constraint.

Foreign Key:
A Foreign Key is a key used to link two tables together. A Foreign
Key is a field (or collection of fields) in one table that refers to the
Primary Key in another table.
If a table contains a primary key then it can be called Parent Table.
If a table contains a foreign key reference then it can be called a Child
Table.

Example:

9. Explain Domain with syntax and example. (4M)


Ans: Domain Integrity
Domain integrity ensures the data values in a database follow defined
rules for values, range, and format. A database can enforce these rules
using Check and Default constraints.

Check Constrain
CHECK constraint is used to restrict the value of a column between a
range. It performs check on the values, before storing them into the
database. It’s like condition checking before saving data into a column.

Example:

Default:
This constraint is used to provide a default value for the fields. That is, if
at the time of entering new records in the table if the user does not
specify any value for these fields then the default value will be assigned
to them.
Example:

10. Explain Entity integrity constraint with example (4M)


Ans: Entity Integrity
Entity integrity ensures each row in a table is a uniquely identifiable
entity. Entity integrity can be applied to the table by specifying a primary
key, unique key, and not null.

Primary Key:
• Primary key adds features of unique and not null constraints.
• By using primary key we can avoid duplicate and null values for the
column.
• It can be applied on any data types like int, char, etc.
• A table can contain one primary key only.

Example:

Unique Key
• This constraint helps to uniquely identify each row in the table. i.e. for a
particular column, all the rows should have unique values
• Unique constraints are used to avoid duplicate data in a column
• It also applies to any data types.
• A table can contain any number of unique constraints.

Example:
Not Null Key
• It avoids null values from column (accepts duplicate values).
• i.e. if we specify a field in a table to be NOT NULL, then the field will
never accept null value. That is, you will be not allowed to insert a new row
in the table without specifying any value to this field.
• It can apply on any data type.
• A Table can contain any number of not null constraints.

Example:

11. Explain any 4 E. F. Cod rules.( 4M)


Ans: Rule 1: The information rule a has to be presented to the user should be
in the form of table.

Rule 2: Guaranteed Access Rule


Every single data element (value) is guaranteed to be accessible logically
with a combination of table-name, primary-key (row value), and attribute-
name (column value). No other means, such as pointers, can be used to
access the data.

Rule 3: Systematic Treatment of NULL Values


The NULL values in a database must be given a systematic and uniform
treatment. This is a very important rule because a NULL can be
interpreted as one the following − data is missing, data is not known,
or data is not applicable.

Rule 6: View Updating Rule


All the view that are theoretically updatable should be updatable by the
system as well.

Rule 9: Logical Data Independence


The logical data in a database must be independent of its user’s view. Any
change in logical data must not affect the applications using it.

Rule 10: Rule of Integrity Independence


Integrity constraints should be available and stored as metadata in data
dictionary and not in the application programs.
12. Consider the following schemas : (i) Dept (Dept_No, DName, LOC) (ii) Emp
(Emp_No, Ename, Job, Sal, Dept_No) Draw and explain parent child
relationship for above schemas and apply referential integrity constraint. (4M)
Ans:

13. Explain different operations performed with DDL commands (4M)


Ans: DDL Operations:
1. Create
2. Alter
3. Drop
4. Truncate
5. Rename

1. Create: It is used to create a new table in the database.

2. Alter: It is used to alter the structure of the database. This change


could be either to modify the characteristics of an existing attribute or
probably to add a new attribute
3. Drop: It is used to delete both the structure and record stored in the
table.

4. Truncate: It is used to delete all the rows from the table and free the
space containing the table.

5. Rename: It is used to rename the old table name to new table name.

14. List 4 DML commands ( 2M).


Ans: 1. Insert
2. Update
3. Delete
4. Lock

15. List 4 DDL commands (2M)


Ans: 1. Create
2. Alter
3. Rename
4. Drop
5. Truncate
6. DESC
16. Write difference between delete and drop (2M)
Ans:

OR
In SQL, the DROP command is used to remove the whole
database or table indexes, data, and more. Whereas the
TRUNCATE command is used to remove all the rows from
the table.

Chapter 5:

17. Explain benefits and drawbacks of Denormalization. (2M)


Ans: Benefit of Denormalization:
1. It increase performance of database
2. It minimize the need for joins
3. It reduce number of Foreign Keys
4. It reduce number of relations

Drawbacks of Denormalization:
1. Denormalization speed up retrieval, but it slow down the updates
2. It is application specific.
3. It can increase size of relation .
4. Sometimes the implementation can become complex

18. Define Normalization, list its types.( 2M)


Ans: Normalization is a systematic approach of decomposing tables to
eliminate data redundancy(repetition) and undesirable characteristics like
Insertion, Update and Deletion Anomalies. It is a multi-step process that
puts data into tabular form, removing duplicated data from the relation
tables.

Types of Normalization are:


1NF,2NF,3NF,4NF,5NF
19. Consider relation R with five attributes L, M, N, O, P. You have given following
dependencies, L → M, MN → P, PO → L
(i) List all keys for R.
(ii) (ii) In what Normalized form R is ?
Justify your answer.
Ans:

20. Describe the second normal form with its example. (4M)
Ans: 2NF:
In the 2NF, relational must be in 1NF.
In the second normal form, all non-key attributes are fully
Functional dependent on the primary key.

Example:
21. Consider following relation student (Roll_No, name, class, total_marks,
percentage, Grade). Find appropriate dependencies and normalize upto 3 NF.
Ans:

Functional Dependencies:

1NF: Student(Roll_no,name.class,total_marks,percentage,Grade).

2NF: To convert It into 2NF, We have to decompose the given table into
two tables with fully functional dependencies and establishing a
referential integrity constraint relationship among the two tables.
Student(Roll_No, name, class )
Marks(Roll_No, total_marks, Percentage, Grade)

3NF: To convert the above tables in 3NF ,We have to decompose them in
three tables satisfying the transitive dependencies property .
Student(Roll_No, name, class )
Marks(Roll_No, total_marks, percentage)
Grade (percentage, Grade)

22. Describe the BCNF with its example.


Ans:
o BCNF is the advance version of 3NF. It is stricter than 3NF.
o A table is in BCNF if every functional dependency X → Y, X is the super key of the table.
o For BCNF, the table should be in 3NF, and for every FD, LHS is super key.

Example:

Employee Table
23. Describe first normal form with example
Ans: First Normal Form (1NF):
A relation is said to be 1NF if and only if every entry of the relation has at
most a single (atomic) value.
OR
A relation R is said to be in first normal form (1NF) if the domain of all
attributes of R are atomic.
It does not allow multivalued attributes and composite attributes.
Example
Supplier (sno, sname, location, pno, qty)

The above relation is in 1NF as all the domains are having atomic value. But
it is not in 2NF.

24. Describe functional dependency with example (4M)


Ans:
Functional Dependency is a constraint between two sets of
attributes in a relation from a database.
A functional dependency is denoted by arrow (→). If an attributed A
functionally determines B, then it is written as A → B.
For example, employee_id → name
here, employee_id functionally determines the name of the employee.

You might also like