SlideShare a Scribd company logo
1 of 26
Written by: ABDUL HASEEB AHMED # 03086872060
Page 1 of 26
Written by: ABDUL HASEEB AHMED # 03086872060
Page 2 of 26
Data Basics (chapter 1)
What is data?
Raw fact and figure are called data. Example: no. of students in a college.
What is Data capturing?
Any process for converting information into a form that can be handled by a computer is called data
capturing.
What is Data Manipulation?
The following operation may then be performed on the gathered data, classifying, sorting, calculation,
summarizing.
Define information.
Informationisorganizedorclassifieddatawhichhassome meaningful valuesforthe receiver.Information
is the processed data on which decisions and actions are based.
Example: no. of student get marks greater than 55.
Define field. A collection of related characters or set of characters is called a record.
Define Record. A collection of related field treated as a single unit is called a record.
Define file. A collection of related record treated as a single unit is called a file or a data set.
Define master file.
These are the latest updated files which never become empty, ever since they are created. They maintain
information that remain constant over a long period of time.
Define backup file.
These are again permanent files and their purpose is the protection of vital data of an organization.
Define transaction file.
These are those files in which data prior to the stage of processing is recorded.
Types of file function point of view.
There are two type of file. 1. Program files 2. Data files.
Types of file organization point of view.
There are two type of file. 1. Sequential file 2. Direct or random file 3.index sequential.
Define database.
A database is a collection of logically related data set or files.
Define data integrity.
Dataintegrity referstomaintainingandassuringthe accuracyandconsistencyof data overitsentire life-
cycle. Forexample,if anemployeeisenteredwithanemployee_idvalue of 123,the databaseshouldnot
allow another employee to have an ID with the same value.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 3 of 26
Define DBMS.
The data management system (a collection of program) which is used for storing and manipulating database
is called database management system.
Components of database system.
There are four major components of database system 1. Data 2. Hardware 3. Software 4. Personals
Basic Concept and Terminology of Database (2nd
chapter)
ď‚«Define tuple/occurrence/record.
A tuple isone record(one row).
ď‚«Define relation.
A two-dimensional array of data that contain descriptive information about an entity is known as table or
relation. The relation are used to store information about an entity.
ď‚«What do you knowabout Entity?
An entity is anything about which information is stored in data base.
ď‚«Define view.
A view is also known as virtual table. It is created by SQL. The views provide more flexibility and
security in displaying data from tables.
ď‚«Define indexes.
An index is a data structure that is used by DBMS to locate a particular record in a file more quickly.
DBMS use the index file to speed up the sorting and searching operation.
ď‚«Define key, primary key, foreign key, candidate key, and composite key.
Key: a key is an attribute or set of attributes that uniquely identifies a tuple in a relation.
Primary key: an attribute or set of attributes that uniquely identifies a tuple/row/record in a relation is
known as primary key.
Foreign key: an attribute or set of attribute in a relation whose value match a primary key in another
table.
Candidate key: an attribute or set of attributes that can be used as primary key is called candidate key.
Composite / concatenate key: a primary key that consist of two or more attribute is known as composite
key.
ď‚«What do you knowabout end users?
A user or end user are the person who directly interact with the data base system. End user interact with
the database through an interface.
ď‚«Define DBA(database administrator).
Written by: ABDUL HASEEB AHMED # 03086872060
Page 4 of 26
A database administrator is a person in development of any database system. He is responsible for the
design, implementation, operation, management and maintenance of database.
Database Design Process (3rd
chapter)
ď‚«What is DFD (Data FlowDiagram)?
A data flowdiagram (DFD) isa graphical representationof the "flow"of data throughan information
system,modellingitsprocessaspects.
ď‚«Data modeling.
Data modeling is the process of identifying the3 data objects and the relationship between them.
ď‚«Define relationship.
The relationship indicates how the entities/objects are connected or relate to each other.
ď‚«Difference b/wcardinality & MODALITY.
Modality describe relationship as either mandatory or optional.it specifies absolute minimum number of
relationship.
The number of entity occurrences associated with each occurrences of the related entity is known as
cardinality.
ď‚«ď‚«What is E-R diagram? Its symbol.
An entity-relationshipdiagram(ERD) isa data modelingtechnique thatgraphicallyillustratesan
informationsystem'sentitiesandthe relationshipsbetweenthoseentities.
For connection
ď‚«Data base design process.
Database designisthe process of producinga detaileddatamodel of a database. Thisdata model
containsall the neededlogical andphysical design
ď‚«Logical data base design.
The processof logical designinvolvesarrangingdataintoa seriesof logical relationshipscalledentities
and attributes.Anentityrepresentsachunkof information.Inrelational databases,anentityoften
maps toa table.An attribute isa componentof anentityandhelps define the uniquenessof the entity.
ď‚«Physical database design.
Physical database design is used to implement the database as a set of stored record, file, indexes and
other data structures.
For entities
For attribute
Relationship
Written by: ABDUL HASEEB AHMED # 03086872060
Page 5 of 26
ď‚« Difference b/w centralized, partitioned,replicated & hybrid.
It is also known as basic data distribution strategies
1. Centralized: All data are located at a single site.
2. Partitioned: The database is divided into partitioned (fragments).each partition assigned to a
particular site.
3. Replicated: full copy of database is assigned to more than one site.
4. Hybrid: database divided in both critical and non-critical fragments. non critical fragments are
stored at only one place while critical fragments are stored at multiple sites
ď‚«Define feasibility study.
Feasibility study involves the area identification and selection. This is also known as preliminary
investigation.
ď‚«Define requirement analysis.
During this activity, user requirement are gathered. I.e. the possible input for the database or required
functionality.
Data integrity and Normalization (4th
chapter)
ď‚«What is data integrity?
Data integrity means correctness and consistency of data.
ď‚«Difference b/wreferential integrity & entity integrity.
Referential integrity is a constraint on foreign key value that states that if a foreign key exist in a relation
then either the foreign key value must match the primary key value of some tuple in its home relation or
the foreign key value must be completely null.
Entity integrity is a constraints on primary values that states that no attribute of a primary key should
contain null.
ď‚«What is normalization?
Normalization is the process of converting complex data structure into simple data structure.it is based on
the analysis of functional dependence.
ď‚«What is 1NF, 2NF, 3NF?
1NF a relation is in first normal form if and only if all underlying domains contain atomic values only.
2NF a relation is in second normal form if it is in 1NF and every non-key attribute is fully functionally
depend on the primary key.
3NF a relation is in third normal form if it is in 2NF and no transitive dependencies exist.
A non-key attribute depend on the other non-key attribute.
ď‚«What is functional dependency?
Written by: ABDUL HASEEB AHMED # 03086872060
Page 6 of 26
A functional dependencyoccurswhenone attribute inarelationuniquelydeterminesanotherattribute.
Thiscan be writtenA -> B whichwouldbe the same as stating"B is functionally dependentuponA."
ď‚«What is transitive dependency?
If A=B and B=C then we can say A=C it is transitive dependency.
ď‚«Difference b/wsynonyms & homonyms.
A synonym is created when two different name are used for the same information.
A homonyms is created when same name is used for two different Attributes.
ď‚«Define redundancy.
Redundancy means storing the same information in two different ways or forms
i.e. Employee_age (error) D_O_Birth
ď‚«What is data base anomalies? Insertion, deletion & updating anomalies.
An InsertAnomaly occurs whencertainattributescannotbe insertedintothe database withoutthe
presence of otherattributes.Forexample thisisthe converse of delete anomaly- we can't add a new
course unlesswe have atleastone studentenrolledonthe course.StudentNum.CourseNum.
A Delete Anomalyexistswhencertainattributesare lostbecause of the deletionof otherattributes.
An UpdatingAnomaly existswhenone ormore instancesof duplicateddataisupdated,butnotall.
ď‚«What is mutual exclusiveness of data?
ď‚«Explain conditions of1NF, conditions of2NF, and conditions of3NF.
Condition of1NF
ď‚· Contains only atomic values
ď‚· There are no repeating groups
Condition of2NF
ď‚· It is in first normal form
ď‚· All non-key attributes are fully functional dependent on the primary key
Condition of3NF
ď‚· It is in second normal form
ď‚· There is no transitive functional dependency
Written by: ABDUL HASEEB AHMED # 03086872060
Page 7 of 26
Introduction to MS-Access (5th
chapter)
ď‚«What is MS-Access?
MS-Access is one of the most powerful and popular DBMS. It is use to manage database.
ď‚« Different method ofcreating database.
1. Create using database wizard
2. create without database wizard
3. open an existing database
ď‚«Enlist database objects.
1. Table 2. Form 3. Quires 4. Report
ď‚« What is IDE?
IDE stand for integrity development environment, it is an interface use to create database.
ď‚«What is degree/cardinality of a relation?
Cardinalityindicatesthe numberof instances(none,one,ormany) of an entityinrelationtoanother
entity.
ď‚«Different data types use in MS Access.
Following are the data types available in MS-Access
1. Text (any combination of letter up to 255 character)
2. Memo (up to 64000 character)
3. Number (number for mathematical calculations)
4. Date/Time (Date and Time or combination of both)
5. Currency (monetary values include dollar sign $)
6. Auto Number (automatically assign unique integer to the record)
7. Yes / No (this option for true/false yes/no on/off etc.)
8. OLE Object (object linking and embedding)
9. Hyperlink (hyperlink will link to a website or any other location)
ď‚«Define URL.
Uniform resource locator sub address which is a location in the file or page in the web site
http://www.google.com
ď‚«Define input mask.
Input mask control the value of a record and set it in a specific format. (____)-____-____.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 8 of 26
Table and Queries (6th
chapter)
ď‚«Apply filtering and sorting operation in MS Access.
ď‚· to view the list of properties by state starting with those whose state is not known, click the State
column header
ď‚· In the Sort & Filter section of the Ribbon, click the Ascending button
ď‚· On the Ribbon, click Remove Sort
ď‚· To see the list of properties whose type is not known, right-click Property Type and click Sort a to Z
ď‚· On the Ribbon, click Remove Sort
ď‚«What is query?
Query means questions or inquires, query select record from one or more tables in a database.
We can select, view, analyses and sort with queries.
ď‚«Advantages ofquery.
1. Queriesallowthe usertoextractrelevantinformationfromadatabase.
2. Queriesalsoallowthe usertojoinmultiple tables.
ď‚«Explain cross tab, selection, and update and append queries.
Select Queries: it retrieves data from one or more tables and displays the result in a datasheet
Action Queries: Action query make changes in record of existing table or create new table.
1. Delete query: delete a group of records from one or more table.
2. Update query: make changes to a group of records from one or more table.
3. Append query: add a group of records from one or more table.
Crosstab queries:use to calculate or restructure data for easier analysis of your data
Sum, average,count or other type of computation for data.
Microsoft Access forms and reports (7th
chapter)
ď‚«Define report.
Representation of processed data obtained from a database is called report.
ď‚«Define form. Different type ofform.
Form creates user interface to our table, use to enter data in tables.
1. Columnar form: single record is displayed at one time with labels and form fields.
2. Justified form: single record is displayed at one time with labels and form fields are listed across
the screen
3. Tabular form: Multiple record are displayed on the page at a time with field in Column and
record in row.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 9 of 26
4. Datasheet form: datasheet form initially displays data in datasheet view.
ď‚«Objective ofDBMS.
1. Availability
2. Shareability
3. Evolvability
4. Database integrity
ď‚«Define join.
Join combinesrecordsfromtwoor more tablesina relational database.A JOINis a meansfor
combiningfieldsfromtwotables(ormore) byusingvaluescommontoeach.
ď‚«Define SQL.
SQL standsforStructured Query Language. SQL is usedto communicate withadatabase.
ď‚«Difference b/wcombo box & List box.
List box values are all displayed during data entering while the combo box values are not displayed until
the arrow button is clicked to open it.
ď‚«Difference b/wcheck box & Radio button.
Radio button and check box are used to display yes/no true/false or on/off values. Only one values from a
group of radio buttons can be selected while any or all values from a check box group can be chosen.
Getting Started with C (1st
chapter)
What is program?
A well-defined set of instruction given to the computer is called computer program.
Who is programmer?
A person who write a computer program is called a programmer. Programmer use programming language
or tools to write program.
What is programming?
The process of writing computer programs is called programming.
What is programming language?
A set of word and symbols used to write programs is called programming language. The programming
language is used to write computer program.
What is ANSI C?
ANSI stand for American national standard institute developed a standard version of the language the
standard version is known as ANSI C.
What is turbo c++?
Written by: ABDUL HASEEB AHMED # 03086872060
Page 10 of 26
Turbo C++ is a C/C++ compiler and integrated development environment (IDE) and computer language
originally from Borland.
What is IDE?
IDE stands for integrated development environment
.exe file stands for?
.exe stands for EXECUTEABLE FILE
Command of turbo c++.
F1 HELP | F2 SAVE | F3 OPEN | ALT+F9 COMPILE |CTRL+F9 RUN
What is extension of c program file? .c .cpp
Howwe start TC with command?
1. Window 2. C:TCBIN
Difference b/w structured and unstructured programming.
In structured programming language the entire logic of a program is divided into number of smaller modules
or functions. Each module is a piece of code that implement a different functionality.
In unstructured programming language the entire logic of a program is implemented in a single modules or
functions. The program written in these languages are error prone, difficult to understand.
What is delimiters?
Braces which indicate the beginning and end of function body, these braces are called delimiters.
What is syntax error, logical error, runtime error?
Syntax error is a type of error that occur when an invalid statement is written in c program. The compiler
detect syntax error and display error message.
A type of error that occurs due to poor logic of the programmer is called logical error. A statement with
logical error may produce wrong result.
A type of error that occurs during the execution of the program is known as Runtime error.
Define low level language.
A language that is close to hardware and far from human language is called low level language.
Define high level language.
A type of language that is close to human language is called high level language. Example java, basic,
FORTRAN, c, c++.
Define assembly language.
Assembly language is machine language.it is one step higher then machine language.
What is compiler, interpreter? Difference.
A compiler is a program that convert the instructions of a high level language into machine language as a
whole.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 11 of 26
Interpreter convert a program into machine code statement by statement.
What is assembler?
An assembler is translating program that translate the instruction of an assembly language into machine
language.
Difference b/w source code and object code.
The program written in high level language is known as source program.it is also called source program.
The program in machine language is called object program.
Characteristics of high level language.
1. Easy to learn 2. Easy error selection 3. Machine independence
Element of C (2nd
chapter)
ď‚«What is bug? Also explain the debugging.
A bug is a coding error in a computer program. Debugging is the process of locating and removing
computer program bugs, errors or abnormalities.
ď‚«History ofc.
C is a programming language which born at “AT & T’s Bell Laboratory” of USA in 1972.C was written
by Dennis Ritchie, that’s why he is also called as father of c programming language. C language was
created for a specific purpose i.e. designing the UNIX operating system (which is currently base of many
UNIXbased OS).
ď‚«What is identifier? Difference b/wstandard and user define identifier.
Identifier are the name used to represent variables, constants, types, functions and labels in the program.
A type of identifier that has special meaning in c is also known as standard identifier.
Example: scanf,printf, stdio.h
A type of identifier that is defined by the programmer to access memory location is known as user define
identifier.
ď‚«What is keyword or reserve word?
Keyword is a word in c language that has a predefined meaning & purposes. Keyword are also known as
Reserve words. Example: if,auto, char, int. go to, while.
ď‚«What is variable, name and address?
A variable is a named memory location or memory cell.
An identifier that represent a memory location or memory cell is called variable name.
The memory location of a variable is called variable address.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 12 of 26
ď‚«Difference b/wdeclaring and initializing of a variable.
The process of specifying the variable name and its type is called variable declaration. Example: int a, b;
The process of assigning a value to a variable at the time of declaring is known as variable initialization.
Example: int a=12; double b=2.3;
ď‚«Write rule for naming of a variable.
1. Characters Allowed :
o Underscore(_)
o Capital Letters ( A – Z )
o Small Letters ( a – z )
o Digits ( 0 – 9 )
2. Blanks & Commas are not allowed
3. No Special Symbols other than underscore(_)are allowed
4. First Character should be alphabet or Underscore
5. Variable name Should not be Reserved Word
ď‚«What is constants?
A constant is a quantity that cannot be changed during program execution.
ď‚«Explain different data types use in c language.
Int (to store numeric value) Float (to store real value)
Double (to store large real value) Char (to store character value)
ď‚«What do you knowabout operators?
The symbol that are used to perform certain operation on data is called operator.
ď‚«What is assignment operator?
The statement that assign a value to a variable is known as assignment statement.
ď‚« Difference b/wincrement and decrement operator.
The increment operator is used to increase the value of a variable by 1.
The decrement operator is used to decrease the value of a variable by 1.
ď‚«Operator precedence.
Operator Precedence Chart
Operator Type Operator Associativity
Primary Expression
Operators
() [] . -> expr++ expr-- left-to-right
Unary Operators
* & + - ! ~ ++expr --expr (typecast)
size of
right-to-left
* / %
Written by: ABDUL HASEEB AHMED # 03086872060
Page 13 of 26
Binary Operators
+ -
left-to-right
>> <<
< > <= >=
== !=
&
^
|
&&
||
Ternary Operator ?: right-to-left
Assignment Operators = += -= *= /= %= >>= <<= &= ^= |= right-to-left
Comma , left-to-right
ď‚«What is comment? Difference b/wsingle line and multi-line comment.
Comments are the lines of program that are not executed.
For single line comment use // this is a single line comment.
For multi-line comment use /* this is multi line comment */
ď‚«What is arithmetic operator, arithmetic expression? Example.
Arithmetic operator is a symbol that perform mathematical operation on data.
Example: +, - , *, /, %.
A type of expression in which only arithmetic operator are used is called arithmetic expression.
Example: a+b; a+b/c;
Input & Output (3rd
chapter)
ď‚«Difference b/w PRINTF & SCANF function.
The printf function is used to display output on the monitor. I.e. printf (“this is my first c program”);
Syntax
printf (format string, argument list);
scanf function is used to get information from the user.i.e. Scanf (“%d”, &a);
Syntax
Scanf (format string, &variable, &variable, &variable, &variable);
ď‚«What is field width specifier? Example.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 14 of 26
Field width specifier is used to display no. of columns in which the value is printed.
i.e. %6d specifies an integer for a field of width 6.
ď‚«What is format specifier? Example.
Format specifiers specify the format in which the value of variable should be displayed on the screen.
%d for int, %f for float, %lf for double, %c for char, %i for integer and %ld for long integer.
ď‚«Difference b/w getch ( ) and getche ( ) function.
getch ():Thisfunctionisusedto accept single characterfrom user,but it has no echo(display) onscreen
whenitis pressed.Mostlyitisusedat the end of program, whenuserneedtosee final outputof his/her
program.
getche (): This function is used to accept single character from user, and it has echo (display) on screen
when it is pressed.
ď‚«Define escape sequence.
Escape sequence are special characters used in format string to modify the format of output.
i.e. b for back space f for form feed n for new line t for tab ’ single quote etc.
Decision Constructs (4th
chapter)
ď‚«Explain IF, IF ELSE, IF ELSE IF statements with examples and syntax.
1. If it is used to execute or skip a statement or set of statement by checking a condition.
Syntax
If (condition)
{
Statement
}
Written by: ABDUL HASEEB AHMED # 03086872060
Page 15 of 26
2. If else it is used to execute one block of statement when condition is true and the other when it is
false.
Syntax
If (condition)
{
Statement
}
else
{
Statement
}
3. If else if it is used to execute one block of statement from many blocks of statements.
If (condition)
{
Statement
}
else if
{
Statement
}
else
{
Statement
}
ď‚«What do you know about nested if?
If statement within an if statement is called nested if statement.
ď‚«Define switch statements and syntax.
The switch statement is another conditional structure. It is good alternative of nested if-else.it can be used
easily when there are many choices available and only one should be executed.
Switch (expression)
{
Case val1:
Statement 1;
Break;
Case val2:
Statement 2;
Break;
Written by: ABDUL HASEEB AHMED # 03086872060
Page 16 of 26
Default:
Statement;
}
Loop constructs (5th
chapter)
ď‚«Define loop.
A statement or set of statement that is executed repeatedly is known as loop.
ď‚«Explain WHILE, DO WHILE, FOR loop with syntax and example.
While this loop execute one or more statements while the given condition remain true.
Syntax
While (condition)
Statements;
Do while first of all the body of loop is executed then the condition is evaluated, if it is true the control
again enters the body of the loop.
Syntax
Do {
Statements;
}
While (condition);
For loop execute one or more statements for a specified number of time. This loop is called counter control
loop
Written by: ABDUL HASEEB AHMED # 03086872060
Page 17 of 26
Syntax
For (initialization; condition; increment/decrement)
{
Statements;
}
ď‚«Define nested loop.
A loop within a loop is called nested loop.
ď‚«Define goto statement.
This statement is used to perform an unconditional transfer of control to a named label.
ď‚«Difference b/w while & do while loop.
While loop Do while loop
In while loop, condition comes before the body of
the loop
In do-while loop, condition comesafterthe body of
the loop.
No use semicolon after condition Semicolon is used after the condition
Function in C (6th
chapter)
ď‚«What do you know return in function?
A function can return a single value. When a return statement is executed in the function, the control moves
back to the calling function along with the returned value.
ď‚«Define function & types of function.
A function is a named block of code that perform some action. The function are used to perform similar
kind of task again and again. There are two type of function
1. User-defined function
2. Built-in function
ď‚«What is function prototype/function declaration/function signature?
Function prototype are usually placed at the beginning of the source file just before the main ( ) function.
It consist of
Written by: ABDUL HASEEB AHMED # 03086872060
Page 18 of 26
ď‚· Function name
ď‚· Function return type
ď‚· Number and type of parameter
ď‚«What is calling of a function?
The statement that activates a function is known as function call.
ď‚«Difference b/w local, global variable and their scope/lifetime.
A variable declared inside the function is called local variable
The lifetime of the local variable starts when the control enters the function in which it is declared and
automatically destroy when the control exit.
A variable declared outside any function is known as global variable.
Global variable exist in the memory as long as the program is running and destroy when the program
terminates.
ď‚«Three advantages of using function.
1. Easier to code
2. Easier to modify
3. Easier to maintain or debug
4. Reusability
5. Less programming time
File Handling in C (7th
chapter)
ď‚«Define text stream.
A text stream is a sequence of character. A certain character translation may occur in a text stream.
ď‚«EOF stands for?
EOF stands for End of File.
ď‚«File opening and closing in c.
A file should be opened before it can be processed.
Syntax
File_pointer = fopen (file_name, Mode)
After the file has been processed the connection between file and program should be terminated.
Syntax
Fclose (file_pointer)
Written by: ABDUL HASEEB AHMED # 03086872060
Page 19 of 26
ď‚«Declaring and initializing string variable.
Char name [ ] = “ICS”;
ď‚«Function definition and header of function.
A set of statements that explain what a function does is called function definition.
The first line of function definition is known as function header
Syntax
Return-type Function-name (parameters);
{
Statements;
}
ď‚«Define pointer.
A type of variable that is used to store the memory addresses of a memory cell is known as pointer.
ď‚«Define control structure.
A statement used to control the flow of execution in a program is called control structure.
Type of control structure are as follow:
1. Sequence
2. Selection
3. Repetition
4. Function call
Written by: ABDUL HASEEB AHMED # 03086872060
Page 20 of 26
Important long Questions
1. Define data base/DBMS and explain features,advantages and disadvantages of database/DBMS.
2. What do you know about modeling? Explain different type of data base models.
3. Briefly explain the database design process with the help of diagram.
4. Draw and explain ER diagram for the hospital.
5. What is normalization? Explain 1NF, 2NF, 3NF.
6. Explain the data base objects.
7. Define query also explain different type of quires.
8. How would you create,edit, compile, link and execute a c program? Discuss briefly.
9. What is programming language? Discuss its types/categories.
10. What is data type? Discuss various data type used in c language.
11. How many type of operators available in c language? Discuss briefly.
12. What is function? How many type of function available in c? Discuss the difference b/w them.
13. Briefly explain the basic structure of c program.
14. What is “switch” statement? Explain the working with example.
15. Define for loop/while loop/do while loop. Explain the working with example.
16. Explain different data types use in MS-Access.
Important Practical Question (MS Access)
1. Write the process of creating table in MS Access.
2. Write the procedure of creating of form in MS Access.
3. How you can add a combo box/check box on form in MS Access.
4. Write down the procedure to create the switch board in MS Access.
5. Write the procedure to find and replace data in MS Access.
6. Write the procedure to create query in MS Access.
7. Explain the procedure to apply primary key on table.
C Language
1. Write a program in which check the number is Positive or Negative/Even or Odd.
2. Write a program in which check the number is Prime or not.
3. Write a program in which take the input from user and print the table using loop.
4. Write a program that input height and width and print area.
5. Write a program print number 1 to 100 with loop.
6. Write a program that inputs two/three numbers and display the maximum number in c language.
7. Write a program that inputs three numbers and display the sum average in c language.
8. Write a program to print the factorial of a number in c language.
9. Write a program that ask the user to enter Radius and print Area of circle.
10. Write a program that display diamond shape using for loop.
11. Write a program to convert distance from kilometer into miles.
12. Write a program that display the value stored in a string variable name.
13. Write a program multiply two number in function.
14. C program for swapping of two numbers
Written by: ABDUL HASEEB AHMED # 03086872060
Page 21 of 26
C practical
General program
#include<stdio.h>
#include<conio.h>
Void main (void)
{
Clrscr ();
enter_program_logic_here
Printf (“This is my first c
Program.”);
Getch ();
}
Practical 1: Write a program in which check
the number is Positive or Negative/Even or Odd.
Int a;
Printf (“enter no.”);
Scanf (“%d”, &a);
Positive or negative
If (a>0)
{
Printf (“positive no.”);
}
else
{
Printf (“negative no.”);
}
Even or Odd
If (a%2==0)
{
Printf (“Even no.”);
}
else
{
Printf (“Odd no.”);
}
Practical 2: Write a program in which check
the number is Prime or not.
Int number, count;
Printf (“enter no.”);
Scanf (“%d”, &number);
For (int a=1; a<=number; a++)
{
If (number% a==0)
{
Count++;
}
}
If (count==2)
{
Printf (“prime no.”);
}
Else
{
Printf (“not a prime no.”);
}
Written by: ABDUL HASEEB AHMED # 03086872060
Page 22 of 26
Practical 3: Write a program in which take the
input from user and print the table using loop.
Int number;
Printf (“enter no.”);
Scanf (“%d”, & number);
For (int a=1; a<=10; a++)
{
Printf (“%d * %d = %d”,
number, a, number*a”);
}
Practical 4: Write a program that input height
and width and print area.
Int height, width, area;
Printf (“enter height and
width”);
Scanf (“%d %d”, &height,
&width);
Area=height*width;
Printf (“Area =%d”, area”);
}
Practical 5: Write a program print number 1 to
100. (With loop)
int i = 1;
for (i = 1; i <= 100; i++)
{
printf ("%d", i);
}
Practical 6: Write a program that inputs
two/three numbers and display the maximum
number in c language.
Int a, b, c;
Printf (“enter number a b
c”);
Scanf (“%d %d %d”, &a, &b,
&c);
If (a>b && a>c)
{
Printf (“a is greater”);
}
Else if (b>a && b>c)
{
Printf (“b is greater”);
}
Else
{
Printf (“c id greater”);
}
Practical 7: Write a program that inputs three
numbers and display the sum average in c
language.
Int a, b, c, sum, average;
Printf (“enter no. a, b, c”);
Scanf (“%d %d %d”, &a, &b, &c);
Sum= a+b+c;
Average=sum/3;
Printf (“sum = %d Average = %d”,
sum, average);
Written by: ABDUL HASEEB AHMED # 03086872060
Page 23 of 26
Practical 8: Write a program to print the
factorial of a number in c language.
Int num, fact=1;
Printf (“enter number”);
Scanf (“%d”, &num);
For (int a=1; a<=num; a++)
{
Fact=fact*a;
}
Printf (“factorial of the no.
%d is = %d”, num, fact);
Practical 9: Write a program that ask the user
to enter Radius and print Area of circle.
float radius, area;
Printf (“enter radius”);
Scanf (“%f”, &radius);
area=3.14*radius*radius;
printf (“area of circle is =
%f”, area);
Practical 10: Write a program that display
diamond shape using for loop.
void main()
{ int i, j, k;
int n = 0;
printf ("Program for
displaying pattern of *.n");
printf ("Enter the maximum
number of *: ");
scanf("%d", &n);
printf("nHere is the
Diamond of Starsn");
for (i = 1; i <= n; i++)
{
for (j = 0; j < (n -
i); j++)
printf(" ");
for (j = 1; j <= i;
j++)
printf("*");
for (k = 1; k < i;
k++)
printf("*");
printf("n");
}
for (i = n - 1; i >= 1; i--)
{
for (j = 0; j < (n -
i); j++)
printf(" ");
for (j = 1; j <= i;
j++)
printf("*");
for (k = 1; k < i;
k++)
printf("*");
printf("n");
}
printf("n");
}
Practical 11: Write a program to convert
distance from kilometer into miles.
float km, mile;
Printf (“enter distance in
Kilometers”);
Scanf (“%f”, &km);
Mile=km*
Printf(“distance in miles = %f”,
miles);
Practical 12: write a program that display
the value stored in a string variable name.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 24 of 26
Char name [ ] = “ICS”;
Printf (“Name is %s”, name);
Practical 13: write a program multiply two
number in function.
#include <stdio.h>
int mult ( int x, int y );
int main()
{
int x;
int y;
printf (“Please input two
numbers to be multiplied: “);
scanf (“%d", &x);
scanf (“%d", &y);
printf (“The product of your
two numbers is %dn", mult(x,
y));
getchar();
}
int mult (int x, int y)
{
return x * y;
}
Practical 14: C program for swapping of two
numbers
#include<stdio.h>
int main(){
int a,b,temp;
printf("Enter any two
integers: ");
scanf("%d%d",&a,&b);
printf("Before swapping:
a = %d, b=%d",a,b);
temp = a;
a = b;
b = temp;
printf("nAfter swapping:
a = %d, b=%d",a,b);
return 0;
}
Written by: ABDUL HASEEB AHMED # 03086872060
Page 25 of 26
(MS Access)
General lines
ď‚· Double click on MS-Access icon.
ď‚· Create a new blank database.
ď‚· Click finish
Practical 1: Write the process of creating
table in MS Access.
1. Click the Microsoft Office Button
, and then click New.
2. Type a file name for the new
database.
3. To browse to a different location to
save the database, click the folder
icon.
4. Click Create.
The new database opens, and a new
table named Table1 is created and
opens in Datasheet view.
Practical 2: Write the procedure of
creating of form in MS Access.
1. On the Create tab, in the Forms
group, click More Forms, and then
click Form Wizard.
2. Follow the directions on the pages of
the Form Wizard.
3. On the last page of the wizard, click
Finish.
Practical 3: How you can add a combo
box/check box on form in MS Access.
1. Open the form in design view
2. Select view>toolbox to view the
tool box
3. Make sure the control wizard button
is pressed.
4. Click the list or combo box tool
button.
5. Draw the outline on form.
6. Select the table or query
7. Select field from the table or query
8. Set the width of the combo box
9. Type the name that will appear on
the box’s label
10. Click finish
Practical 4: Write down the procedure to
create the switch board in MS Access.
1. In the Database Tools group, click
Switchboard Manager.
Microsoft Access asks if you'd like
to create a switchboard, click yes.
This creates a Main Switchboard.
2. The Create New dialog box appears.
3. Type the name of the new
switchboard and click OK.
4. Repeat steps 2 through 3 for each
secondary switchboard you want to
create, and then click Close.
Practical 5: Write the procedure to find
and replace data in MS Access.
1. In your table, select the field
(column) that you want to search.
2. On the Home tab, in the Find group,
click Find, or press CTRL+F.
3. The Find and Replace dialog box
appears.
Written by: ABDUL HASEEB AHMED # 03086872060
Page 26 of 26
4. To find data, in the Find and
Replace dialog box, click the Find
tab. To run a find-and-replace
operation, click the Replace tab.
5. In the Find What box, type your
search string. To replace data, enter a
replacement string in the Replace
With box.
6. Optionally, use the Look in list to
change the field that you want to
search, or to search the entire table
instead.
7. Optionally, in the Match list, click
Any Part of Field. This provides the
broadest possible search.
8. Make sure that the Search Fields as
Formatted check box is selected,
and then click Find Next.
Practical 6: Write the procedure to create
query in MS Access.
1. On the Create tab, in the other
group, click Query Wizard.
2. In the New Query dialog box, click
Simple Query Wizard, and then
click OK.
3. Under Tables/Queries, click the
table that has the data that you want
to use. In this case, click Table:
Customers.
4. Under Available Fields, double-
click the Contact, Address, Phone,
and City fields. This adds them to
the SelectedFields list. When you
have added all four fields, click next.
5. Name the query London Contacts,
and then click Finish.
Practical 7: Explain the procedure to apply
primary key on table.
1. Select the table whose primary key
you want to set or change.
2. On the Home tab, in the Views
group, click View, and then click
Design View.
3. In the table design grid, select the
field or fields that you want to use as
the primary key.
To select one field, click the row
selector for the field that you want.
To select more than one field, hold
down CTRL, and then click the row
selector for each field.
4. On the Design tab, in the Tools
group, click Primary Key.
A key indicator appears to the left of
the field or fields that you specify as
the primary key.

More Related Content

What's hot

Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalizationdaxesh chauhan
 
Oracle Table Partitioning - Introduction
Oracle Table Partitioning  - IntroductionOracle Table Partitioning  - Introduction
Oracle Table Partitioning - IntroductionMyOnlineITCourses
 
The Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database ConstraintsThe Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database Constraintssontumax
 
Kd1 Struktur Hirarki Database
Kd1 Struktur Hirarki DatabaseKd1 Struktur Hirarki Database
Kd1 Struktur Hirarki DatabaseDesty Yani
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)Ehtisham Ali
 
How to build tabular dashboards using proc report
How to build tabular dashboards using proc reportHow to build tabular dashboards using proc report
How to build tabular dashboards using proc reportFrank Bereznay
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceAnuj Modi
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbmsMegha yadav
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle databaseSamar Prasad
 
Database system concepts and architecture
Database system concepts and architectureDatabase system concepts and architecture
Database system concepts and architectureJafar Nesargi
 
Relational database
Relational database Relational database
Relational database Megha Sharma
 
Basic VSAM
Basic VSAMBasic VSAM
Basic VSAMDan O'Dea
 
Spatial Data Mining
Spatial Data MiningSpatial Data Mining
Spatial Data MiningRashmi Bhat
 
MySQL Indexing : Improving Query Performance Using Index (Covering Index)
MySQL Indexing : Improving Query Performance Using Index (Covering Index)MySQL Indexing : Improving Query Performance Using Index (Covering Index)
MySQL Indexing : Improving Query Performance Using Index (Covering Index)Hemant Kumar Singh
 
Redshift performance tuning
Redshift performance tuningRedshift performance tuning
Redshift performance tuningCarlos del Cacho
 
Microsoft SQL Server - Files and Filegroups
Microsoft SQL Server - Files and FilegroupsMicrosoft SQL Server - Files and Filegroups
Microsoft SQL Server - Files and FilegroupsNaji El Kotob
 

What's hot (20)

DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
Oracle Table Partitioning - Introduction
Oracle Table Partitioning  - IntroductionOracle Table Partitioning  - Introduction
Oracle Table Partitioning - Introduction
 
The Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database ConstraintsThe Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database Constraints
 
Database design
Database designDatabase design
Database design
 
Kd1 Struktur Hirarki Database
Kd1 Struktur Hirarki DatabaseKd1 Struktur Hirarki Database
Kd1 Struktur Hirarki Database
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
 
How to build tabular dashboards using proc report
How to build tabular dashboards using proc reportHow to build tabular dashboards using proc report
How to build tabular dashboards using proc report
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independence
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbms
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle database
 
Database system concepts and architecture
Database system concepts and architectureDatabase system concepts and architecture
Database system concepts and architecture
 
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
Relational database
Relational database Relational database
Relational database
 
Basic VSAM
Basic VSAMBasic VSAM
Basic VSAM
 
Spatial Data Mining
Spatial Data MiningSpatial Data Mining
Spatial Data Mining
 
MySQL Indexing : Improving Query Performance Using Index (Covering Index)
MySQL Indexing : Improving Query Performance Using Index (Covering Index)MySQL Indexing : Improving Query Performance Using Index (Covering Index)
MySQL Indexing : Improving Query Performance Using Index (Covering Index)
 
Redshift performance tuning
Redshift performance tuningRedshift performance tuning
Redshift performance tuning
 
Microsoft SQL Server - Files and Filegroups
Microsoft SQL Server - Files and FilegroupsMicrosoft SQL Server - Files and Filegroups
Microsoft SQL Server - Files and Filegroups
 

Similar to Data Basics and Concepts

Dbms Concepts
Dbms ConceptsDbms Concepts
Dbms Conceptsadukkas
 
Database Systems - introduction
Database Systems - introductionDatabase Systems - introduction
Database Systems - introductionJananath Banuka
 
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdfBahria University Islamabad, Pakistan
 
DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...
DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...
DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...Bahria University Islamabad, Pakistan
 
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfDatabase system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfBahria University Islamabad, Pakistan
 
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdfBahria University Islamabad, Pakistan
 
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfDatabase system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfBahria University Islamabad, Pakistan
 
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfDatabase system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfBahria University Islamabad, Pakistan
 
Bc0041
Bc0041Bc0041
Bc0041hayerpa
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMSAbhishekRajpoot8
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfrsujeet169
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answerssheibansari
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modelingoudesign
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Bahria University Islamabad, Pakistan
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Bahria University Islamabad, Pakistan
 

Similar to Data Basics and Concepts (20)

Dbms Concepts
Dbms ConceptsDbms Concepts
Dbms Concepts
 
Database Concepts
Database ConceptsDatabase Concepts
Database Concepts
 
Database Systems - introduction
Database Systems - introductionDatabase Systems - introduction
Database Systems - introduction
 
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
 
DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...
DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...
DBA book sql rdbms 4rth Complete book Database systems Handbook dbms rdbms by...
 
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfDatabase system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
 
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
4rth Complete book Database systems Handbook dbms rdbms by Muhammad Sharif.pdf
 
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfDatabase system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
 
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdfDatabase system Handbook 3rd DONE Complete DBMS book Full book.pdf
Database system Handbook 3rd DONE Complete DBMS book Full book.pdf
 
Database systems Handbook 4th dbms by Muhammad Sharif.pdf
Database systems Handbook 4th  dbms by Muhammad Sharif.pdfDatabase systems Handbook 4th  dbms by Muhammad Sharif.pdf
Database systems Handbook 4th dbms by Muhammad Sharif.pdf
 
Database systems Handbook 4th dbms by Muhammad Sharif.pdf
Database systems Handbook 4th  dbms by Muhammad Sharif.pdfDatabase systems Handbook 4th  dbms by Muhammad Sharif.pdf
Database systems Handbook 4th dbms by Muhammad Sharif.pdf
 
Database systems Handbook 4th dbms by Muhammad Sharif.pdf
Database systems Handbook 4th  dbms by Muhammad Sharif.pdfDatabase systems Handbook 4th  dbms by Muhammad Sharif.pdf
Database systems Handbook 4th dbms by Muhammad Sharif.pdf
 
Bc0041
Bc0041Bc0041
Bc0041
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMS
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answers
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modeling
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 

Data Basics and Concepts

  • 1. Written by: ABDUL HASEEB AHMED # 03086872060 Page 1 of 26
  • 2. Written by: ABDUL HASEEB AHMED # 03086872060 Page 2 of 26 Data Basics (chapter 1) What is data? Raw fact and figure are called data. Example: no. of students in a college. What is Data capturing? Any process for converting information into a form that can be handled by a computer is called data capturing. What is Data Manipulation? The following operation may then be performed on the gathered data, classifying, sorting, calculation, summarizing. Define information. Informationisorganizedorclassifieddatawhichhassome meaningful valuesforthe receiver.Information is the processed data on which decisions and actions are based. Example: no. of student get marks greater than 55. Define field. A collection of related characters or set of characters is called a record. Define Record. A collection of related field treated as a single unit is called a record. Define file. A collection of related record treated as a single unit is called a file or a data set. Define master file. These are the latest updated files which never become empty, ever since they are created. They maintain information that remain constant over a long period of time. Define backup file. These are again permanent files and their purpose is the protection of vital data of an organization. Define transaction file. These are those files in which data prior to the stage of processing is recorded. Types of file function point of view. There are two type of file. 1. Program files 2. Data files. Types of file organization point of view. There are two type of file. 1. Sequential file 2. Direct or random file 3.index sequential. Define database. A database is a collection of logically related data set or files. Define data integrity. Dataintegrity referstomaintainingandassuringthe accuracyandconsistencyof data overitsentire life- cycle. Forexample,if anemployeeisenteredwithanemployee_idvalue of 123,the databaseshouldnot allow another employee to have an ID with the same value.
  • 3. Written by: ABDUL HASEEB AHMED # 03086872060 Page 3 of 26 Define DBMS. The data management system (a collection of program) which is used for storing and manipulating database is called database management system. Components of database system. There are four major components of database system 1. Data 2. Hardware 3. Software 4. Personals Basic Concept and Terminology of Database (2nd chapter) ď‚«Define tuple/occurrence/record. A tuple isone record(one row). ď‚«Define relation. A two-dimensional array of data that contain descriptive information about an entity is known as table or relation. The relation are used to store information about an entity. ď‚«What do you knowabout Entity? An entity is anything about which information is stored in data base. ď‚«Define view. A view is also known as virtual table. It is created by SQL. The views provide more flexibility and security in displaying data from tables. ď‚«Define indexes. An index is a data structure that is used by DBMS to locate a particular record in a file more quickly. DBMS use the index file to speed up the sorting and searching operation. ď‚«Define key, primary key, foreign key, candidate key, and composite key. Key: a key is an attribute or set of attributes that uniquely identifies a tuple in a relation. Primary key: an attribute or set of attributes that uniquely identifies a tuple/row/record in a relation is known as primary key. Foreign key: an attribute or set of attribute in a relation whose value match a primary key in another table. Candidate key: an attribute or set of attributes that can be used as primary key is called candidate key. Composite / concatenate key: a primary key that consist of two or more attribute is known as composite key. ď‚«What do you knowabout end users? A user or end user are the person who directly interact with the data base system. End user interact with the database through an interface. ď‚«Define DBA(database administrator).
  • 4. Written by: ABDUL HASEEB AHMED # 03086872060 Page 4 of 26 A database administrator is a person in development of any database system. He is responsible for the design, implementation, operation, management and maintenance of database. Database Design Process (3rd chapter) ď‚«What is DFD (Data FlowDiagram)? A data flowdiagram (DFD) isa graphical representationof the "flow"of data throughan information system,modellingitsprocessaspects. ď‚«Data modeling. Data modeling is the process of identifying the3 data objects and the relationship between them. ď‚«Define relationship. The relationship indicates how the entities/objects are connected or relate to each other. ď‚«Difference b/wcardinality & MODALITY. Modality describe relationship as either mandatory or optional.it specifies absolute minimum number of relationship. The number of entity occurrences associated with each occurrences of the related entity is known as cardinality. ď‚«ď‚«What is E-R diagram? Its symbol. An entity-relationshipdiagram(ERD) isa data modelingtechnique thatgraphicallyillustratesan informationsystem'sentitiesandthe relationshipsbetweenthoseentities. For connection ď‚«Data base design process. Database designisthe process of producinga detaileddatamodel of a database. Thisdata model containsall the neededlogical andphysical design ď‚«Logical data base design. The processof logical designinvolvesarrangingdataintoa seriesof logical relationshipscalledentities and attributes.Anentityrepresentsachunkof information.Inrelational databases,anentityoften maps toa table.An attribute isa componentof anentityandhelps define the uniquenessof the entity. ď‚«Physical database design. Physical database design is used to implement the database as a set of stored record, file, indexes and other data structures. For entities For attribute Relationship
  • 5. Written by: ABDUL HASEEB AHMED # 03086872060 Page 5 of 26 ď‚« Difference b/w centralized, partitioned,replicated & hybrid. It is also known as basic data distribution strategies 1. Centralized: All data are located at a single site. 2. Partitioned: The database is divided into partitioned (fragments).each partition assigned to a particular site. 3. Replicated: full copy of database is assigned to more than one site. 4. Hybrid: database divided in both critical and non-critical fragments. non critical fragments are stored at only one place while critical fragments are stored at multiple sites ď‚«Define feasibility study. Feasibility study involves the area identification and selection. This is also known as preliminary investigation. ď‚«Define requirement analysis. During this activity, user requirement are gathered. I.e. the possible input for the database or required functionality. Data integrity and Normalization (4th chapter) ď‚«What is data integrity? Data integrity means correctness and consistency of data. ď‚«Difference b/wreferential integrity & entity integrity. Referential integrity is a constraint on foreign key value that states that if a foreign key exist in a relation then either the foreign key value must match the primary key value of some tuple in its home relation or the foreign key value must be completely null. Entity integrity is a constraints on primary values that states that no attribute of a primary key should contain null. ď‚«What is normalization? Normalization is the process of converting complex data structure into simple data structure.it is based on the analysis of functional dependence. ď‚«What is 1NF, 2NF, 3NF? 1NF a relation is in first normal form if and only if all underlying domains contain atomic values only. 2NF a relation is in second normal form if it is in 1NF and every non-key attribute is fully functionally depend on the primary key. 3NF a relation is in third normal form if it is in 2NF and no transitive dependencies exist. A non-key attribute depend on the other non-key attribute. ď‚«What is functional dependency?
  • 6. Written by: ABDUL HASEEB AHMED # 03086872060 Page 6 of 26 A functional dependencyoccurswhenone attribute inarelationuniquelydeterminesanotherattribute. Thiscan be writtenA -> B whichwouldbe the same as stating"B is functionally dependentuponA." ď‚«What is transitive dependency? If A=B and B=C then we can say A=C it is transitive dependency. ď‚«Difference b/wsynonyms & homonyms. A synonym is created when two different name are used for the same information. A homonyms is created when same name is used for two different Attributes. ď‚«Define redundancy. Redundancy means storing the same information in two different ways or forms i.e. Employee_age (error) D_O_Birth ď‚«What is data base anomalies? Insertion, deletion & updating anomalies. An InsertAnomaly occurs whencertainattributescannotbe insertedintothe database withoutthe presence of otherattributes.Forexample thisisthe converse of delete anomaly- we can't add a new course unlesswe have atleastone studentenrolledonthe course.StudentNum.CourseNum. A Delete Anomalyexistswhencertainattributesare lostbecause of the deletionof otherattributes. An UpdatingAnomaly existswhenone ormore instancesof duplicateddataisupdated,butnotall. ď‚«What is mutual exclusiveness of data? ď‚«Explain conditions of1NF, conditions of2NF, and conditions of3NF. Condition of1NF ď‚· Contains only atomic values ď‚· There are no repeating groups Condition of2NF ď‚· It is in first normal form ď‚· All non-key attributes are fully functional dependent on the primary key Condition of3NF ď‚· It is in second normal form ď‚· There is no transitive functional dependency
  • 7. Written by: ABDUL HASEEB AHMED # 03086872060 Page 7 of 26 Introduction to MS-Access (5th chapter) ď‚«What is MS-Access? MS-Access is one of the most powerful and popular DBMS. It is use to manage database. ď‚« Different method ofcreating database. 1. Create using database wizard 2. create without database wizard 3. open an existing database ď‚«Enlist database objects. 1. Table 2. Form 3. Quires 4. Report ď‚« What is IDE? IDE stand for integrity development environment, it is an interface use to create database. ď‚«What is degree/cardinality of a relation? Cardinalityindicatesthe numberof instances(none,one,ormany) of an entityinrelationtoanother entity. ď‚«Different data types use in MS Access. Following are the data types available in MS-Access 1. Text (any combination of letter up to 255 character) 2. Memo (up to 64000 character) 3. Number (number for mathematical calculations) 4. Date/Time (Date and Time or combination of both) 5. Currency (monetary values include dollar sign $) 6. Auto Number (automatically assign unique integer to the record) 7. Yes / No (this option for true/false yes/no on/off etc.) 8. OLE Object (object linking and embedding) 9. Hyperlink (hyperlink will link to a website or any other location) ď‚«Define URL. Uniform resource locator sub address which is a location in the file or page in the web site http://www.google.com ď‚«Define input mask. Input mask control the value of a record and set it in a specific format. (____)-____-____.
  • 8. Written by: ABDUL HASEEB AHMED # 03086872060 Page 8 of 26 Table and Queries (6th chapter) ď‚«Apply filtering and sorting operation in MS Access. ď‚· to view the list of properties by state starting with those whose state is not known, click the State column header ď‚· In the Sort & Filter section of the Ribbon, click the Ascending button ď‚· On the Ribbon, click Remove Sort ď‚· To see the list of properties whose type is not known, right-click Property Type and click Sort a to Z ď‚· On the Ribbon, click Remove Sort ď‚«What is query? Query means questions or inquires, query select record from one or more tables in a database. We can select, view, analyses and sort with queries. ď‚«Advantages ofquery. 1. Queriesallowthe usertoextractrelevantinformationfromadatabase. 2. Queriesalsoallowthe usertojoinmultiple tables. ď‚«Explain cross tab, selection, and update and append queries. Select Queries: it retrieves data from one or more tables and displays the result in a datasheet Action Queries: Action query make changes in record of existing table or create new table. 1. Delete query: delete a group of records from one or more table. 2. Update query: make changes to a group of records from one or more table. 3. Append query: add a group of records from one or more table. Crosstab queries:use to calculate or restructure data for easier analysis of your data Sum, average,count or other type of computation for data. Microsoft Access forms and reports (7th chapter) ď‚«Define report. Representation of processed data obtained from a database is called report. ď‚«Define form. Different type ofform. Form creates user interface to our table, use to enter data in tables. 1. Columnar form: single record is displayed at one time with labels and form fields. 2. Justified form: single record is displayed at one time with labels and form fields are listed across the screen 3. Tabular form: Multiple record are displayed on the page at a time with field in Column and record in row.
  • 9. Written by: ABDUL HASEEB AHMED # 03086872060 Page 9 of 26 4. Datasheet form: datasheet form initially displays data in datasheet view. ď‚«Objective ofDBMS. 1. Availability 2. Shareability 3. Evolvability 4. Database integrity ď‚«Define join. Join combinesrecordsfromtwoor more tablesina relational database.A JOINis a meansfor combiningfieldsfromtwotables(ormore) byusingvaluescommontoeach. ď‚«Define SQL. SQL standsforStructured Query Language. SQL is usedto communicate withadatabase. ď‚«Difference b/wcombo box & List box. List box values are all displayed during data entering while the combo box values are not displayed until the arrow button is clicked to open it. ď‚«Difference b/wcheck box & Radio button. Radio button and check box are used to display yes/no true/false or on/off values. Only one values from a group of radio buttons can be selected while any or all values from a check box group can be chosen. Getting Started with C (1st chapter) What is program? A well-defined set of instruction given to the computer is called computer program. Who is programmer? A person who write a computer program is called a programmer. Programmer use programming language or tools to write program. What is programming? The process of writing computer programs is called programming. What is programming language? A set of word and symbols used to write programs is called programming language. The programming language is used to write computer program. What is ANSI C? ANSI stand for American national standard institute developed a standard version of the language the standard version is known as ANSI C. What is turbo c++?
  • 10. Written by: ABDUL HASEEB AHMED # 03086872060 Page 10 of 26 Turbo C++ is a C/C++ compiler and integrated development environment (IDE) and computer language originally from Borland. What is IDE? IDE stands for integrated development environment .exe file stands for? .exe stands for EXECUTEABLE FILE Command of turbo c++. F1 HELP | F2 SAVE | F3 OPEN | ALT+F9 COMPILE |CTRL+F9 RUN What is extension of c program file? .c .cpp Howwe start TC with command? 1. Window 2. C:TCBIN Difference b/w structured and unstructured programming. In structured programming language the entire logic of a program is divided into number of smaller modules or functions. Each module is a piece of code that implement a different functionality. In unstructured programming language the entire logic of a program is implemented in a single modules or functions. The program written in these languages are error prone, difficult to understand. What is delimiters? Braces which indicate the beginning and end of function body, these braces are called delimiters. What is syntax error, logical error, runtime error? Syntax error is a type of error that occur when an invalid statement is written in c program. The compiler detect syntax error and display error message. A type of error that occurs due to poor logic of the programmer is called logical error. A statement with logical error may produce wrong result. A type of error that occurs during the execution of the program is known as Runtime error. Define low level language. A language that is close to hardware and far from human language is called low level language. Define high level language. A type of language that is close to human language is called high level language. Example java, basic, FORTRAN, c, c++. Define assembly language. Assembly language is machine language.it is one step higher then machine language. What is compiler, interpreter? Difference. A compiler is a program that convert the instructions of a high level language into machine language as a whole.
  • 11. Written by: ABDUL HASEEB AHMED # 03086872060 Page 11 of 26 Interpreter convert a program into machine code statement by statement. What is assembler? An assembler is translating program that translate the instruction of an assembly language into machine language. Difference b/w source code and object code. The program written in high level language is known as source program.it is also called source program. The program in machine language is called object program. Characteristics of high level language. 1. Easy to learn 2. Easy error selection 3. Machine independence Element of C (2nd chapter) ď‚«What is bug? Also explain the debugging. A bug is a coding error in a computer program. Debugging is the process of locating and removing computer program bugs, errors or abnormalities. ď‚«History ofc. C is a programming language which born at “AT & T’s Bell Laboratory” of USA in 1972.C was written by Dennis Ritchie, that’s why he is also called as father of c programming language. C language was created for a specific purpose i.e. designing the UNIX operating system (which is currently base of many UNIXbased OS). ď‚«What is identifier? Difference b/wstandard and user define identifier. Identifier are the name used to represent variables, constants, types, functions and labels in the program. A type of identifier that has special meaning in c is also known as standard identifier. Example: scanf,printf, stdio.h A type of identifier that is defined by the programmer to access memory location is known as user define identifier. ď‚«What is keyword or reserve word? Keyword is a word in c language that has a predefined meaning & purposes. Keyword are also known as Reserve words. Example: if,auto, char, int. go to, while. ď‚«What is variable, name and address? A variable is a named memory location or memory cell. An identifier that represent a memory location or memory cell is called variable name. The memory location of a variable is called variable address.
  • 12. Written by: ABDUL HASEEB AHMED # 03086872060 Page 12 of 26 ď‚«Difference b/wdeclaring and initializing of a variable. The process of specifying the variable name and its type is called variable declaration. Example: int a, b; The process of assigning a value to a variable at the time of declaring is known as variable initialization. Example: int a=12; double b=2.3; ď‚«Write rule for naming of a variable. 1. Characters Allowed : o Underscore(_) o Capital Letters ( A – Z ) o Small Letters ( a – z ) o Digits ( 0 – 9 ) 2. Blanks & Commas are not allowed 3. No Special Symbols other than underscore(_)are allowed 4. First Character should be alphabet or Underscore 5. Variable name Should not be Reserved Word ď‚«What is constants? A constant is a quantity that cannot be changed during program execution. ď‚«Explain different data types use in c language. Int (to store numeric value) Float (to store real value) Double (to store large real value) Char (to store character value) ď‚«What do you knowabout operators? The symbol that are used to perform certain operation on data is called operator. ď‚«What is assignment operator? The statement that assign a value to a variable is known as assignment statement. ď‚« Difference b/wincrement and decrement operator. The increment operator is used to increase the value of a variable by 1. The decrement operator is used to decrease the value of a variable by 1. ď‚«Operator precedence. Operator Precedence Chart Operator Type Operator Associativity Primary Expression Operators () [] . -> expr++ expr-- left-to-right Unary Operators * & + - ! ~ ++expr --expr (typecast) size of right-to-left * / %
  • 13. Written by: ABDUL HASEEB AHMED # 03086872060 Page 13 of 26 Binary Operators + - left-to-right >> << < > <= >= == != & ^ | && || Ternary Operator ?: right-to-left Assignment Operators = += -= *= /= %= >>= <<= &= ^= |= right-to-left Comma , left-to-right ď‚«What is comment? Difference b/wsingle line and multi-line comment. Comments are the lines of program that are not executed. For single line comment use // this is a single line comment. For multi-line comment use /* this is multi line comment */ ď‚«What is arithmetic operator, arithmetic expression? Example. Arithmetic operator is a symbol that perform mathematical operation on data. Example: +, - , *, /, %. A type of expression in which only arithmetic operator are used is called arithmetic expression. Example: a+b; a+b/c; Input & Output (3rd chapter) ď‚«Difference b/w PRINTF & SCANF function. The printf function is used to display output on the monitor. I.e. printf (“this is my first c program”); Syntax printf (format string, argument list); scanf function is used to get information from the user.i.e. Scanf (“%d”, &a); Syntax Scanf (format string, &variable, &variable, &variable, &variable); ď‚«What is field width specifier? Example.
  • 14. Written by: ABDUL HASEEB AHMED # 03086872060 Page 14 of 26 Field width specifier is used to display no. of columns in which the value is printed. i.e. %6d specifies an integer for a field of width 6. ď‚«What is format specifier? Example. Format specifiers specify the format in which the value of variable should be displayed on the screen. %d for int, %f for float, %lf for double, %c for char, %i for integer and %ld for long integer. ď‚«Difference b/w getch ( ) and getche ( ) function. getch ():Thisfunctionisusedto accept single characterfrom user,but it has no echo(display) onscreen whenitis pressed.Mostlyitisusedat the end of program, whenuserneedtosee final outputof his/her program. getche (): This function is used to accept single character from user, and it has echo (display) on screen when it is pressed. ď‚«Define escape sequence. Escape sequence are special characters used in format string to modify the format of output. i.e. b for back space f for form feed n for new line t for tab ’ single quote etc. Decision Constructs (4th chapter) ď‚«Explain IF, IF ELSE, IF ELSE IF statements with examples and syntax. 1. If it is used to execute or skip a statement or set of statement by checking a condition. Syntax If (condition) { Statement }
  • 15. Written by: ABDUL HASEEB AHMED # 03086872060 Page 15 of 26 2. If else it is used to execute one block of statement when condition is true and the other when it is false. Syntax If (condition) { Statement } else { Statement } 3. If else if it is used to execute one block of statement from many blocks of statements. If (condition) { Statement } else if { Statement } else { Statement } ď‚«What do you know about nested if? If statement within an if statement is called nested if statement. ď‚«Define switch statements and syntax. The switch statement is another conditional structure. It is good alternative of nested if-else.it can be used easily when there are many choices available and only one should be executed. Switch (expression) { Case val1: Statement 1; Break; Case val2: Statement 2; Break;
  • 16. Written by: ABDUL HASEEB AHMED # 03086872060 Page 16 of 26 Default: Statement; } Loop constructs (5th chapter) ď‚«Define loop. A statement or set of statement that is executed repeatedly is known as loop. ď‚«Explain WHILE, DO WHILE, FOR loop with syntax and example. While this loop execute one or more statements while the given condition remain true. Syntax While (condition) Statements; Do while first of all the body of loop is executed then the condition is evaluated, if it is true the control again enters the body of the loop. Syntax Do { Statements; } While (condition); For loop execute one or more statements for a specified number of time. This loop is called counter control loop
  • 17. Written by: ABDUL HASEEB AHMED # 03086872060 Page 17 of 26 Syntax For (initialization; condition; increment/decrement) { Statements; } ď‚«Define nested loop. A loop within a loop is called nested loop. ď‚«Define goto statement. This statement is used to perform an unconditional transfer of control to a named label. ď‚«Difference b/w while & do while loop. While loop Do while loop In while loop, condition comes before the body of the loop In do-while loop, condition comesafterthe body of the loop. No use semicolon after condition Semicolon is used after the condition Function in C (6th chapter) ď‚«What do you know return in function? A function can return a single value. When a return statement is executed in the function, the control moves back to the calling function along with the returned value. ď‚«Define function & types of function. A function is a named block of code that perform some action. The function are used to perform similar kind of task again and again. There are two type of function 1. User-defined function 2. Built-in function ď‚«What is function prototype/function declaration/function signature? Function prototype are usually placed at the beginning of the source file just before the main ( ) function. It consist of
  • 18. Written by: ABDUL HASEEB AHMED # 03086872060 Page 18 of 26 ď‚· Function name ď‚· Function return type ď‚· Number and type of parameter ď‚«What is calling of a function? The statement that activates a function is known as function call. ď‚«Difference b/w local, global variable and their scope/lifetime. A variable declared inside the function is called local variable The lifetime of the local variable starts when the control enters the function in which it is declared and automatically destroy when the control exit. A variable declared outside any function is known as global variable. Global variable exist in the memory as long as the program is running and destroy when the program terminates. ď‚«Three advantages of using function. 1. Easier to code 2. Easier to modify 3. Easier to maintain or debug 4. Reusability 5. Less programming time File Handling in C (7th chapter) ď‚«Define text stream. A text stream is a sequence of character. A certain character translation may occur in a text stream. ď‚«EOF stands for? EOF stands for End of File. ď‚«File opening and closing in c. A file should be opened before it can be processed. Syntax File_pointer = fopen (file_name, Mode) After the file has been processed the connection between file and program should be terminated. Syntax Fclose (file_pointer)
  • 19. Written by: ABDUL HASEEB AHMED # 03086872060 Page 19 of 26 ď‚«Declaring and initializing string variable. Char name [ ] = “ICS”; ď‚«Function definition and header of function. A set of statements that explain what a function does is called function definition. The first line of function definition is known as function header Syntax Return-type Function-name (parameters); { Statements; } ď‚«Define pointer. A type of variable that is used to store the memory addresses of a memory cell is known as pointer. ď‚«Define control structure. A statement used to control the flow of execution in a program is called control structure. Type of control structure are as follow: 1. Sequence 2. Selection 3. Repetition 4. Function call
  • 20. Written by: ABDUL HASEEB AHMED # 03086872060 Page 20 of 26 Important long Questions 1. Define data base/DBMS and explain features,advantages and disadvantages of database/DBMS. 2. What do you know about modeling? Explain different type of data base models. 3. Briefly explain the database design process with the help of diagram. 4. Draw and explain ER diagram for the hospital. 5. What is normalization? Explain 1NF, 2NF, 3NF. 6. Explain the data base objects. 7. Define query also explain different type of quires. 8. How would you create,edit, compile, link and execute a c program? Discuss briefly. 9. What is programming language? Discuss its types/categories. 10. What is data type? Discuss various data type used in c language. 11. How many type of operators available in c language? Discuss briefly. 12. What is function? How many type of function available in c? Discuss the difference b/w them. 13. Briefly explain the basic structure of c program. 14. What is “switch” statement? Explain the working with example. 15. Define for loop/while loop/do while loop. Explain the working with example. 16. Explain different data types use in MS-Access. Important Practical Question (MS Access) 1. Write the process of creating table in MS Access. 2. Write the procedure of creating of form in MS Access. 3. How you can add a combo box/check box on form in MS Access. 4. Write down the procedure to create the switch board in MS Access. 5. Write the procedure to find and replace data in MS Access. 6. Write the procedure to create query in MS Access. 7. Explain the procedure to apply primary key on table. C Language 1. Write a program in which check the number is Positive or Negative/Even or Odd. 2. Write a program in which check the number is Prime or not. 3. Write a program in which take the input from user and print the table using loop. 4. Write a program that input height and width and print area. 5. Write a program print number 1 to 100 with loop. 6. Write a program that inputs two/three numbers and display the maximum number in c language. 7. Write a program that inputs three numbers and display the sum average in c language. 8. Write a program to print the factorial of a number in c language. 9. Write a program that ask the user to enter Radius and print Area of circle. 10. Write a program that display diamond shape using for loop. 11. Write a program to convert distance from kilometer into miles. 12. Write a program that display the value stored in a string variable name. 13. Write a program multiply two number in function. 14. C program for swapping of two numbers
  • 21. Written by: ABDUL HASEEB AHMED # 03086872060 Page 21 of 26 C practical General program #include<stdio.h> #include<conio.h> Void main (void) { Clrscr (); enter_program_logic_here Printf (“This is my first c Program.”); Getch (); } Practical 1: Write a program in which check the number is Positive or Negative/Even or Odd. Int a; Printf (“enter no.”); Scanf (“%d”, &a); Positive or negative If (a>0) { Printf (“positive no.”); } else { Printf (“negative no.”); } Even or Odd If (a%2==0) { Printf (“Even no.”); } else { Printf (“Odd no.”); } Practical 2: Write a program in which check the number is Prime or not. Int number, count; Printf (“enter no.”); Scanf (“%d”, &number); For (int a=1; a<=number; a++) { If (number% a==0) { Count++; } } If (count==2) { Printf (“prime no.”); } Else { Printf (“not a prime no.”); }
  • 22. Written by: ABDUL HASEEB AHMED # 03086872060 Page 22 of 26 Practical 3: Write a program in which take the input from user and print the table using loop. Int number; Printf (“enter no.”); Scanf (“%d”, & number); For (int a=1; a<=10; a++) { Printf (“%d * %d = %d”, number, a, number*a”); } Practical 4: Write a program that input height and width and print area. Int height, width, area; Printf (“enter height and width”); Scanf (“%d %d”, &height, &width); Area=height*width; Printf (“Area =%d”, area”); } Practical 5: Write a program print number 1 to 100. (With loop) int i = 1; for (i = 1; i <= 100; i++) { printf ("%d", i); } Practical 6: Write a program that inputs two/three numbers and display the maximum number in c language. Int a, b, c; Printf (“enter number a b c”); Scanf (“%d %d %d”, &a, &b, &c); If (a>b && a>c) { Printf (“a is greater”); } Else if (b>a && b>c) { Printf (“b is greater”); } Else { Printf (“c id greater”); } Practical 7: Write a program that inputs three numbers and display the sum average in c language. Int a, b, c, sum, average; Printf (“enter no. a, b, c”); Scanf (“%d %d %d”, &a, &b, &c); Sum= a+b+c; Average=sum/3; Printf (“sum = %d Average = %d”, sum, average);
  • 23. Written by: ABDUL HASEEB AHMED # 03086872060 Page 23 of 26 Practical 8: Write a program to print the factorial of a number in c language. Int num, fact=1; Printf (“enter number”); Scanf (“%d”, &num); For (int a=1; a<=num; a++) { Fact=fact*a; } Printf (“factorial of the no. %d is = %d”, num, fact); Practical 9: Write a program that ask the user to enter Radius and print Area of circle. float radius, area; Printf (“enter radius”); Scanf (“%f”, &radius); area=3.14*radius*radius; printf (“area of circle is = %f”, area); Practical 10: Write a program that display diamond shape using for loop. void main() { int i, j, k; int n = 0; printf ("Program for displaying pattern of *.n"); printf ("Enter the maximum number of *: "); scanf("%d", &n); printf("nHere is the Diamond of Starsn"); for (i = 1; i <= n; i++) { for (j = 0; j < (n - i); j++) printf(" "); for (j = 1; j <= i; j++) printf("*"); for (k = 1; k < i; k++) printf("*"); printf("n"); } for (i = n - 1; i >= 1; i--) { for (j = 0; j < (n - i); j++) printf(" "); for (j = 1; j <= i; j++) printf("*"); for (k = 1; k < i; k++) printf("*"); printf("n"); } printf("n"); } Practical 11: Write a program to convert distance from kilometer into miles. float km, mile; Printf (“enter distance in Kilometers”); Scanf (“%f”, &km); Mile=km* Printf(“distance in miles = %f”, miles); Practical 12: write a program that display the value stored in a string variable name.
  • 24. Written by: ABDUL HASEEB AHMED # 03086872060 Page 24 of 26 Char name [ ] = “ICS”; Printf (“Name is %s”, name); Practical 13: write a program multiply two number in function. #include <stdio.h> int mult ( int x, int y ); int main() { int x; int y; printf (“Please input two numbers to be multiplied: “); scanf (“%d", &x); scanf (“%d", &y); printf (“The product of your two numbers is %dn", mult(x, y)); getchar(); } int mult (int x, int y) { return x * y; } Practical 14: C program for swapping of two numbers #include<stdio.h> int main(){ int a,b,temp; printf("Enter any two integers: "); scanf("%d%d",&a,&b); printf("Before swapping: a = %d, b=%d",a,b); temp = a; a = b; b = temp; printf("nAfter swapping: a = %d, b=%d",a,b); return 0; }
  • 25. Written by: ABDUL HASEEB AHMED # 03086872060 Page 25 of 26 (MS Access) General lines ď‚· Double click on MS-Access icon. ď‚· Create a new blank database. ď‚· Click finish Practical 1: Write the process of creating table in MS Access. 1. Click the Microsoft Office Button , and then click New. 2. Type a file name for the new database. 3. To browse to a different location to save the database, click the folder icon. 4. Click Create. The new database opens, and a new table named Table1 is created and opens in Datasheet view. Practical 2: Write the procedure of creating of form in MS Access. 1. On the Create tab, in the Forms group, click More Forms, and then click Form Wizard. 2. Follow the directions on the pages of the Form Wizard. 3. On the last page of the wizard, click Finish. Practical 3: How you can add a combo box/check box on form in MS Access. 1. Open the form in design view 2. Select view>toolbox to view the tool box 3. Make sure the control wizard button is pressed. 4. Click the list or combo box tool button. 5. Draw the outline on form. 6. Select the table or query 7. Select field from the table or query 8. Set the width of the combo box 9. Type the name that will appear on the box’s label 10. Click finish Practical 4: Write down the procedure to create the switch board in MS Access. 1. In the Database Tools group, click Switchboard Manager. Microsoft Access asks if you'd like to create a switchboard, click yes. This creates a Main Switchboard. 2. The Create New dialog box appears. 3. Type the name of the new switchboard and click OK. 4. Repeat steps 2 through 3 for each secondary switchboard you want to create, and then click Close. Practical 5: Write the procedure to find and replace data in MS Access. 1. In your table, select the field (column) that you want to search. 2. On the Home tab, in the Find group, click Find, or press CTRL+F. 3. The Find and Replace dialog box appears.
  • 26. Written by: ABDUL HASEEB AHMED # 03086872060 Page 26 of 26 4. To find data, in the Find and Replace dialog box, click the Find tab. To run a find-and-replace operation, click the Replace tab. 5. In the Find What box, type your search string. To replace data, enter a replacement string in the Replace With box. 6. Optionally, use the Look in list to change the field that you want to search, or to search the entire table instead. 7. Optionally, in the Match list, click Any Part of Field. This provides the broadest possible search. 8. Make sure that the Search Fields as Formatted check box is selected, and then click Find Next. Practical 6: Write the procedure to create query in MS Access. 1. On the Create tab, in the other group, click Query Wizard. 2. In the New Query dialog box, click Simple Query Wizard, and then click OK. 3. Under Tables/Queries, click the table that has the data that you want to use. In this case, click Table: Customers. 4. Under Available Fields, double- click the Contact, Address, Phone, and City fields. This adds them to the SelectedFields list. When you have added all four fields, click next. 5. Name the query London Contacts, and then click Finish. Practical 7: Explain the procedure to apply primary key on table. 1. Select the table whose primary key you want to set or change. 2. On the Home tab, in the Views group, click View, and then click Design View. 3. In the table design grid, select the field or fields that you want to use as the primary key. To select one field, click the row selector for the field that you want. To select more than one field, hold down CTRL, and then click the row selector for each field. 4. On the Design tab, in the Tools group, click Primary Key. A key indicator appears to the left of the field or fields that you specify as the primary key.