BSC Computer Science Answer 3rd (Final) Year 2021 BU Bhopal Open Book Exam 2021

 BSC Computer Science 

BSC Computer Science Answer 3rd (Final) Year 2021 BU Bhopal Open Book Exam 2021


Database Management System

Answer


1. What is instance and schema ? Explain with example the question.

इन्सटेन्स और स्किमा क्या है ? उदाहरण के साथ समझाइए ?

Ans-

DBMS Schema-

Definition of schema: Design of a database is called the schema. Schema is of three types: Physical schema, logical schema and view schema.


For example: In the following diagram, we have a schema that shows the relationship between three tables: Course, Student and Section. The diagram only shows the design of the database, it doesn’t show the data present in those tables. Schema is only a structural view(design) of a database as shown in the diagram below.

Schema


The design of a database at physical level is called physical schema, how the data stored in blocks of storage is described at this level.


Design of database at logical level is called logical schema, programmers and database administrators work at this level, at this level data can be described as certain types of data records gets stored in data structures, however the internal details such as implementation of data structure is hidden at this level (available at physical level).


Design of database at view level is called view schema. This generally describes end user interaction with database systems.


Definition of instance -

The data stored in database at a particular moment of time is called instance of database. Database schema defines the variable declarations in tables that belong to a particular database; the value of these variables at a moment of time is called the instance of that database.


For example, lets say we have a single table student in the database, today the table has 100 records, so today the instance of the database has 100 records. Lets say we are going to add another 100 records in this table by tomorrow so the instance of database tomorrow will have 200 records in table. In short, at a particular moment the data stored in database is called the instance, that changes over time when we add or delete data from the database.




2. What is ER- diagram ? Explain.

ER- diagram क्या है ? समझाइए।

Ans-

An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as people, objects or concepts relate to each other within a system. ER Diagrams are most often used to design or debug relational databases in the fields of software engineering, business information systems, education and research. Also known as ERDs or ER Models, they use a defined set of symbols such as rectangles, diamonds, ovals and connecting lines to depict the interconnectedness of entities, relationships and their attributes. They mirror grammatical structure, with entities as nouns and relationships as verbs.


Uses of entity relationship diagrams

Database design: 

ER diagrams are used to model and design relational databases, in terms of logic and business rules (in a logical data model) and in terms of the specific technology to be implemented (in a physical data model.) In software engineering, an ER diagram is often an initial step in determining requirements for an information systems project. It’s also later used to model a particular database or databases. A relational database has an equivalent relational table and can potentially be expressed that way as needed.


Database troubleshooting: 

ER diagrams are used to analyze existing databases to find and resolve problems in logic or deployment. Drawing the diagram should reveal where it’s going wrong.


Business information systems: 

The diagrams are used to design or analyze relational databases used in business processes. Any business process that uses fielded data involving entities, actions and interplay can potentially benefit from a relational database. It can streamline processes, uncover information more easily and improve results.


Business process re-engineering (BPR):

ER diagrams help in analyzing databases used in business process re-engineering and in modeling a new database setup.


Education: 

Databases are today’s method of storing relational information for educational purposes and later retrieval, so ER Diagrams can be valuable in planning those data structures.


Research: 

Since so much research focuses on structured data, ER diagrams can play a key role in setting up useful databases to analyze the data.

ER-Diagram


How to draw a basic ER diagram

Purpose and scope: 

Define the purpose and scope of what you’re analyzing or modeling.


Entities: 

Identify the entities that are involved. When you’re ready, start drawing them in rectangles (or your system’s choice of shape) and labeling them as nouns.


Relationships: 

Determine how the entities are all related. Draw lines between them to signify the relationships and label them. Some entities may not be related, and that’s fine. In different notation systems, the relationship could be labeled in a diamond, another rectangle or directly on top of the connecting line.


Attributes: 

Layer in more detail by adding key attributes of entities. Attributes are often shown as ovals. 


Cardinality: 

Show whether the relationship is 1-1, 1-many or many-to-many.


