CS Class 12 Tutorial

Difference Linear queue and Circular queue

Linear Queue Circular Queue Data elements are stored in linear patter Data elements are stored in circular pattern where rear end is connected with front end It occupies more memory space It occupies less memory space Insertion and deletion of elements are possible from rear and front end only Insertion and deletion of element are […]

Difference Linear queue and Circular queue Read More »

What do you understand by linear and non-linear data structures?

Linear data structure– Data elements are stored in a sequence– Each data element is connected to next or previous adjacent element– Exp- stack, queue, linked listNon-linear data structure– Data elements are distributed over a plane– Data elements are connected in hierarchical manner.– Exp-Tree

What do you understand by linear and non-linear data structures? Read More »

Is data structure related to data type? Explain

Yes data structure is related to data type. Following are the reasons-– Data type ensure which type of data a data structure will contain– Data type ensure the type of operations can be performed on data structure– Data type determines the size of data structure in terms of memory.

Is data structure related to data type? Explain Read More »

What is data structure? Name some common data structure

– Data structure is way of organizing, managing, process data in efficient manner.– Data Structure is physical implementation of data.– Data structure helps processor to process and handle large and complex data without any failure.– Data structure allows running a program or implementing operation at minimum time.– Data structure allows to minimum memory space to

What is data structure? Name some common data structure Read More »

A shop called Wonderful Garments that sells school uniforms maintain a database SCHOOL_UNIFORM as shown below. It consisted of two relations — UNIFORM and PRICE.

They made UniformCode as the primary key for UNIFORM relation. Further, they used UniformCode and Size as composite keys for PRICE relation. By analyzing the database schema and database state, specify SQL queries to rectify the following anomalies. (a) The PRICE relation has an attribute named Price. In order to avoid confusion, write SQL query

A shop called Wonderful Garments that sells school uniforms maintain a database SCHOOL_UNIFORM as shown below. It consisted of two relations — UNIFORM and PRICE. Read More »

An organization ABC maintains a database EMP-DEPENDENT to record the following details about its employees and their dependents.

EMPLOYEE (AadhaarNo, Name, Address, Department, EmpID)DEPENDENT (EmpID, DependentName, Relationship)Use the EMP-DEPENDENT database to answer the following SQL queries:(a) Find the names of employees with their dependent names.Ans:         Select E.Name, D.DependentName FROM EMPLOYEE E, DEPENDENT DWHERE E.EmpID = D.EmpID;(b) Find employee details working in a department, say, ‘PRODUCTION’.Ans:         SELECT * FROM EMPLOYEE WHERE Department = ‘PRODUCTION’;(c) Find employee

An organization ABC maintains a database EMP-DEPENDENT to record the following details about its employees and their dependents. Read More »

Create a database called STUDENT_PROJECT having the following tables. Choose appropriate data type and apply necessary constraints.

Table: STUDENT RollNo Name Stream Section RegistrationID *The values in Stream column can be either Science, Commerce, or Humanities.* The values in Section column can be either I or II.Ans:CREATE TABLE STUDENT (RollNo INT NOT NULL UNIQUE,Name varchar(20) NOT NULL,Stream varchar(20) CHECK (Stream IN (‘Science’, ‘Commerce’, ‘Humanities’)),Section varchar(2) CHECK (Section IN (‘I’, ‘II’)),RegistrationID int PRIMARY

Create a database called STUDENT_PROJECT having the following tables. Choose appropriate data type and apply necessary constraints. Read More »

error: Content is protected !!