MCS-043 December 2018

If you have any queries please leave a message here
Your Message
×


1. (a) Explain the process of Query optimization with suitable example.

Answer : -


1. (b) What is the difference between Document Type Definition (DTD) and XML Schema ? Explain using an example.

Answer : -

Document Type Definition (DTD)XML Schema Definition (XSD)
DTD is not extensibleXSD is extensible. You can derive new elements from the existing elements.

DTD does not support namespace instead it has its own set of keywords for defining a schema

Example

!DOCTYPE for root tag
!ELEMENT for an element
!ATTLIST for an attribute
!ENTITY for defining variables.

XSD uses its own set of namespaces and elements for defining the schema.
No real datatype support. DTD has only #PCDATA as the data type for the elements.(it is used for string datatype)

Provides flexible set of datatypes.

  1. Primitive/Fundamental Data Types - string, decimal, float, boolean

  2. Custom Data Types

    • Complex Type - a data type that contains child elements or attributes and also the mixed contents.
    • Simple Type - a data type that contains only values.

You cannot specify the default values of elements in DTD.XSD supports default values. You can specify default values of the elements.
You cannot include other DTDs within a DTD.XSD supports references to external XML schemas. You can include or import more than one XML schema within an XML schema.


Example of XML Schema Definition (XSD)

<xs:element name="employee">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="salary" type="xs:integer"/>
<xs:element name="joindate" type="xs:date"/>
</xs:sequence>
</xs:complexType>
</xs:element>


Example of Document Type Definition (DTD)

<!ELEMENT employee (id, name, salary, joindate)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT salary (#PCDATA)>
<!ELEMENT joindate (#PCDATA)>




1. (c) Explain Data mining in the context of knowledge discovery in databases.

Answer : -


1. (d) What is Join dependency ? Explain it with the help of an example. What is trivial join dependency ?

Answer : -


1. (e) Consider a small institute in which students register for programmes run by the institute. A programme can be a full or part time programme or both. Every student necessarily registers in at least one programme and at most three programmes, Assuming suitable attributes, design an EER Diagram for the same.

Answer : -


1. (f) Explain the reference architecture for distributed database management systems

Answer : -




1. (g) What are triggers ? Explain the utility of triggers in DBMS. Give suitable SQL code for triggers.

Answer : - 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:


Utility of Triggers in DBMS


Example - Write a trigger for a bank which show the transaction details of an account when transaction is made from this account.

account (account_number, customer_id, branch_id, balance)

transaction.sql
CREATE OR REPLACE TRIGGER transaction
AFTER UPDATE OF balance ON Account
FOR EACH ROW
WHEN (NEW.balance > 0)
DECLARE
amount NUMBER(10,2);
BEGIN
IF :NEW.balance > :OLD.balance THEN
amount := :NEW.balance - :OLD.balance;
dbms_output.put_line('Amount Credit : ' || amount);
ELSE
amount := :OLD.balance - :NEW.balance;
dbms_output.put_line('Amount Debit : ' || amount);
END IF;
dbms_output.put_line('Old Balance : ' || :OLD.balance);
dbms_output.put_line('New Balance : ' || :NEW.balance);
END;
/




1. (h) What is a System catalogue ? What is the information stored in catalogue of RDBMS ?

Answer : -


2. (a) Compare and contrast the following :

Answer : -

i) JDBC and ODBC




2. (b) What is multiversion two-phase locking ? Explain with an example.

Answer : -


2. (c) What are the different type of security features, needed for a multilevel security system ? Explain the encryption technique for a multilevel security system.

Answer : -


3. (a) Describe the following with suitable example or a diagram :

Answer : -

i) Data Grid

