17
Your favorite blog :www.vijay-jotani.weebly.com (popularly known as “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAY JOTANI’S BLOG” please check answers before writing we are not responsible for anything…. MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACE CENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serve your problems and material….so we request you to co-operate us….yes, when sir will become free from his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani at facebook.com/vijay.jotani…… Course Code : MCS-043 Course Title : Advanced Database Management Systems Assignment Number : MCA (4)/043/Assign/2014-15 Maximum Marks : 100 Weightage : 25% Last Dates for Submission : 15 7 th October, 2014 (For July 2014 Session) 15 th April, 2015 (For January 2015 Session) This assignment has seven questions, which carries 80 marks. Answer all the questions. Rest 20 marks are for viva voce. You may use illustrations and diagrams to enhance explanations. Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation. Answer to each part of the question should be confined to about 300 words. Q.1. Construct an E-R diagram and the corresponding relational database for a University/ College’s office. The office contains data about each class, including the instructor, the enrolment, the time and room number of the class. For each student the number of subjects and the class is recorded. Document all assumptions that you make about the mapping constraints. (10 marks) VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM WWW.VIJAY-JOTANI.WEEBLY.COM BUY VEDIO Tutorials FOR JEE MAIN WITH LOTS OF PROBLEM SOLVING SHORT TRICKS AND TIPS www.vijay-jotani.weebly.com WWW.VIJAY-JOTANI.WEEBLY.COM

43exceptq2

Embed Size (px)

DESCRIPTION

ignou

Citation preview

Page 1: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

Course Code : MCS-043Course Title : Advanced Database Management SystemsAssignment Number : MCA (4)/043/Assign/2014-15Maximum Marks : 100Weightage : 25%Last Dates for Submission : 157

th

October,

2014 (For July 2014 Session)15th

April, 2015 (For January 2015 Session)

This assignment has seven questions, which carries 80 marks. Answer all thequestions. Rest 20 marks are for viva voce. You may use illustrations and diagramsto enhance explanations. Please go through the guidelines regarding assignmentsgiven in the Programme Guide for the format of presentation. Answer to each partof the question should be confined to about 300 words.

Q.1.Construct an E-R diagram and the corresponding relational databasefor a University/ College’s office. The office contains data abouteach class, including the instructor, the enrolment, the time androom number of the class. For each student the number of subjectsand the class is recorded. Document all assumptions that you makeabout the mapping constraints.(10 marks)

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 2: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 3: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 4: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 5: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

Q.2.

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 6: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

Consider the following relation scheme:students (S#,Sname)Courage ( C#, c name, Tname)Studies (S#, C#)Write the relational algebra queries and SQL queries for thefollowing:1) List students who are not studying in Course No. C22) Get the student details of those students who are studying inboth courses, with course number, C4 and course no. C6-----------------if you have solved this….send me on [email protected]

Q.3. List and explain the two integrity rules of relational model with thehelp of a suitable example for each.(5 marks)Entity Integrity – Every table requires a primary key. The primary key, nor any part of the primary key, can containNULL values. This is because NULL values for the primary key means we cannot identify some rows. For example, inthe EMPLOYEE table, Phone cannot be a key since some people may not have a phone.

Referential integrity – a foreign key must have a matching primary key or it must be null.This means that a foreign key is a reference to a primary key in another table.

Integrity Rules Although integrity rules are not part of normal forms, they are definitely part of thedatabase design process. Integrity rules are broken into two categories. They include overall integrityrules and database-specific integrity rules. Overall Rules The two types of overall integrity rulesare referential integrity rules and entity integrity rules. Referential integrity rules dictate that a database doesnot contain orphan foreign key values. This means that · Child rows cannot be added for parent rowsthat do not exist. In other words, an order cannot be added for a nonexistent customer. · A primary keyvalue cannot be modified if the value is used as a foreign key in a child table. This means that a CustomerID inthe customers table cannot be changed if the orders table contains rows with that CustomerID. · A parent rowcannot be deleted if child rows are found with that foreign key value. For example, a customer cannot bedeleted if the customer has orders in the order table. Entity integrity dictates that the primary key value cannotbe Null. This rule applies not only to single-column primary keys, but also to multi-column primary keys. In fact, ina multi-column primary key, no field in the primary key can be Null. This makes sense because, if any part of theprimary key can be Null, the primary key can no longer act as a unique identifier for the row. Fortunately, theAccess Database Engine (Access 2007's new version of the JET database engine, available with the new ACCDB fileformat) does not allow a field in a primary key to be Null. Database-Specific Rules The other set of rulesapplied to a database are not applicable to all databases but are, instead, dictated by business rulesthat apply to a specific application. Database-specific rules are as important as overall integrity rules.They ensure that only valid data is entered into a database. An example of a database-specific integrityrule is that the delivery date for an order must fall after the order date.

Qns 4: Define Hash join and explain the process and cost calculation of Hash join with thehelpof an example.

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 7: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

Ans:

This is applicable to both the equi-joins and natural joins. A hash function h is used to partition tuples ofboth relations, where h maps joining attribute (enroll no in our example) values to {0, 1, ..., n-1}.The join attribute is hashed to the join-hash partitions. In the example of Figure 4 we have used mod 100function to hashing, and n = 100.

Figure 4: A hash-join exampleOnce the partition tables of STUDENT and MARKS are made on the enrolment number, then only thecorresponding partitions will participate in the join as:A STUDENT tuple and a MARKS tuple that satisfy the join condition will have the same value for thejoin attributes. Therefore, they will be hashed to equivalent partition and thus can be joined easily.

Cost calculation for Simple Hash-Join(i) Cost of partitioning r and s: all the blocks of r and s are read once and after partitioning written back,so cost 1 = 2 (blocks of r + blocks of s).(ii)Cost of performing the hash-join using build and probe will require at least one block transfer forreading the partitions

Cost 2 = (blocks of r + blocks of s)(iii)

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 8: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

There are a few more blocks in the main memory that may be used for evaluation, they may be reador written back. We ignore this cost as it will be too less in comparison to cost 1 and cost 2.

Thus, the total cost = cost 1 + cost 2= 3 (blocks of r + blocks of s)Cost of Hash-Join requiring recursive partitioning:(i) The cost of partitioning in this case will increase to number of recursion required, it may be calculatedas:

Number of iterations required = ([logThus, cost 1 will be modified as:= 2 (blocks of r + blocks of s) × ([logM-1M-1

(blocks of s] -1)(blocks of s)] -1)The cost for step (ii) and (iii) here will be the same as that given in steps (ii) and (iii) above.Thus, total cost = 2(blocks of r + blocks of s) ( [log(blocks of s) – 1] ) + (blocks of r +blocks of s).M–1

Because s is in the inner term in this expression, it is advisable to choose the smaller relation as the buildrelation. If the entire build input can be kept in the main memory, n can be set to 1 and the algorithm neednot partition the relations but may still build an in-memory index, in such cases the cost estimate goesdown to (Number of blocks r + Number of blocks of s).Qns 5 i) List the feature of semantic databaseAns:

Semantic modeling is one of the tools for representing knowledge especially in Artificial Intelligence andobject-oriented applications. Thus, it may be a good idea to model some of the knowledge databases usingsemantic database system.Some of the features of semantic modeling and semantic databases are:

these models represent information using high-level modeling abstractions, these models reduce the semantic overloading of data type constructors, semantic models represent objects explicitly along with their attributes, semantic models are very strong in representing relationships among objects, and they can also be modeled to represent IS A relationships, derived schema and also complexobjects.

ii) Explain clustering in data mining.Ans:

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 9: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

database D={t1,t2,…,tn} of tuples and an integer value k, the Clustering problem is to define a mappingwhere each tuple ti is assigned to one cluster Kj, 1<=j<=k. A Cluster, Kj, contains precisely those tuplesmapped to it. Unlike the classification problem, clusters are not known in advance. The user has to theenter the value of the number of clusters k. In other words a cluster can be defined as the collection ofdata objects that are similar in nature, as per certain defining property, but these objects are dissimilar tothe objects in other clusters. Some of the clustering examples are as follows: • To segment the customerdatabase of a departmental store based on similar buying patterns. • To identify similar Web usagepatterns etc. Clustering is a very useful exercise specially for identifying similar groups from the givendata. Such data can be about buying patterns, geographical locations, web information and many more.Some of the clustering Issues are as follows:

• Outlier handling: How will the outlier be handled? (outliers are the objects that do not comply with thegeneral behaviour or model of the data) Whether it is to be considered or it is to be left aside whilecalculating the clusters?• Dynamic data: How will you handle dynamic data?• Interpreting results: How will the result be interpreted?• Evaluating results: How will the result be calculated?• Number of clusters: How many clusters will you consider for the given data?• Data to be used: whether you are dealing with quality data or the noisy data? If, the data is noisy how isit to be handled?• Scalability: Whether the algorithm that is used is to be scaled for small as well as large dataset/database. There are many different kinds of algorithms for clustering.

iii) Explain the characteristics of mobile database. Also give an application of mobiledatabase.Ans:

Characteristics of Mobile Databases The mobile environment has the following characteristics:1) Communication Latency: Communication latency results due to wireless transmission between thesources and the receiver. But why does this latency occur?It is primarily due to the following reasons:a) due to data conversion/coding into the wireless formats,b) tracking and filtering of data on the receiver, andc) the transmission time.2) Intermittent wireless connectivity: Mobile stations are not always connected to the base stations.Sometimes they may be disconnected from the network.3) Limited battery life: The size of the battery and its life is limited. Information communication is amajor consumer of the life of the battery.4) Changing location of the client: The wireless client is expected to move from a present mobilesupport station to an other mobile station where the device has been moved. Thus, in general, the

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 10: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

