0% found this document useful (0 votes)
10 views17 pages

12th Computer Important Data SQs

The document contains important short questions and answers for a 12th-grade Computer Science curriculum, covering topics such as data, databases, data integrity, and programming in C. It includes definitions, explanations, and examples related to database management systems, data modeling, and programming concepts. The content is organized into chapters, each focusing on specific areas of computer science and programming principles.

Uploaded by

createranime7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views17 pages

12th Computer Important Data SQs

The document contains important short questions and answers for a 12th-grade Computer Science curriculum, covering topics such as data, databases, data integrity, and programming in C. It includes definitions, explanations, and examples related to database management systems, data modeling, and programming concepts. The content is organized into chapters, each focusing on specific areas of computer science and programming principles.

Uploaded by

createranime7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

12th Computer Science

Important Short Qs

CHAPTER 1:
1. Define data and information.
2. Describe data manipulation.
3. What is a file or data set?
4. Define program file with example.
5. Differentiate between Master file and Transactional file.
6. Define the term database.
7. Define data integrity.
8. Write some advantages of DBMS.
9. Write some features of DBMS.
10. Define DBMS.

CHAPTER 2:
Q1. Define field?
Ans. A field is a unit of data consisting of one or more characteristics i.e.,
employee number, employee name or grade of an employee in a record of the
employee.

Q2. Discuss the role of fixed length field?


Ans. Fixed length fields ensure each entry occupies the same amount of space,
which aids in predictable storage allocation, improves performances during data
retrieval and updates, and maintains data integrity by preventing length
variations that could cause errors.

Q3. How a relation is formed in database?


Ans. Relations in databases are formed using tables, where each row of a table
represents single tuple, and where value of each attribute form a column.

Q4. What is table in database?


Ans.A two dimensional array or a table of data containing description information
about an entity. The entity must have unique identifier which is composed of one
or more attributes.

Q5. How are views created?


Ans. Views in a database are created using SQL CREATE VIEW statement. A view is
essentially a virtual table that is based on the result set of an SQL query. It does
not store data physically but provides a way to look at the data in one or more
tables in a particular way.
Example:
CREATE VIEW student contact AS
SELECT employee ID, First Name, Last Name
FROM employees
WHERE Department = ‘sales’;

Q6. Define indexes?


Ans. It is a table created by system developed/DBA containing the key attributes
of the table for which the index is created. It has a vital role in the data base
management system, especially in RDBMS. The important associations defined in
the system make use of this. It helps the system run smooth and fast.

Q7. List different types of keys?


Ans. Different types of keys are as follows;
 Primary key
 Secondary key
 Candidate key/alternate key
 Composite/Concatenate key
 Sort/control key
 Foreign key
Q8. Define primary key?
Ans. In a relation, the attribute (column) or a combination of attributes that
uniquely identifies a row or a record is called primary key. E.g. In the employee
table, EMP-ID is the attribute that identifies each employee and thus can be used
as a primary key.

[Link] composite key or concatenate key?


Ans. A composite key also known as concatenate key, is a combination of two or
more columns in a database table that together uniquely identify each record in
that table. This is useful when no single column can uniquely identify each record,
requiring a combination of attributes to ensure data integrity and uniqueness
constraints in relational databases.

Q10. Define foreign key attributes in databases?


Ans. A foreign key is an attribute in a table whose values must match a primary
key in another table. The table in which the foreign key is found is called as
dependent table and to which it refers is called a parent table.

Q11. Differentiate between a primary key and candidate key?


Ans.
Primary key :
In a relation, the attributes or a combination of attributes that uniquely identifies
a row or a record is called a primary key.

Candidate key:
There can be more than one key or key combinations that qualify to be selected
as primary. However, in a relation there can only be the primary key . Rest of the
keys or key combinations which uniquely identify each record in the relation are
called candidate keys.
Q12. Write down the four responsibilities of database administrator?
Ans. Responsibilities of database administrator are as follows;
i. A Database Administrator (DBA) is responsible for the design, implementation,
operation, management and maintenance of the database.
ii. He/she must be technically expert of the database and DBMS.
iii. He is supposed to plan, coordinate and carry out a variety of jobs during all
phases of the database projects.
iv. He must possess the technical skills because he has to work on the complex
software and hardware issues involved and to solve the problems of the system
and application experts in the organization.

Q13. Define "End User"?


Ans. The user or end-user is simply a person who uses the technology, and his
need to use computers may be entertainment, education, or professional task. He
does not need to know the in-depth knowledge of the computer system, but
instead he should be aware of installed software he intends to use.

Q14. What is the role of end user in database system?


Ans. The User or End-user is simply a person who uses the computers for his
specific need. He might have a moderate knowledge of computers, computer
science and information technology, and his need to use computers may be
entertainment, education, or professional computer system, but instead he
should be aware of installed software he intends to use.