A data grid is an architecture or set of services that gives individuals or groups of users the ability to access, modify and transfer extremely large amounts of geographically distributed data for research purposes. Data grids make this possible through a host of middleware applications and services that pull together data and resources from multiple administrative domains and then present it to users upon request. The data in a data grid can be located at a single site or multiple sites where each site can be its own administrative domain governed by a set of security restrictions as to who may access the data. Likewise, multiple replicas of the data may be distributed throughout the grid outside their original administrative domain and the security restrictions placed on the original data for who may access it must be equally applied to the replicas.


ii) Data Mart

A data warehouse (DWH) is a system used to store information for use in data analysis and reporting. Data marts are areas of a data warehouses used to store information needed by a single department or even by an individual user. (Think of the DWH as a building, and data marts as offices inside the building.)


iii) Deadlock

A deadlock is a condition where two or more transactions are waiting indefinitely for one another to give up locks.

For example - in the student table, transaction T1 holds a lock on some rows and needs to update some rows in the grade table. Simultaneously, transaction T2 holds locks on some rows in the grade table and needs to update the rows in the Student table held by Transaction T1.

Now, the main problem arises. Now Transaction T1 is waiting for T2 to release its lock and similarly, transaction T2 is waiting for T1 to release its lock. All activities come to a halt state and remain at a standstill. It will remain in a standstill until the DBMS detects the deadlock and aborts one of the transactions.


iv) Checkpoint

When more than one transaction are being executed in parallel, the logs are interleaved. At the time of recovery, it would become hard for the recovery system to backtrack all logs, and then start recovering. To ease this situation, most modern DBMS use the concept of 'checkpoints'

Keeping and maintaining logs in real time and in real environment may fill out all the memory space available in the system. As time passes, the log file may grow too big to be handled at all. Checkpoint is a mechanism where all the previous logs are removed from the system and stored permanently in a storage disk. Checkpoint declares a point before which the DBMS was in consistent state, and all the transactions were committed.


v) Referential Integrity Constraint

Example of referential integrity constraint in the Customer/Order database of a Company :

Customer (CustID, CustName)
Order (OrderID, CustID, OrderDate)

The referential integrity constraint states that the customer ID (CustID) in the Order table must match a valid CustID in the Customer table.




3. (b) What are views ? What is their significance in DBMS ? How are views created in SQL ? Explain it with the help of an SQL statement.

Answer : - In SQL, a view is a virtual table based on the result-set of an SQL statement.

A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.

A View can either have all the rows of a table or specific rows based on certain condition.

Syntax :

CREATE or REPLACE VIEW view_name AS SELECT column_name(s) FROM table_name(s) WHERE condition;

A view can be dropped using a DROP statement as :
DROP VIEW view_name;

There are many advantages using view :


Example :

A student''s database may have the following tables :
student ( name, enrolment_no, date_of_birth )
marks ( enrolment_no, subject_code, marks )

CREATE VIEW subject_performance AS SELECT s.enrolment_no, name, subject_code, marks FROM student AS s, marks AS m WHERE s.enrolment_no=m.enrolment_no AND subject_code='MCS-043' ORDER BY s.enrolment_no;

Once a view has been created, it can be queried exactly like a base table. For example :




4. (a) Differentiate between the following :

Answer : -

Centralized DBMS
Distributed DBMS
A type of database that contains a single database located at one location in the networkA type of database that contains two or more database files located at different locations in the network
Managing, updating and taking in backups of data is easier because there is only one database fileAs there are multiple database files in a distributed database, it requires time to synchronize data
Requires time for accessing data because multiple users access the database fileSpeed in accessing the data is higher because the data is retrieved from the nearest database file
If the database fails, the user do not have access to a databaseIf one database fails, the users can still access other database files




4. (b) What are deadlocks ? How are deadlocks detected ? Explain with the help of an example

Answer : - A deadlock is a condition where two or more transactions are waiting indefinitely for one another to give up locks.

For example - in the student table, transaction T1 holds a lock on some rows and needs to update some rows in the grade table. Simultaneously, transaction T2 holds locks on some rows in the grade table and needs to update the rows in the Student table held by Transaction T1.