topology of such networks will keep on changing and the place where the data is requested also changes.This would require implementation of dynamic routing protocols.

Because of the above characteristics the mobile database systems may have the following features:

Very often mobile databases are designed to work offline by caching replicas of the most recent state ofthe database that may be broadcast by the mobile support station. The advantages of this scheme are:

• it allows uninterrupted work, and• reduces power consumption as data communication is being controlled.

iv) How is audit trail done in database? How are they related to database security?Ans:

AUDIT TRAILS IN THE DATABASESOne of the key issues to consider while procuring a database security solution is making sure you have asecure audit-trail. An audit trail tracks and reports activities around confidential data. Many companieshave not realised the potential amount of risk associated with sensitive information within databasesunless they run an internal audit which details who has access to sensitive data and have assessed it.Consider the situation that a DBA who has complete control of database information may conduct asecurity breach, with respect to business details and financial information. This will cause tremendousloss to the company. In such a situation database audit helps in locating the source of the problem. Thedatabase audit process involves a review of log files to find and examine all reads and writes to databaseitems during a specific time period, to ascertain mischief if any, banking database is one such databasewhich contains very critical data and should have the security feature of auditing. An audit trail is a logthat is used for the purpose of security auditing

Database auditing is one of the essential requirements for security especially, for companies in possessionof critical data. Such companies should define their auditing strategy based on their knowledge of theapplication or database activity. Auditing need not be of the type “all or nothing”. One must do intelligentauditing to save time and reduce performance concerns. This also limits the volume of logs and alsocauses more critical security events to be highlighted.

