Professional Documents
Culture Documents
tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
Q1. Consider a small institute in which students register through on-line mode for programmes run by the institute. A student
can be a full time or part time . A program can be offered through a normal mode ( face to face) or on-line. Every student
necessarily registers in at least one programme and at most two programmes. After completion of a program, students are issued
a certificate. Assuming suitable attributes, design an EER Diagram for the same.
a) Draw the EER (extended ER) diagram for the above problem showing all entities, attributes and relationship. Also identify
multi-valued and derived attributes.
Answer : -
Q1. b) Draw the appropriate tables and relationship among the tables for the above diagram and normalize the tables up to 3NF.
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
Answer : -
course_code varchar(10) Primary Key Uniquely identify each Course/Subject in this table
professor_id varchar(10) Primary Key Uniquely identify each Professor in this table
p_code varchar(10) Primary Key Uniquely identify each Programme in this table
c_code varchar(20) Primary Key Uniquely identify each Class in this table
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
student_id varchar(10) Primary Key Uniquely identify each Student in this table
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
Q1. c) Include generalization and aggregation features in the diagram, draw their tabular representations and UML class
diagram. Explain
Answer : -
Q1. d) Identify weak entity sets in the above diagram if any. Show how will you convert a weak entity set to a strong entity set?
What is the need of such task?
Answer : - An entity type should have a key attribute which uniquely identifies each entity in the entity set, but there exists some entity type for which key
attribute can’t be defined. These are called Weak Entity type.
The entity sets which do not have sufficient attributes to form a primary key are known as weak entity sets and the entity sets which have a primary key are
known as strong entity sets.
We can convert any weak entity set to a strong entity set by simply adding appropriates attributes.
exam_schedule(exam_code, course_code, exam_date, exam_time, duration)
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
Q1. f) Create an XML schema for the grade card to be issued by the division having details: student id, programme code, course
id, grade, program delivery mode, assignments marks, TEE marks.
Answer : -
GradeCard.xsd
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.questionsolves.com"
xmlns="http://www.questionsolves.com"
elementFormDefault="qualified">
<xs:element name="GradeCard">
<xs:complexType>
<xs:sequence>
<xs:element name="StudentId" type="xs:integer"/>
<xs:element name="ProgrammeCode" type="xs:string"/>
<xs:element name="Course" maxOccurs="unbounded"/>
<xs:complexType>
<xs:sequence>
<xs:element name="CourseID" type="xs:string"/>
<xs:element name="AssignmentMarks" type="xs:integer"/>
<xs:element name="TEEMarks" type="xs:integer"/>
<xs:element name="Grade" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Q2. What are XML databases? What are the benefits of using XML? What are its applications? Explain.
Answer : -
Q3. Define cursors, stored procedures and triggers and write SQL syntaxes for each. What are the advantages and
disadvantages of stored procedures? What are the main features of a cursor?
Answer : -
Cursor - A cursor is a temporary work area created in the system memory when a SQL statement is executed. A cursor contains information on a select
statement and the rows of data accessed by it.
This temporary work area is used to store the data retrieved from the database, and manipulate this data. A cursor can hold more than one row, but can process
only one row at a time. The set of rows the cursor holds is called the active set
Syntax :
Example
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
Syntax :
Triggers - Triggers are stored programs, which are automatically executed or fired when some events occur. Triggers are, in fact, written to be executed in
response to any of the following events:
Syntax :
Example - Write a trigger for a bank which show the transaction details of an account when transaction is made from this account.
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
• Since procedures are compiled once and stored in executable form, whenever you call a procedure the response is quick.
• You can group all the required SQL statements in a procedure and execute them at once.
• Once you compile a stored procedure you can use it in any number of applications. If any changes are needed you can just change the procedures
without touching the application code.
• Access to the Oracle data can be restricted by allowing users to manipulate the data only through stored procedures that execute with their definer’s
privileges.
• Testing of a logic which is encapsulated inside a stored procedure is very difficult. Any data errors in handling stored procedures are not generated until
runtime.
• An extra developer in the form of DBA is required to access the SQL and write a better stored procedure. This will automatically incur added cost.
• Complex stored procedures will not always port to upgraded versions of the same database. This is specially true in case of moving from one database
type(Oracle) to another database type(MS SQL Server).
Q4. Explain primary key, foreign key, super key and composite key with the help of an example for each key. Also write the
important features of each.
Answer :
Primary Key - A primary key is a column (or columns) in a table that uniquely identifies the rows in that table.
The value placed in primary key columns must be unique for each row : no duplicates can be tolerated. In addition, nulls are not allowed in primary key
columns.
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
Foreign Key - Foreign keys are columns that point to primary key columns.
Employee_id is the primary key of the table Employee and Department_id is the primary key of the table Department but in Employee table Department_id is
the foreign key that points to the primary key in the Department table.
Super Key - A super key is a combination of all possible attribute which can uniquely identify the rows(tuples) in a table. This means that a superkey may have
some extra attribute which isn't necessary for uniquely identifying the rows in the table.
In the given Employee table we can have the following keys as the super key.
1. { Employee_id }
2. { Employee_id, Employee_name }
3. { Employee_id, Department_id }
4. { Employee_id, Employee_name, Department_id }
Composite Key - If any single attribute of a table is not capable of being the key i.e it cannot identify a row uniquely, then we combine two or more attributes
to form a key. This is known as a composite key.
MCA-00001 MCS-041 72
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
MCA-00001 MCS-043 68
MCA-00002 MCS-041 75
MCA-00002 MCS-043 62
Q5. What are the algorithms that can be used to implement JOIN operation? What is the criteria for selecting a particular join
algorithm? Explain Hash Join algorithm and perform its cost calculation
Answer : -
Q6. What is concurrency control? What is the need of applying concurrency control methods in database? Give an example.
Write the algorithm of timestamp based ordering protocol and explain through an example. What are the problems with this
algorithm and what are the proposed solutions for it?
Answer : -
Answer : -
Q8. State the differences between classification and clustering. Write an algorithm of K-Means clustering. Explain the algorithm
with the help of an example.
Answer : -
Q9. What are Semantic databases? Give the features of semantic databases. Discuss the process of searching the knowledge in
these databases.
Answer : - The semantic data model is a method of structuring data in order to represent it in a specific logical way. It is a conceptual data model that includes
semantic information that adds a basic meaning to the data and the relationships that lie between them. This approach to data modeling and data organization
allows for the easy development of application programs and also for the easy maintenance of data consistency when data is updated.
In this data model the data is organized in such a way that it can be interpreted meaningfully without human intervention.
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.
• Facebook-https://www.facebook.com/dalal.tech
• telegram - https://t.me/DalalTechnologies
• YouTube-https://www.youtube.com/channel/UCilEr1rW-SIrJlJ5_ioKQfw
inconsistency and possible improvement. This would help streamline the relationship between company and vendors, making database sharing and integration
much simpler. Environments and systems can also be organized graphically within a database to give a more visually-based representation of that system or
environment. Recently, a semantic language called Gellish was developed as a formal language to represent data models. Gellish can be interpreted solely by
computers and needs no human interaction.
Disclaimer/Note
These are just the sample of the answers/solution to some of the questions given in the assignments. Student should read and refer the official study material provided by
the university.