Showing posts with label Question Bank. Show all posts
Showing posts with label Question Bank. Show all posts

Monday, October 26, 2015

DBMS

31. Explain the two types of participation constraint.
Total: The participation of an entity set E in a relationship set R is said to be total if every
entity in E participates in at least one relationship in R.
Partial: if only some entities in E participate in relationships in R, the participation of entity set
E in relationship R is said to be partial.
32. What is meant by lossless-join decomposition? APRIL/MAY-2011
We claim the above decomposition is lossless. How can we decide whether decomposition is
lossless?
1. Let R be a relation schema.
2. Let F be a set of functional dependencies on R.
3. Let R1and R2 form a decomposition of R.
4. The decomposition is a lossless-join decomposition of R if at least one of the following functional dependencies are in :
a. R1∩ R2→ R1
b. R1∩ R2→ R2
33. List the disadvantages of relational database system
Repetition of data
Inability to represent certain information.
34. What is first normal form?
The domain of attribute must include only atomic (simple, indivisible) values.
35. What is meant by functional dependencies?
Consider a relation schema R and a C R and ß C R. The functional dependency a ß holds on
relational schema R if in any legal relation r(R), for all pairs of tuples t1 and t2 in r such that t1 [a] =t1 [a], and also t1 [ß] =t2 [ß].

Sunday, October 25, 2015

Unit 1 - DBMS

21. Define the terms i) Entity set ii) Relationship set
Relationship set : The set of all relationships of the same type is termed as a relationship set.
22. Define single valued and multivalued attributes.
Single valued attributes: attributes with a single value for a particular entity are called single
valued attributes.
Multivalued attributes : Attributes with a set of value for a particular entity are called
multivalued attributes.
23. What are stored and derived attributes?
Stored attributes: The attributes stored in a data base are called stored attributes.
Derived attributes: The attributes that are derived from the stored attributes are called derived attributes.
24. What are composite attributes?
Composite attributes can be divided in to sub parts.
25. Define null values
In some cases a particular entity may not have an applicable value for an attribute or if we do not know the value of an attribute for a particular entity. In these cases null value is used.

Saturday, October 24, 2015

DBMS

11. What is conceptual schema?
The schemas at the view level are called subschemas that describe different views of the
database.
12. Define data model?
A data model is a collection of conceptual tools for describing data, data relationships, data
13. What is storage manager?
A storage manager is a program module that provides the interface between the low level data
stored in a database and the application programs and queries submitted to the system.
14. What are the components of storage manager?
The storage manager components include
a) Authorization and integrity manager b) Transaction manager
c) File manager
d) Buffer manager
15. What is the purpose of storage manager?
The storage manager is responsible for the following a) Interaction with the file manager
b) Translation of DML commands in to low level file system commands c) Storing, retrieving and updating data in the database

Friday, October 23, 2015

DATABASE MANAGEMENT SYSTEMS

1. Who is a DBA? What are the responsibilities of a DBA? April/May-2011
A database administrator (short form DBA) is a person responsible for the design, implementation, maintenance and repair of an organization's database. They are also known by
the titles Database Coordinator or Database Programmer, and is closely related to the Database
Analyst, Database Modeller, Programmer Analyst, and Systems Manager.
The role includes the development and design of database strategies, monitoring and improving database performance and capacity, and planning for future expansion requirements. They may also plan, co-ordinate and implement security measures to safeguard the database
2. What is a data model? List the types of data model used. April/May-2011
A database model is the theoretical foundation of a database and fundamentally determines in
which manner data can be stored, organized, and manipulated in a database system. It thereby defines the infrastructure offered by a particular database system. The most popular example of a database model is the relational model.
Types of data model used
Ø Hierarchical model
Ø Network model
Ø Relational model
Ø Entity-relationship
Ø Object-relational model
Ø Object model

 3. Define database management system?
Database management system (DBMS) is a collection of interrelated data and a set of programs to access those data.
4. List any eight applications of DBMS.
a) Banking
b) Airlines
c) Universities
d) Credit card transactions e) Tele communication
f) Finance g) Sales
h) Manufacturing
i) Human resources
5. What are the disadvantages of file processing system?
The disadvantages of file processing systems are
a) Data redundancy and inconsistency b) Difficulty in accessing data
c) Data isolation
d) Integrity problems
e) Atomicity problems
f) Concurrent access anomalies

Wednesday, October 7, 2015

database system architecture



1.       schemas in database management system architecture.
There are following three levels or layers of DBMS architecture: 
         External Level
    Conceptual Level
·         Internal Level