More often then not, it is the insiders who makes database intrusions as they often have networkauthorisation, knowledge of database access codes and the idea about the value of data they want toexploit. Sometimes despite having all the access rights and policies in place, database files may bedirectly accessible (either on the server or from backup media) to such users. Most of the databaseapplications, store information in ‘form text’ that is completely unprotected and viewable.

As huge amounts are at stake, incidents of security breaches will increase and continue to be widespread.For example, a large global investment bank conducted an audit of its proprietary banking data. It was

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 11: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

revealed that more than ten DBAs had unrestricted access to their key sensitive databases and overhundred employees had administrative access to the operating systems. The security policy that was inplace was that proprietary information in the database should be denied to employees who did not requireaccess to such information to perform their duties. Further, the bank’s database internal audit alsoreported that the backup data (which is taken once every day) was also cause for concern as tapes couldget stolen. Thus the risk to the database was high and real and that the bank needed to protect its data.

However, a word of caution, while considering ways to protect sensitive database information, pleaseensure that the privacy protection process should not prevent authorized personnel from obtaining theright data at the right time.

The credit card information is the single, most common financially traded information that is desired bydatabase attackers. The positive news is that database misuse or unauthorized access can be preventedwith currently available database security products and audit procedures.

Qns 6:i) How does OLAP support query processing in data warehouse.Ans:Data warehouses are not suitably designed for transaction processing, however, they support increasedefficiency in query processing. Therefore, a data warehouse is a very useful support for the analysis ofdata. But are there any such tools that can utilise the data warehouse to extract useful analyticalinformation?On Line Analytical Processing (OLAP) is an approach for performing analytical queries and statisticalanalysis of multidimensional data. OLAP tools can be put in the category of business intelligence toolsalong with data mining. Some of the typical applications of OLAP may include reporting of salesprojections, judging the performance of a business, budgeting and forecasting etc.OLAP tools require multidimensional data and distributed query-processing capabilities. Thus, OLAP hasdata warehouse as its major source of information and query processing. But how do OLAP tools work?In an OLAP system a data analyst would like to see different cross tabulations by interactively selectingthe required attributes. Thus, the queries in an OLAP are expected to be executed extremely quickly.The basic data model that may be supported by OLAP is the star schema, whereas, the OLAP tool may becompatible to a data warehouse.Let us, try to give an example on how OLAP is more suitable to a data warehouse rather than to arelational database. An OLAP creates an aggregation of information, for example, the sales figures of asales person can be grouped (aggregated) for a product and a period. This data can also be grouped forsales projection of the sales person over the regions (North, South) or states or cities. Thus, producingenormous amount of aggregated data. If we use a relational database, we would be generating suchdata many times. However, this data has many dimensions so it is an ideal candidate for representationthrough a data warehouse. The OLAP tool thus, can be used directly on the data of the data warehouse

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 12: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