3. What is primary key ? Explain with example.

प्रायमरी की क्या है ? उदाहरण के साथ समझाइए।

Ans-

A primary key is a special relational database table column (or combination of columns) designated to uniquely identify each table record.

A primary key is used as a unique identifier to quickly parse data within the table. A table cannot have more than one primary key.

A primary key’s main features are:

  • It must contain a unique value for each row of data.
  • It cannot contain null values.
  • Every row must have a primary key value.

A primary key might use one or more fields already present in the underlying data model, or a specific extra field can be created to be the primary key.

For example, students are routinely assigned unique identification (ID) numbers, and all U.S. citizens have government-assigned and uniquely identifiable Social Security numbers. Street addresses or driver license numbers are examples of primary keys used to uniquely identify (respectively) locations or cars.


4. What are the consequences of bad design ? Explain.

बुरे डिसाइन के क्या परीणाम होते है ? समझाए।

Ans-

Bad design does not follow any particular formula. Some business websites might have great elements mixed with inferior parts, while others suffer from the “good ideas, bad execution” problem. Still, others experience both bad ideas and bad execution. Are these red flags killing your search engine optimisation?

  • Poor design/planning
  • Ignoring normalization
  • Poor naming standards
  • Lack of documentation
  • One table to hold all domain values
  • Using identity/guid columns as your only key
  • Not using SQL facilities to protect data integrity
  • Not using stored procedures to access data
  • Trying to build generic objects
  • Lack of testing

Several factors can lead to a poor database design — lack of experience, a shortage of the necessary skills, tight timelines and insufficient resources can all contribute. In turn, poor database design leads to many problems down the line, such as sub-par performance, the inability to make changes to accommodate new features, and low-quality data that can cost both time and money as the application evolves.

5. What is Indexing ? Explain.

इन्डेक्सींग क्या है ? समझाइए।

Ans-
We know that data is stored in the form of records. Every record has a key field, which helps it to be recognized uniquely.

Indexing is a data structure technique to efficiently retrieve records from the database files based on some attributes on which the indexing has been done. Indexing in database systems is similar to what we see in books.

Indexing is defined based on its indexing attributes. Indexing can be of the following types −

Primary Index − Primary index is defined on an ordered data file. The data file is ordered on a key field. The key field is generally the primary key of the relation.

Secondary Index − Secondary index may be generated from a field which is a candidate key and has a unique value in every record, or a non-key with duplicate values.

Clustering Index − Clustering index is defined on an ordered data file. The data file is ordered on a non-key field.

Ordered Indexing is of two types −

  • Dense Index
  • Sparse Index


Operating System

Answer

1. Explain time sharing feature in operating system.

Ans:
A time sharing system allows many users to share the computer resources simultaneously. In other words, time sharing refers to the allocation of computer resources in time slots to several programs simultaneously. For example a mainframe computer that has many users logged on to it. Each user uses the resources of the mainframe -i.e. memory, CPU etc. The users feel that they are exclusive user of the CPU, even though this is not possible with one CPU i.e. shared among different users.

The time sharing systems were developed to provide an interactive use of the computer system. A time shared system uses CPU scheduling and multi-programming to provide each user with a small portion of a time-shared computer. It allows many users to share the computer resources simultaneously. As the system switches rapidly from one user to the other, a short time slot is given to each user for their executions.

The time sharing system provides the direct access to a large number of users where CPU time is divided among all the users on scheduled basis. The OS allocates a set of time to each user. When this time is expired, it passes control to the next user on the system. The time allowed is extremely small and the users are given the impression that they each have their own CPU and they are the sole owner of the CPU. This short period of time during that a user gets attention of the CPU; is known as a time slice or a quantum. The concept of time sharing system is shown in figure.

Time Sharing OS


In above figure the user 5 is active but user 1, user 2, user 3, and user 4 are in waiting state whereas user 6 is in ready status.

As soon as the time slice of user 5 is completed, the control moves on to the next ready user i.e. user 6. In this state user 2, user 3, user 4, and user 5 are in waiting state and user 1 is in ready state. The process continues in the same way and so on.