Each user should be able to access the same data, but have a different customized view of the data. Each user should be able to change the way he or she views the data, and this change should not affect other users.
• Users should not have to deal directly with physical database storage details, such as indexing or hashing. In other words a user's interaction with the database should be independent of storage considerations.
• The Database Administrator (DBA) should be able to change the database storage structures without affecting the user's views.
. The internal structure of the database should be unaffected by changes to the physical aspects of storage, such as the changeover to a new storage device.
. The DBA should be able to change the conceptual structure of the database without affecting all users.

External Level or View level

It is the users' view of the database. This level describes that part of the database that is relevant to each user. External level is the one which is closest to the end users. This level deals with the way in which individual users vie\v data. Individual users are given different views according to the user's requirement.
A view involves only those portions of a database which are of concern to a user. Therefore same database can have different views for different users. The external view insulates users from the details of the internal and conceptual levels. External level is also known as the view level. In addition different views may have different representations of the same data. For example, one user may view dates in the form (day, month, year), while another may view dates as (year, month, day).

Conceptual Level or Logical level

It is the community view of the database. This level describes what data is stored in the database and the relationships among the data. The middle level in the three level architecture is the conceptual level. This level contains the logical structure of the entire database as seen by the DBA. It is a complete view of the data requirements of the organization that is independent of any storage considerations. The conceptual level represents:
• All entities, their attributes, and their relationships;
An Entity is an object whose information is stored in the database. For example, in student database the entity is student. An attribute is a characteristic of interest about an entity.
For example, in case of student database Roll No, Name, Class, Address etc. are attributes of entity student.
• The constraints on the data;
• Semantic information about the data;
• Security and integrity information.

Tuesday, October 6, 2015

disadvantages in the file system



·         Data Redundancy
·         Data Inconsistency
·         Difficulty in Accessing Data
·         Data Isolation
·         Integrity Problems
·         Atomicity Problem
·         Concurrent Access anomalies
·         Security Problems
Data Redundancy
Data Redundancy is same information’s are duplicated in several files. This makes data redundancy.
Data Inconsistency
Data Inconsistency means different copies of the same data are not matching. This  occurs as the result of  update operations that are not updating the same data stored at different places.
Example: Address Information of a customer is recorded differently in  different files.
Difficulty in Accessing Data
It is not easy to retrieve information using a conventional file processing system. Convenient and efficient information retrieval is almost impossible using conventional file processing system. 
Data Isolation
Data are scattered in various files, and the files may be in different format, writing new application program to retrieve data is difficult.

Monday, October 5, 2015

Components of a DBMS



The DBMS accepts the SQL commands generated from a variety of user interfaces, produces query evaluation plans, executes these plans against the database, and returns the answers. The major components of DBMS are as follows:
 (i) Query processor: The query processor transforms user queries into a series of low level instructions. It is used to interpret the online user's query and convert it into an efficient series of operations in a form capable of being sent to the run time data manager for execution. The query processor uses the data dictionary to find the structure of the relevant portion of the database and uses this information in modifying the query and preparing and optimal plan to access the database.
(ii) Run time database manager: Run time database manager is the central software component of the DBMS, which interfaces with user-submitted application programs and queries. It handles database access at run time. It converts operations in user's queries coming. Directly via the query processor or indirectly via an application program from the user's logical view to a physical file system. It accepts queries and examines the external and conceptual schemas to determine what conceptual records are required to satisfy the user’s request. It enforces constraints to maintain the consistency and integrity of the data, as well as its security. It also performs backing and recovery operations. Run time database manager is sometimes referred to as the database control system and has the following components:
• Authorization control: The authorization control module checks the authorization of users in terms of various privileges to users.
• Command processor: The command processor processes the queries passed by authorization control module.




Integrity checker: It .checks the integrity constraints so that only valid data can be entered into the database.
Query optimizer: The query optimizers determine an optimal strategy for the query execution.
• Transaction manager: The transaction manager ensures that the transaction properties should be maintained by the system.
• Scheduler: It provides an environment in which multiple users can work on same piece of data at the same time in other words it supports concurrency.

Sunday, October 4, 2015

File Organization - DBMS



A file is a collection of or log of records. Having stored the records in a file it is necessary to access these records using either a primary or secondary key. A File is organized logically as a sequence of records. These records are mapped onto disk blocks .


 There are two types of access:
1. Sequential access - is performed when records are accessed in the order they are stored. Sequential access is the main access mode only in batch systems, where files are used and updated at regular intervals.
2. Direct access - on-line processing requires direct access, whereby a record can be accessed without accessing the records between it and the beginning of the file. The primary key serves to identify the needed record.
There are three methods of file organization:
1. Sequential organization
2. Indexed-sequential organization
3. Direct organization
Sequential Organization
In sequential organization records are physically stored in a specified order according to a key field in each record.
Advantages of sequential access:
1. It is fast and efficient when dealing with large volumes of data that need to be processed periodically (batch system).
Disadvantages of sequential access:
1. Requires that all new transactions be sorted into the proper sequence for sequential access processing.
2. Locating, storing, modifying, deleting, or adding records in the file  requires rearranging the file.
3. This method is too slow to handle applications requiring immediate updating or responses.
Indexed-Sequential Organization
In the indexed-sequential files method, records are physically stored in sequential order on a magnetic disk based on the key field of each record. Each file contains an index that references one or more key fields of each data record to its storage location address.
Direct Organization
Direct file organization provides the fastest direct access to records. When using direct access methods, records do not have to be arranged in any particular sequence on storage media.
Characteristics of the direct access method include:
·         Computers must keep track of the storage location of each record using a variety of direct organization methods so that data can be retrieved when needed.
·         New transactions' data do not have to be sorted.
·         Processing that requires immediate responses or updating is easily performed.
Example
Fixed Length Records
 let us consider a file of account records for our bank database
.Each record of this file is defined (in pseudo code) as:
type deposit = record
Account _number char (10);
Branch_name char (22);
Balance numeric (12, 2);
end

Friday, October 2, 2015

EC6504-MICROPROCESSOR AND MICROCONTROLLER



1. Define microprocessor?
A microprocessor is a multipurpose, programmable, clock-driven, register –based electronic device that reads binary instructions from a storage device called memory . Accepts binary data as input and processes data according to instructions, and provides result as output.

2.  Explain  the  function  of ALE
in  the  8085
architecture?
(or)  How address
and  data lines
are
demultiplexed?





The ALE  signal  goes  high  at the
beginning of
each machine
cycle indicating the
availability of
the
address on the address bus, and the signal is used to latch the low-order address bus(A0-A7) by demultiplexing the address/data bus(AD0-AD7),which are multiplexed.

3.        What is the function of HOLD and HLDA?

HOLD- It indicates when another device is requesting the use of address and data bus(like DMA controller). HLDA(Hold Acknowledge)- It indicates that HOLD request has been received. After the removal of HOLD request the HLDA goes low.

4.  What is the purpose of READY and TRAP pins in 8085 Microprocessor?

READY- It is used to interface slow speed peripherals with microprocessor. TRAP- Vectored and non-maskable hardware interrupt.

5.        List the operations performed by IO/M in 8085.

Memory Read, Memory Write ,I/O Read, I/O Write are the operations performed by IO/M in 8085.

6.        Differentiate between Memory mapped I/O and I/O mapped I/O.


S.NO
Memory mapped I/O
I/O mapped I/O
1.
It is treated as memory location
It is not treated as memory location
2.
No special instructions are needed to access
It  requires  special  instructions  like IN,
the I/O devices
OUT to access I/O devices
3.
Microprocessor   can   access   1  MByte
Microprocessor  can  access  64  KByte
memory locations or I/O ports
memory locations or I/O ports
4.
It requires 20 address lines
It requires 16 address lines
5.
MEMR,  MEMW  signals  can  be  used to
IOR , IOW signals are used
access I/O devices
6.
It is suitable for small system
It is suitable for large system

Sunday, September 27, 2015

concept of dynamic scheduling



Overcoming Data Hazards with Dynamic Scheduling:
The Dynamic Scheduling is used handle some cases when dependences are unknown at a compile time. In which the hardware rearranges the instruction execution to reduce the stalls while maintaining data flow and exception behavior.
It also allows code that was compiled with one pipeline in mind to run efficiently on a different pipeline. Although a dynamically scheduled processor cannot change the data flow, it tries to avoid stalling when dependences, which could generate hazards, are present.

Dynamic Scheduling:
A major limitation of the simple pipelining techniques is that they all use in -order instruction issue and execution: Instructions are issued in program order and if an instruct ion is stalled in the pipeline, no later instructions can proceed. Thus, if there is a dependence between two closely spaced instructions in the pipeline, this will lead to a hazard and a stall. If there are multiple functional units, these units could lie idle. If instruction j depends on a long-running instruction i, currently in execution in the pipeline, then all instructions after j must be stalled until i is finished and j can execute. For example, consider this code:
DIV.D F0,F2,F4 ADD.D F10,F0,F8 SUB.D F12,F8,F14
Out-of-order execution introduces the possibility of WAR and WAW hazards, which do not exist in the five-stage integer pipeline and its logical extension to an in-order floating-point pipeline.
Out-of-order completion also creates major complications in handling exceptions. Dynamic scheduling with out-of-order completion must preserve exception behavior in the sense that exactly those exceptions that would arise if the program were executed in strict program order actually do arise.

Imprecise exceptions can occur because of two possibilities:
1. The pipeline may have already completed instructions that are later in program order than the instruction causing the exception, and