to answer many analytical queries in a short time span. The term OLAP is sometimes confused withOLTP. OLTP is online transaction processing. OLTP systems focus on highly concurrent transactions andbetter commit protocols that support high rate of update transactions. On the other hand, OLAP focuseson good query-evaluation and query-optimization algorithms.ii) Differentiate between embedded SQL and dynamic SQL. Give an example of embeddedSQL.Ans:Embedded SQL: The embedded SQL statements can be put in the application program written in C, Javaor any other host language. These statements sometime may be called static. Why are they called static?The term ‘static’ is used to indicate that the embedded SQL commands, which are written in the hostprogram, do not change automatically during the lifetime of the program. Thus, such queries aredetermined at the time of database application design. For example, a query statement embedded in C todetermine the status of train booking for a train will not change. However, this query may be executed formany different trains. Please note that it will only change the input parameter to the query that istrainnumber,dateofboarding,etc.,andnotthequeryitself.

Dynamic SQL: Dynamic SQL, unlike embedded SQL statements, are built at the run time and placed in astring in a host variable. The created SQL statements are then sent to the DBMS for processing. DynamicSQL is generally slower than statically embedded SQL as they require complete processing includingaccess plan generation during the run time.

However, they are more powerful than embedded SQL as they allow run time application logic. The basicadvantage of using dynamic embedded SQL is that we need not compile and test a new program for anew query.

Example of Embedded SQL

Cursors and Embedded SQL: on execution of an embedded SQL query, the resulting tuples arecached in the cursor. This operation is performed on the server. Sometimes the cursor is opened byRDBMS itself – these are called implicit cursors. However, in embedded SQL you need to declare thesecursors explicitly – these are called explicit cursors. Any cursor needs to have the following operationsdefined on them:

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 13: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