Q15. Who is data administrator?


Ans. A Data Administrator (DA) is responsible for the entire data of an
organization. He normally develops the overall functional requirements for the
database being used in the office. He should control and manage the databases,
establish the data standard, supervise the data distribution within the
organization and communicate with the user when necessary.
CHAPTER 3:
Q1. What is Importance of project planning?
Ans. Once the requirements are identified, the project planning phase involves
creating a plan to develop the database that meets those requirements. This
includes creating a project schedule, allocating resources, and estimating costs.

Q2. What is the purpose of analysis?


Ans. Purpose of analysis:
The basic purpose of analysis is to know which activities are performed in the
current system. The analysis determines what should take place in the new
system.

Q3. What is meant by data modeling?


Ans. Data Modeling:
Data modeling is the process of identifying the data objects and the relationships
between them. Following are the ingredients of Data Modeling:
 Entities/Objects
 Attributes
 Relationship
 Cardinality
 Modality

Q4. Define Entity or Objects?


Ans. A data entity or object is anything that is participating in the system. It is
always properly identifiable i.e., a TEACHER, a STUDENT, an AEROPLANE.

Q5. Define an attribute. Give an example. (OR) State an attribute with one
example?
Ans. Attributes define the objects, describe their characteristics as in some cases,
make references to other object(s) i.e., attributes for a student could be: Student
Name, Gender, Class, Section, Fee, Nationality, Telephone No. etc.
Q6. What is the concept of cardinality of a relation?
Ans. Cardinality of Relation: Cardinality of relationship represents the fact that
each parent table within a relationship is connected to particular number of
instance of a child Entity or a Table.

Q7. List ingredients of data modeling?


Ans. Ingredients of Data Modeling: The following are the ingredients of data
modeling.
i. Entity/Objects
ii. Attributes
iii. Relationships
iv. Cardinality
v. Modality

Q8. What is the major objective of physical database design?


Ans. It is the last stage of the database design process. The major objective of
physical database design is to implement the database as a set of stored records,
files, indexes and other data structures that will provide adequate performance
and ensure database integrity, security and recoverability.

Q9. What is the main purpose of "Replicated" data distribution strategy?


Ans. The main purpose of the "Replicated" data distribution strategy is to
enhance data availability and fault tolerance by maintaining multiple copies
(replicas) of the data across different nodes or servers in a distributed system.

Q10. List four data distribution strategy?


Ans. These are the four data distribution strategies:
i. Centralized
ii. Partitioned
iii. Replicated
iv. Hybrid
CHAPTER 4:
Q1. Define database integrity?
Ans. Database Integrity: Data integrity means the correctness and consistency of
data. It is another form of database protection. It is maintained with the help of
integrity constraints.

Q2. How is database integrity maintained?


Ans. Database integrity is maintained with the help of integrity constraints. The
constraints are the rules that are designed to keep data consistent and correct.
They act like a check on the incoming data. DBMS provides several mechanisms to
enforce integrity of the data.

Q3. Define referential integrity?


Ans. Referential Integrity: The referential integrity states that if a foreign key
exists in a relation, the foreign key value must match the primary key value of
some tuple in its parent relation.

Q4. Define functional dependency with examples?


Ans. Functional Dependency:
A functional dependency in a database is a relationship between two attributes,
typically within a single table, where one attribute uniquely determines the value
of another attribute. In other words, if you know the value of one attribute, you
can determine the value of another attribute.
*Example:* Consider a table Students
STUDENT(StudentID, StudentName, DOB)
StudentID → StudentName, DOB

Q5. Define Synonym?


[Link] a database, a synonym is created when two different names are used for
the same information (Attributes). If an attribute resides in more than one entity,
make sure that all entities use the same attribute name.

Q6. Define partial dependency?


Ans. A partial functional dependency exists when one or more non-key attributes
(Such as NAME) are functionally dependent on part (but not all) of the primary
key.

Q7. What are Database Anomalies? Only list their names.


Ans. Database Anomalies:
Anomalies are problems that can occur in poorly planned, un-normalized
databases where all the data is stored in one table (a flat-file database).
Types of Anomalies: There are the following types of Anomalies:
1. Insertion Anomaly: 2. Deletion Anomaly: 3. Modification Anomaly

Q8. What is the concept of transitive dependency?


Ans. Transitive Dependency: It states that in a relation R, if an attribute B is
functionally dependent on an attribute A, and the attribute C is functionally
dependent on the attribute B. This implies that the attribute C is functionally
dependent on attribute A.

Q9. When is a relation in second normal form?


Ans. A relation is said to be in 2NF if and only if it is in 1st NF and non - key
attribute must depends upon all the parts of primary key.

Q10. Write down conditions for a table to be in 2NF?