Now, the main problem arises. Now Transaction T1 is waiting for T2 to release its lock and similarly, transaction T2 is waiting for T1 to release its lock. All activities come to a halt state and remain at a standstill. It will remain in a standstill until the DBMS detects the deadlock and aborts one of the transactions.


Deadlock Detection

When a transaction waits indefinately to obtain a lock, The database managememt system should detect whether the transaction is involved in a deadlock or not.

Wait-for-graph is one of the methods for detecting the deadlock situation. This method is suitable for smaller database. In this method a graph is drawn based on the transaction and their lock on the resource. If the graph created has a closed loop or a cycle, then there is a deadlock.




5. (a) What is semi-structured data ? Explain with the help of an example. What is the difference between a well formed XML document and a valid XML document ?

Answer : -


5. (b) What is data warehousing ? Discuss various characteristics of data warehousing ?

Answer : - A data warehouse is a database used to store data. It is a central repository of data in which data from various sources is stored. The purpose of a data warehouse is to provide flexible access to the data to the user. Data warehousing generally refers to the combination of many different databases across an entire enterprise. Data warehouses store current as well as historical data, so that all of the relevant data may be used for analysis. The analysis helps to find and show relationships among the data, to extract meaning from the data.




5. (c) What are multimedia databases ? Discuss the challenges of designing multimedia databases.

Answer : - A Multimedia database (MMDB) is a collection of related for multimedia data. The multimedia data include one or more primary media data types such as text, images, graphic objects (including drawings, sketches and illustrations), animation sequences, audio and video. These data types are broadly categorized into three classes:


Contents of Multimedia Database Management System (MMDBMS)


Challenges of Multimedia Database

  1. Multimedia databases contains data in a large type of formats such as .txt(text), .jpg(images), .avi(videos), .mp3(audio) etc. It is difficult to convert one type of data format to another.
  2. Multimedia database consume a lot of processing time, as well as bandwidth.
  3. The data size of multimedia is large such as video; therefore, multimedia data often require a large storage.




5. (d) What is multi-valued dependency ? State the fourth normal form.

Answer : - A multi-value dependency exists when

Fourth Normal Form is related to Multi-value Dependency. Under fourth normal form, a record type should not contain two or more independent multi-value facts about an entity. In addition the record must satisfy third normal form.

If a table in 4NF then -

Example -
Course(Course_code, Professor, Reference_book)

Multivalue Dependency
Course_code → → Professor
Course_code → → Reference_book

Table Name : Course
Course_codeProfessorReference_book
C-100
Mr. X
The TCP/IP Guide
(Charles M. Kozierok)
C-100
Mr. Y
The TCP/IP Guide
(Charles M. Kozierok)
C-200
Mr. A
Linux Shell Scripting with Bash
(Ken O. Burtch)
C-200
Mr. A
Shell Scripting
(Steven Parker)
C-200
Mr. B
Linux Shell Scripting with Bash
(Ken O. Burtch)

The table reflects the following conditions :

Table Name : Instructor
Course_codeProfessor
C-100Mr. X
C-100Mr. Y
C-200Mr. A
C-200Mr. B

Table Name : Textbook
Course_codeReference_book
C-100
The TCP/IP Guide
(Charles M. Kozierok)
C-200
Linux Shell Scripting with Bash
(Ken O. Burtch)
C-200
Shell Scripting
(Steven Parker)





ABOUT US

QuestionSolves.com is an educational website that helps worldwide students in solving computer education related queries.

Also, different software like Visual Studio, SQL Server, Oracle etc. are available to download in different versions.

Moreover, QuestionSolves.com provides solutions to your questions and assignments also.


MORE TOPIC


Windows Command

UNIX Command

IGNOU Assignment Solution

IGNOU Question Paper Solution

Solutions of Different Questions


WHAT WE DO


Website Devlopment

Training

Home Learning

Provide BCA, MCA Projects

Provide Assignment & Question Paper Solution


CONTACT US


Follow Us