The time-shared systems are more complex than the multi-programming systems. In time-shared systems multiple processes are managed simultaneously which requires an adequate management of main memory so that the processes can be swapped in or swapped out within a short time.


2. Explain types of schedulers ?

Ans:
Types of Schedulers:-

There are three types of schedulers available :

Long Term Scheduler :
Long term scheduler runs less frequently. Long Term Schedulers decide which program must get into the job queue. From the job queue, the Job Processor, selects processes and loads them into the memory for execution. Primary aim of the Job Scheduler is to maintain a good degree of Multiprogramming. An optimal degree of Multiprogramming means the average rate of process creation is equal to the average departure rate of processes from the execution memory.

Short Term Scheduler :
This is also known as CPU Scheduler and runs very frequently. The primary aim of this scheduler is to enhance CPU performance and increase process execution rate.

Medium Term Scheduler :
This scheduler removes the processes from memory (and from active contention for the CPU), and thus reduces the degree of multiprogramming. At some later time, the process can be reintroduced into memory and its execution van be continued where it left off. This scheme is called swapping. The process is swapped out, and is later swapped in, by the medium term scheduler.


3. What is page fault ? Explain.

Ans-
Definition – Page fault dominates like an error. If any program tries to access piece of memory but which is not existed into physical memory, means main memory, then page fault will be occurred. The fault specifies the O/S that it must trace the all data in to virtual memory management, and after that moves it from secondary memory like as hard disk to primary memory of system.  

Page Fault Handling
  • All hardware components of computer monitor program counter and kernel that are saved in the stack, and CPU registers have to store all current running state information.
  • Assembly programs help to store general registers as well as volatile information.
  • Page fault is searched by the operating system, and trace the virtual pages which are needed.
  • Hardware registers also consist the all those needed information.
Now these steps must be followed for handling the page fault.
  • Firstly, get check to main memory address requests; ensure those requests must be valid.
  • If reference got invalid then the process will be terminated, otherwise the page is going to paged in.
  • Then, Free-frame list locates the free frame.
  • Now disk operation will be scheduled to fetch the needed page from disk.
  • When I/O operation is done, and new frame number will be added in the process’s page table, and invalid bit is altered. Now this is valid page reference.

4. Explain security policies and its mechanism ?

Policy and Mechanism

Protection mechanisms are used to authenticate access to resources
  • File protection
  • Memory protection

A security policy reflects an organization’s strategy to authorize access to the computer’s resources
  • Managers have access to personnel files
  • OS processes have access to the page table

Authentication mechanisms are the basis of most protection mechanisms. Two types:
  • External Authentication
  • Internal Authentication

External Authentication
  • User/process authentication
  • Is this user/process who it claims to be?
 
Passwords
  • More sophisticated mechanisms
  • Authentication in networks

Is this computer who it claims to be?
  • File downloading
  • Obtaining network services
  • The Java promise

5. Explain features of Linux ?

Linux Features

Multiuser capability: Multiple users can access the same system resources like memory, hard disk, etc. But they have to use different terminals to operate.

Multitasking: More than one function can be performed simultaneously by dividing the CPU time intelligently.

Portability: Portability doesn't mean it is smaller in file size or can be carried in pen drives or memory cards. It means that it support different types of hardware.

Security: It provides security in three ways namely authenticating (by assigning password and login ID), authorization (by assigning permission to read, write and execute) and encryption (converts file into an unreadable format).

Live CD/USB: Almost all Linux distros provide live CD/USB so that users can run/try it without installing it.

Graphical User Interface (X Window system): Linux is command line based OS but it can be converted to GUI based by installing packages.
    
Support's customized keyboard: As it is used worldwide, hence supports different languages keyboards.
    
Application support: It has its own software repository from where users can download and install many applications.
    
File System: Provides hierarchical file system in which files and directories are arranged.
    
Open Source: Linux code is freely available to all and is a community based development project.


No comments

Powered by Blogger.