DECLARE – to declare the cursorOPEN AND CLOSE - to open and close the cursorFETCH – get the current records one by one till end of tuples.In addition, cursors have some attributes through which we can determine the state of the cursor. Thesemay be:

ISOPEN – It is true if cursor is OPEN, otherwise false.FOUND/NOT FOUND – It is true if a row is fetched successfully/not successfully.ROWCOUNT – It determines the number of tuples in the cursor.

Let us explain the use of the cursor with the help of an example:

Example: Write a C program segment that inputs the final grade of the students of MCA programme.Let us assume the relation:

STUDENT (enrolno:char(9), name:Char(25), phone:integer(12),prog-code:char(3)); grade: char(1));

EXEC SQL BEGIN DECLARE SECTION;Char enrolno[10], name[26], p-code[4], grade /* grade is just one character*/int phone;int SQLCODE;char SQLSTATE[6]EXEC SQL END DECLARE SECTION;

printf (“enter the programme code);scanf (“%s, &p-code);EXEC SQL DECLARE CURSOR GUPDATESELECT enrolno, name, phone, gradeFROM STUDENTWHERE progcode =: p-codeFOR UPDATE OF grade;EXEC SQL OPEN GUPDATE;

EXEC SQL FETCH FROM GUPDATEINTO :enrolno, :name, :phone, :grade;WHILE (SQLCODE==0){printf (“enter grade for enrolment number, “%s”, enrolno);scanf (“%c”, grade);EXEC SQLUPDATE STUDENT

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 14: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

SET grade=:gradeWHERE CURRENT OF GUPDATEEXEC SQL FETCH FROM GUPDATE;}EXEC SQL CLOSE GUPDATE;

Qns 7:Explain the following with the help of an example:

i) Application of Datagrid

Ans:

A data grid is an architecture or set of services that gives individuals or groups ofusers the ability to access, modify and transfer extremely large amounts ofgeographically distributed data for research purposes.[1] Data grids make this possiblethrough a host of middleware applications and services that pull together dataand resources from multiple administrative domains and then present it to usersupon request. The data in a data grid can be located at a single site or multiple siteswhere each site can be its own administrative domain governed by a set of securityrestrictions as to who may access the data.[2]Likewise, multiple replicas of the datamay be distributed throughout the grid outside their original administrative domainand the security restrictions placed on the original data for who may access it mustbe equally applied to the replicas.[3] Specifically developed data grid middleware iswhat handles the integration between users and the data they request by controllingaccess while making it available as efficiently as possible. The diagram to the rightdepicts a high level view of a data grid.

ii) XML and HTML

Ans:

Most documents on Web are currently stored and transmitted in HTML. One strength of HTML is itssimplicity. However, it may be one of its weaknesses with the growing needs of users who want HTMLdocuments to be more attractive and dynamic. XML is a restricted version of SGML, designed especiallyfor Web documents. SGML defines the structure of the document (DTD), and text separately. By givingdocuments a separately defined structure, and by giving web page designers ability to define custom

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 15: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

structures, SGML has and provides extremely powerful document management system but has not beenwidely accepted as it is very complex. XML attempts to provide a similar function to SGML, but is lesscomplex. XML retains the key SGML advantages of extensibility, structure, and validation. XML cannotreplace HTML.

iii)Data-marts

Ans:Data marts can be considered as the database or collection of databases that are designed to helpmanagers in making strategic decisions about business and the organization. Data marts are usuallysmaller than data warehouse as they focus on some subject or a department of an organization (a datawarehouses combines databases across an entire enterprise). Some data marts are also called dependentdata marts and may be the subsets of larger data warehouses.

A data mart is like a data warehouse and contains operational data that helps in making strategic decisionsin an organization. The only difference between the two is that data marts are created for a certain limitedpredefined application. Even in a data mart, the data is huge and from several operational systems,therefore, they also need a multinational data model. In fact, the star schema is also one of the popularschema choices for a data mart.

iv)Security classes