Ans. For a table to be in Second Normal Form (2NF), it must satisfy the following
conditions:
*First Normal Form (1NF):* The table must already be in First Normal Form. This
means: All columns must contain atomic (indivisible) values.
*No Partial Dependencies:* Every non-prime attribute (an attribute that is not
part of any candidate key) must be fully functionally dependent on the entire
primary key.

CHAPTER 5:
Q1. List down any two advantages of Microsoft Access?
Ans.
i. Sample Database: It includes sample database applications to assist you to
learn about real world tables, forms, queries and reports.
ii. Wizard: It makes very easy to create a database you can choose from several
examples of database in database wizard.

Q2. List advantages of MS-ACCESS?


Ans. Following are the advantages of MS-ACCESS:
- Sample Databases
- Wizard
- Microsoft office integration
- Common standards
- Easier programming
- Keys to understand structure
- Remove Redundancy

Q3. List advantages of RDBMS?


Ans. Main advantages of RDBMS are as follows:
 Complex queries can be carried out.
 Ease of use.
 Better security.
 Cater for future requirements.
 Data is only stored once.

Q5. What is Query?


Ans. Query:
It is a statement that extracts specific information from database. It is created by
specifying the fields to display from a table or another query. It is more flexible
way of selecting, filtering and sorting records.

Q6. Define a "Form"?


Ans. The form object of database is used to enter data into databases, edit data
and view data from database. We can add, update, and delete records in our
table by using a form.

Q7. Write any two uses of reports?


Ans.
1. It is used to retrieve and present data in formatted way.
2. It simply a list of records in database, one record after the other.

CHAPTER 7:
1. Enlist different types of form in MS Access. imp
2. Write any two advantages of form. imp
3. Define List and Combo Boxes.
4. What are Radio Buttons?
5. What is a Sub Form? Why are sub forms used? imp
6. What is check box?
7. Define linking.
8. What is Switch board?

C LANGUAGE

CHAPTER 9:
Q1. Why is C known as strongly typed language?
Ans. C is a strongly typed language i.e., all variables must be declared before
being used. The compiler will report an error if an undeclared variable is used in a
program. A variable is declared in C by specifying its type and name.

Q2. What is an identifier? Give an example.


Ans. Identifier:
Identifiers are the names used to represent variables, constant, types, function,
and labels in the program. Identifiers in C can contain any number of characters,
but only the first 31 are significant to C compiler (Identifiers must be unique).
There are two types of identifiers in C: standard identifiers and user-defined
identifiers.

Q3. Define keywords with example?


Ans. Keywords:
Keywords or reserved words are the words, which have predefined meanings in
C. There are 32 words defined as keywords in C. These have predefined uses and
cannot be used or redefined for any other purpose in a C program. They are
always written in lower case. e.g. for, if, break and auto, case, void etc.

Q4. Define Variables?


Ans. Variables:
Variables are named memory locations (Memory cells), which are used to store
program's input data and its computational results during program execution.
Variables must not be matched with keyword or reserved words. e.g Sum, Avg
and etc.

Q5. What is garbage value?


Ans. Garbage Value:
In C program when a variable is declared. The compiler set aside some memory
space for it. If we do not initialize a value to that variable. This allocated memory
space may contain data meaningless to program. This is called garbage value.

Q6. What is variable initialization?


Ans. Variable Initialization:
Assigning a value to a variable at the time of its declaration is called initializing a
variable. e.g., int num=2;

Q7. Write the legal characters of an identifier?


Ans. Legal Characters:
Following are the legal characters of identifiers:
i. The first letter of an identifier should be either a letter or an underscore.
However, it is discouraged to start an identifier name with an underscore.
ii. There is no rule on length of an identifier. However, the first 31 characters of
identifier are discriminated by the compiler.

Q8. Write down some rules for declaring naming Variable in C?


Ans. Rules for naming Variables:
Some important rules for Naming Variable in C are:
1. A variable name can consist of letters, digits, and the underscore character (_)
2. The first character of the variable name must be a letter.
3. A variable can only be declared for only one data type.

Q9. Differentiate between constant and variable?


Ans.
Constant and Variable :
A constant is a quantity whose value cannot be changed during program
execution. | A Variable is a name of memory location whose value can be
changed during program execution.

Q10. Define string constant. Give two example?


Ans. Text enclosed in double quote characters such as "simple" is a string
constant. The compiler merges a series of adjacent string constant into single
string constant. For example "simple" "book" produces the same single block of
storage as "simple book".

Q11. How character constants are written is C-Language?


Ans. A "Character Constants" is formed by enclosing a single character from the
representable character set within single quotation marks (' ').
*Example:* 'a', '5', '@'

Q12. Write errors in the following code?