Security awareness is the knowledge and attitude members of an organization possess regarding theprotection of the physical and especially, information assets of that organization. Many organizations requireformal security awareness training for all workers when they join the organization and periodically thereafter,usually annually.

Topics covered in security awareness training include:

The nature of sensitive material and physical assets they may come in contact with, such as tradesecrets, privacy concerns and governmentclassified information

Employee and contractor responsibilities in handling sensitive information, including review ofemployee nondisclosure agreements

Requirements for proper handling of sensitive material in physical form, including marking, transmission,storage and destruction

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 16: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

Proper methods for protecting sensitive information on computer systems, including password policy anduse of two-factor authentication

Other computer security concerns, including malware, phishing, social engineering, etc.

Workplace security, including building access, wearing of security badges, reporting of incidents, forbiddenarticles, etc.

Consequences of failure to properly protect information, including potential loss of employment, economicconsequences to the firm, damage to individuals whose private records are divulged, andpossible civil and criminal penalties

Being security aware means you understand that there is the potential for some people to deliberately oraccidentally steal, damage, or misuse the data that is stored within a company's computer systems andthroughout its organization. Therefore, it would be prudent to support the assets of the institution (information,physical, and personal) by trying to stop that from happening.

According to the European Network and Information Security Agency, 'Awareness of the risks and availablesafeguards is the first line of defence for the security of information systems and networks.'

'The focus of Security Awareness consultancy should be to achieve a long term shift in the attitude ofemployees towards security, whilst promoting a cultural and behavioural change within an organisation.Security policies should be viewed as key enablers for the organisation, not as a series of rules restricting theefficient working of your business.'

Ans:vi)Deductive databaseAns:

A deductive database is a database system that can be used to make deductions from the available rulesand facts that are stored in such databases. The following are the key characteristics of the deductivedatabases:

the information in such systems is specified using a declarative language in the form of rulesand facts, an inference engine that is contained within the system is used to deduce new facts from thedatabase of rules and facts, these databases use concepts from the relational database domain (relational calculus) andlogic programming domain (Prolog Language),

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM

Page 17: 43exceptq2

Your favorite blog :www.vijay-jotani.weebly.com (popularly knownas “VIJAY JOTANI’S BLOG”…..now in facebook….JOIN ON FB “VIJAYJOTANI’S BLOG” please check answers beforewriting we are not responsible for anything….

MSG: Recently Vijay has been working with IIT-GANDHINAGAR and SIEMENS AEROSPACECENTRE….and because of his busy schedule ,we (Anikesh, Neeraj) will have been trying to serveyour problems and material….so we request you to co-operate us….yes, when sir will become freefrom his work, they will surely continue to maintain this blog….. you can join Mr. Vijay Jotani atfacebook.com/vijay.jotani……

the variant of Prolog known as Datalog is used in deductive databases. The Datalog has adifferent way of executing programs than the Prolog and the data in such databases is specified with the help of facts and rules.Deductive databases normally operate in very narrow problem domains. These databases are quite closeto expert systems except that deductive databases use, the database to store facts and rules, whereas expertsystems store facts and rules in the main memory. Expert systems also find their knowledge throughexperts whereas deductive database have their knowledge in the data. Deductive databases are applied toknowledge discovery and hypothesis testing.

ix)Query optimization

Ans:

Query Optimisation: Amongst all equivalent plans choose the one with the lowest cost. Cost isestimated using statistical information from the database catalogue, for example, number of tuples in eachrelation, size of tuples, etc.

Thus, in query optimisation we find an evaluation plan with the lowest cost. The cost estimation is madeon the basis of heuristic rules.

VISIT: WWW.VIJAY-JOTANI.WEEBLY.COM

WWW.VIJAY-JOTANI.WEEBLY.COM

BUY VEDIO Tutorials FOR JEE MAIN WITHLOTS OF PROBLEM SOLVING SHORT TRICKSAND TIPS

www.vijay-jotani.weebly.com

WWW.VIJAY-JOTANI.WEEBLY.COM