Float avg;
printf ("Enter a number:");
scanf ("% f ", avg);
Ans. Error 1: Float must be written in lowercase letters it should be float.
Error 2: Address of Operator (Ampersand) is missing in scanf("%f", avg); should be
scanf("%f", &avg); to pass the address of avg.

Q13. Find any two errors?


char ch, ch1, sum
ch1 = '2';
ch2 = '6';
Ans.
Error 1: There is no statement terminator after variable declaration statement.
Error 2: Ch1 variable is not declared

Q14. What do you mean by Case Sensitive in C-Language? OR


Q14. C is a Case Sensitive Language. What does it mean?
Ans. C is a Case Sensitive language. This means that C compiler considers
uppercase and lowercase letters to be distinct characters. For example, the
compiler considers SQUARE_AREA and Square_Area as two different identifiers to
different memory locations.

Q15. Define Data Type. Give example?


Ans. We have to give data for a program but computer cannot understand the
difference between integers, floating points and characters. Therefore we need to
tell the computer about the type of data entered in the computer. C gives various
ways to tell the computer about the type of data such as int, char, float etc.

Q16. What do you know about the data type in C Language?


Ans. In C, data type defines a set of values and a set of operations on those
values. Some of the data types over:
int, double, char, float etc.

Q17. What is a Relational Operator?


Ans. Relational Operators:
Relational Operators are used to compare two values. These operators always
evaluate to true or false. They produce a non-zero value (in most cases 1) if the
relationship evaluate to true and a 0 if the relationship evaluates to false. There
are the following six basic relational operators in C. e.g. >, >=, <= and etc.

Q18. Define logical operator. Give example?


Ans. Logical Operators:
The logical operators are used to evaluate compound conditions. There are three
logical operators in C language.;
1. AND operator
2. OR operator
3. NOT operator

[Link] down the use of OR operator?


Ans. Use of Logical operator || (Logical OR)
when combines two conditions, evaluates to true if any one of the conditions
evaluates to true, otherwise evaluates to false.

Q20. Determine the output of the following code?


int x, y = 6;
x = y++;
printf("%d", x);
Ans.
Output: 6

Q21. Write the output of the code?


printf ("value=%d",4-1);
Ans. value = 3

Q22. Find output?


int a = 5 , b = 10;
int z = a + b _ 2;
printf("Result = %d" , z);
Ans. Output:
Result = 25

Q23. Describe the use of comments in C-language?


Ans. Comments are used to clarify the logic of any program. Single line comment
and multiple line comments can be used. For instance
// I am using C / C ++
/_ We
are
going
to school _/
Comments does not over weight the memory of source code. Comments are
ignored when a program runs.

Q24. Why are comments used in C program?


Ans. Use of comments in C program:
Comments are used to increase the readability of the program. Comments are
notes about different lines of code that explain the purpose of the code. The user
can insert information notes in the code. It helps in debugging and modifying the
program later.

Q25. Differentiate between unary and binary operators.


Q26. What is meant by operator precedence?

CHAPTER 10:
1. Define standard input.
2. What is the use of Field width specifier?
3. What is the use of "printf" function? Write its syntax.
4. List three types of format specifiers?
5. What is the use of "scanf" function? Write its syntax.
6. Why is the ampersand (&) used in scanf function?
7. What happens if the & sign is missed in the scanf function?
8. What is the use of "getch" function?
9. What is the use of "getche" function?
10. Which function is used to clear the screen in C?
CHAPTER 11:
1. What is a control structure?
2. Define selection structure.
3. What is a condition?
4. Draw flowchart of if/if-else/if-else-if statements.
5. What is the use of "if-else" statement?
6. Write the syntax of "if-else" statement.
7. What is the use of "if-else-if" statements?
8. Differentiate between if-else and if-else-if statements.
9. What is "switch" statement?
10. What is conditional operator? Write its syntax / general form.

CHAPTER 12:
1. Write two uses or advantages of loops.
2. Write the syntax of while loop with example.
3. What is counter-controlled loop? •
4. What is a sentinel-controlled loop?
5. What is nested loop? How does it work?
6. What is the use of "goto" statement?

CHAPTER 13:
1. Why functions are used in programming?
2. What are the advantages of function.
3. What are actual parameters?
4. Differentiate between User defined and Built in functions.
5. What is return statement?
6. How does a function return a value?
7. What is function definition?
8. Define function signature.
9. What is scope of local and global variables?
10. Differentiate between local and global variables.
11. What are function arguments?
CHAPTER 14:
1. What is file handling?
2. What is binary stream?
3. What is a text stream?
4. Describe EOF marker.
5. What is the use of fopen() function? Give example.
6. Define a pointer.
7. Why is it important to close a file? How it is closed?
8. What is formatted I/O?
9. Write the usage of file pointer.
10. What is new line marker?

You might also like