In For Matics
In For Matics
In For Matics
Learning Objectives:
1. To understand the application development environment.
2. To gain programming Skills in GUI Programming Tool and Database Creation in RDBMS.
3. To design, program and develop database application using GUI Programming Tool and RDBMS.
4. To learn database connectivity using Visual Basic as Front-end tool.
5. To develop ability to use the Open Source Technology.
Competencies:
1. Student will become familiar with Application Development
2. Student will be able to develop & debug programs Independently.
3. Student can use SQL for storing and retrieving data from the RDBMS.
4. Ability to arrive at a normalized design of tables and other database objects in RDBMS.
5. Student will be able to develop a Client Server Application using Front end and Back end tools.
Class XI (Theory)
Duration: 3 hours
Unit No
1.
2.
3.
Unit Name
COMPUTER SYSTEM AND BUSINESS APPLICATIONS
INTRODUCTION TO PROGRAMMING
RELATIONAL DATABASE MANAGEMENT SYSTEM
Total Marks: 70
Marks
10
30
30
70
CBSE
Runtime-Enabling and Disabling Menu Commands, Displaying a Checkmark on a Menu Control, Making a Menu
Control Invisible, Adding Menu Control at Runtime, Displaying Pop-Up Menu;
General Controls (Advance): Image List, Common Dialog Box, ADO DC, DB Combo, Media Player Control, DB Grid;
Adding a Toolbar: Creating an Image List, Adding Images to the Toolbar, To Add Code for the Toolbar Buttons;
Adding Status Bar: Adding Status Bar panels, Adding Time on the panel.
Dialog Boxes: Pre-defined dialog box, Custom dialog box;
UNIT 3: RELATIONAL DATABASE MANAGEMENT SYSTEM
Database Management System
Introduction to database concepts: relation/Table, attribute, Tuple / Rows, field, Data, Concept of String, Number and
Date values, Data type and Data Integrity (Domain and Referential Integrity). Candidate key, Alternate key, Primary
Key, Foreign Keys; Data Normalization-first, second, third, BCNF normal form;
Examples of Commercially available Database Management Systems (Back-End) Oracle, MS-SQL Server, DB2,
MySQL, Sybase, INGRES.
Examples of Front End Softwares: Oracle Developer, Visual Basic, Visual C++, Power Builder, Delphi;
RDBMS Tool :
Interface with oracle, Login Screen, Entering Name and Password;
Classification of SQL Statements: DML (SELECT, INSERT, UPDATE, DELETE), DDL (CREATE, DROP, ALTER,
RENAME, TRUNCATE), DCL (GRANT, REVOKE), TCL (COMMIT, ROLLBACK);
SQL SELECT Statement: SQL SELECT statement, Selecting All the Columns, Selecting Specific Column, Column
Heading Default, Using Arithmetic Operators, Operator Precedence, Significance of NULL value, NULL values in
Arithmetic Expressions, Defining and using Column Alias, Concatenation Operator (||), Duplicate rows and their
Elimination (DISTINCT keyword), Role of SQL and SQL*Plus in interacting with RDBMS, Displaying Table Structure
(DESC command);
SELECT Statement Continued: Limiting Rows during selection (using WHERE clause), Working with Character
Strings and Dates, Using Comparison operators, BETWEEN Operator, IN Operator, LIKE Operator, IS NULL
Comparison, Logical Operators, Use of Logical Operators (AND/OR/NOT Operators), Logical Operator Precedence,
ORDER BY Clause, Sorting in Ascending/Descending Order, Sorting By Column Alias Name, Sorting On Multiple
Columns;
Functions: SQL Functions, Types of SQL Function (Single Row/Multiple Row), Single Row SQL Functions,
Character Functions (Case Conversion/Character Manipulation), Case Conversion Functions (lower (), InitCap (),
UPPER ()) Character Manipulation Function (CONCAT(), INSTR(), LENGTH(), TRIM(), SUBSTR(), LPAD()),
Number Functions (ROUND(), TRUNC(), MOD()), Working with Dates (LAST_DAY(), MONTHS_BETWEEN(),
NEXT_DAY(), ADD_MONTHS(), ROUND(), TRUNC()) Arithmetic Operation on Dates, Date Functions and their
Usage, Data type Conversion Functions, Implicit and Explicit Conversion, TO_CHAR Function with Dates,
TO_CHAR Function For Numbers, TO_NUMBER and TO_DATE Functions, NVL Function and its Usage, DECODE
Function and its Usage;
Grouping Records: Concept of Grouping Records and Nested Grouping, Nested Grouping of records, Group
Functions, Types of group functions (MAX(), MIN(), AVG(), SUM(), COUNT()), Using AVG and SUM Functions,
Using MIN and MAX Functions, Using the COUNT Function, using COUNT(*), DISTINCT clause with COUNT,
Group Functions and Null Values, Using NVL Function with Group Functions, Grouping Records: Group By Clause,
Grouping By More than One Column, Illegal Queries with Group By Clause, Excluding Group Results: Having
Clause, Nesting Group Functions,
Sub Queries: Concept of Sub-Query, Sub Query to Solve a Problem, Guidelines for Using Sub Queries, Types of
Sub-Queries (Single Row and Multiple Row) and (Single Column and Multiple Column); Single Row Sub-Query and
its Execution;
Displaying Data From Multiple Tables: Concept of Join, Result of Join, Cartesian Product and Generating Cartesian
Product example using Mathematical Set), Types Of Joins (EQUI, SELF, NON-EQUI, OUTER (LEFT and RIGHT)),
Equi-join: Retrieving Records with Equi-join, Additional Search Conditions using AND operator, Short Naming
Convention for Tables (Table Aliases), Non-Equi join and its Implementation, Outer-Join and Its Usage, Self-Join
(Joining a table to Itself);
CBSE
Manipulating Data of A Table/Relation: Concept of DML (Data Manipulation Language), INSERT Statement,
Inserting New Rows, Inserting New Rows with Null Values, Inserting Date Values, Use of Substitution Variable to
Insert Values, Copying Rows From Another Table, Update Statement to Change Existing Data of a Table, Updating
Rows In A Table, Updating Rows Based on Another Table, Delete statement/ Removing Row/Rows from a Table,
Deleting Rows Based on condition from another Table; Making Data Manipulation Permanent (COMMIT). Undo Data
Manipulation Changes (ROLLBACK)
Database Objects: View, Table, Sequence, index, and Synonyms, DDL (Data Definition Language), Naming
Convention, Creating Views, Creating Synonyms, Simple Views and Complex Views, Retrieving Data From a View,
Querying a View, Modifying a View,
Including Constraints: Constraints, Concept of using Constraints, Constraint Guidelines, Defining Constraints, NOT
NULL, UNIQUE KEY, PRIMARY KEY, FOREIGN KEY, FOREIGN KEY Constraint Keywords, CHECK, Adding a
Constraint, Dropping a Constraint, Disabling Constraints, Enabling Constraints, Viewing Constraints, Viewing The
Columns, Associated with Constraints;
Creation of a Table/Relation: CREATE TABLE Statement, Data types, The DEFAULT option, Creating Tables,
Referencing Another Users Tables, Querying the Database Dictionary to view all tables in the Oracle Database,
Creating a Table by Using a Sub-Query;
Managing Existing Tables and other Database Objects: The ALTER TABLE Statement, Adding a New Column in a
Table, Modifying Existing Column, Dropping a Column, Renaming an Object, Truncating a Table, Adding Comments
to a Table, Dropping Views, Dropping Synonyms, Dropping Tables; giving permission to other users to work on
Created Tables and Revoking it (GRANT and REVOKE statement).
CBSE
Class XI (Practical)
Duration: 3 Hours
1.
Total Marks: 30
Hands on Experience
15
A problem should be given covering the following
Table definition (The table must include constraints)
A form with Label, Text, Command Button control, List Box, Drive List Box, Directory List Box, File List
Box, Tool and Menu Bar (Any 4)
DSN to access tables in the database
For data connectivity (Activex Database Control)
Change of Text box Control Properties to view Database fields
2.
Practical File
05
The practical file should contain print outs from each of the following topics.
1. Create an application using Visual Basic with a Text Box control to accept a name from the user and print
Hello <Name> in a message box. E.g. when user types his name as Kamal Kant in the text box and clicks
OK button, a message Hello Kamal Kant should be displayed and if he clicks on Cancel button a message as
Bye Kamal Kant should appear.
2. Create an Application having two Text Boxes on the Window. Get Title, First Name and Last Name in it. On
clicking Ok button a message should appear by joining Title + First Name + Last Name. e.g. if user enters Prof.
in Title, Rajyash in First Name, and Swami as Last Name then the message to be printed should be Happy
Deepawli Prof. Rajyash Swami.
3. Create an application to let user guess any number and click a Play button given on the form. On clicking the
Play button the application will generate a random number. If the generated number is same as guessed by the
user then display a message You Win otherwise display a message You Loose
4. Create an application to Display Image files kept in different folders in the system. The application should allow
the user to navigate in the folders and list all Image Files (*.BMP, *.JPG) when ever a image file is selected it
should get that picture displayed in an Image control.
5. Create an application having menu bar and tool bar to create a text file, navigate and open text files, edit text
file and save changes made by the user.
6. Create a small application working as a general purpose calculator.(+, -, x, )
7. SQL assignments (based on Demo Tables present in the ORACLE database for example Emp table, Dept
table and SalGrade table):
Display all the records (all columns) from table Emp.
Display EmpNo and EName of all employees from table Emp.
Display Ename, Sal and Sal added with Comm from table Emp.
Display EName joined with Job with heading Employee, Sal*12 as Total Salary from table Emp.
Display distinct Sal of employees from table Emp..
Show the Structure of table Dept
Write a query to display EName and Sal of Employees whose salary is greater than or equal to 3000 from
table Emp..
Write a Query to display employee name, salary and department number who are not getting commission
from table Emp.
Write a Query to display employee Number, name, sal and sal*12 as Annual Salary whose commission is
not NULL from table Emp.
Write a Query to display employee name and salary of those employee who dont have there salary in the
range of 1500 to 2000
Write a Query to display name, job, salary, and HireDate of employees who are hired between February 20,
1981, and May 1, 1981. Order the query in ascending order of HireDate.
Write a Query to display the name and hire date of all employees who were hired in 1982
Write a Query to display the name, job title and salary of employee who do not have manager.
Write a Query to display the name of employee whose name contains A as third alphabet.
Write a Query to display the name of employee whose name contains T as the last alphabet.
Write a Query to display the name of employee whose name contains M as first alphabet L as third
alphabet.
Write a Query to display the name of employee who is having L as any alphabet of the name.
Write a query to display the current system date.
Write a Query to display employee number, name, salary, salary increase by 15% expressed as a whole
number. Label the column as New Salary.
Write a Query to display the employees name and salary review date, which is the date after six months of
HireDate.
Write a Query to display the employees name and salary review date, which is the date after six months of
HireDate in format of Sunday, 7 SEP, 1981.
CBSE
For each employee display employee name and total number of weeks lapsed between HireDate and
Today.
For each employee display employee name and total number of days lapsed between HireDate and Today.
Create a query that produces display in the following format
<employee name> Earns $<salary> Monthly and working as <Job >
Write a query which displays the employee name with the first letter capitalized and all other letters lower
case and length of there name string.
Write a Query to to display the employee name and commission amount. If the employee does not earn
commission, put No Commission.
Write a query to display the grade of all employees based on the value of the column job as per following
scheme:
JOB
GRADE
PRESIDENT
A
MANAGER
B
ANALYST
C
SALESMAN
D
CLERK
E
NONE OFTHE ABOVE
O
Write a query to display the EName and DeptNo and DName for all employees using tables Emp and Dept.
Write a Query to display employee name, department name and location of all employees who have
manager number between 7500 and 7900.
Write a Query to display the employee name, department number and all the employees that worked in the
same department as a given employee.
Write a Query to display employee name and HireDate of employees who are employed after Employee
BLAKE.
Write a Query to display employee number, name and managers name with their manager number.
Write a Query to Display the Sum, Average, Highest and Lowest salary of the employees.
Write a Query to Display the Sum, Average, Highest and Lowest salary of the employees grouped by
department number.
Write a Query to Display the Sum, Average, Highest and Lowest salary of the employees grouped by
department number and sub-grouped by job.
Write a query to display the number of employee with same job.
Write a query to display the average of Highest and lowest salary of each department.
Write a query to display the difference of Highest and lowest salary of each department having maximum
salary > 4000.
Write a query to display the employee name and job for all employee in the same department as ALLEN
Write a query to display employee name and salary of those who either work in department 10 or have
salary greater than employee 7521.
Before the following exercise please ensure that you are provided with a table Employee with following description
Table: Employee
Name of Column
Type
ID
NUMBER (4)
First_Name
VARCHAR2 (30)
Last_Name
VARCHAR2 (30)
User_ID
VARCHAR2 (10)
Salary
NUMBER (9,2)
Use DESCRIBE command to ensure the table structure.
Add the following data in the above Table as instructed
ID
First_Name
Last_Name
User_ID
Salary
1
Dim
Joseph
Jdim
5000
2
Jagannath
Mishra
jnmishra
4000
3
Siddharth
Mishra
smishra
8000
4
Shankar
Giri
sgiri
7000
5
Gautam
Buddha
bgautam
2000
CBSE
Populate table with first record mentioning the column list in the insert clause.
Populate table with next two records without mentioning the column list in the insert clause.
Populate table with 4th record and enter only ID and First_Name
Populate table with 5th record and enter ID, User_ID, and Last_Name only.
For record with ID = 4 update record with Last_Name User_ID and Salary.
For record with ID = 5 update records with First_Name and Salary.
Make the changes permanent.
Modify the Last_Name, of the employee 3, to Gautam.
Modify the Salary and increase it by 1000, for all who get salary less then 5000.
Delete the employee record having First_Name as Siddharth.
Make the changes permanent.
Remove the entire contents of the table
Undo the above step.
Create a table Employee1 with columns ID, First_Name and Dept_ID from table Employee and also confirm
the existence of table Employee1
Create a view VU_Emp1 which should include column EmpNo, EName and DeptNo from the table Emp.
Create a view VU_Emp2 which should include column EmpNo, EName and DeptNo from the table Emp and
change the column headings as EmpNumber, Employee, Department.
Select VIEW_NAME and TEXT from the data dictionary USER_VIEWS.
Create the table Department table based on the following table instance chart.
Column Name
ID
Name
Data Type
NUMBER
VARCHAR2
Length
8
25
Populate the table Department with data from table dept. Including only required columns.
Create the table Employee based on the following table instance chart.
Column Name
ID
First_Name Last_Name Dept_ID
NUMBER
VARCHAR2
VARCHAR2
NUMBER
Data Type
Length
8
25
25
8
Rename table Employee1 to Employee2.
Drop table Employee2.
Drop table Employee and Department
Create table Customer as per following Table Instance Chart.
Column Name
Key Type
Nulls/Unique
Fk Table
Fk Column
Datatype
Length
CBSE
Cust_Name
Cust_Add1
Cust_Add2
Pincode
Cust_Phone
number
varchar2
varchar2
varchar2
number
varchar2
7
30
20
30
6
Add one column Email of data type VARCHAR2 and size 30 to the table Customer.
Change the data type of column pincode to VARCHAR2(10) in the table Customer.
Add one more column CustomerIncomeGroup of datatype VARCHAR2(10).
Insert few records with relevant information, in the table.
Drop the column CustomerIncomeGroup from table Customer.
Create table Department as per following Table Instance Chart.
Column Name
DeptID
DeptName
DeptLocation
Key Type
Primary
Nulls/Unique
NOT NULL
Fk Table
Fk Column
Datatype
NUMBER
VARCHAR2
VARCHAR2
Length
2
20
20
10
Cust_ID
EmpID
Primary
EmpName
EmpAdd
Phone
EmpSal
DeptID
Foreign
NOT NULL
number
6
varchar2
20
varchar2
30
varchar2
10
Department
Dept_ID
varchar2
2
number
9,2
Create table Employee1 as per the above Table Instance Chart but now use table level primary key addition
method.
Create table Employee2 as per the above Table Instance Chart without any constraint while table creation.
Add a PRIMARY KEY constraint to the table Employee2 using the EmpID column.
Add a FOREIGN KEY reference on the Employee2 table that will ensure that employee records with nonexistent departments are to be prohibited.
Confirm that constraints were added by querying Constraint_Name and Constraint from
USER_CONSTRAINTS relation.
8.
9.
Create an application to list all the contents of a database table using a data control object in visual basic.
Create an Application in Visual basic having Menu Bar tool baer and other controls to View, Add and Modify
records present in the Database Tables.
3.
Project
05
CBSE
05
Total Marks: 30
Marks
10
30
30
70
Websites:
www.sourceforge.net,
www.openrdf.org,
www.opensource.org,
www.linux.com, www.linuxindia.com, www.gnu.org, www.i18n.com
General concept, User interfaces (Front End), Underlying Database (Back End), Integration of
User Interface and Database;
More application areas of Databases:
Inventory control, Financial Accounting, Pay-Accounting System, Invoicing Management
System, Personal Management System / HRD System, Fees Management system, Result
Analysis System, Admission Management System, Income Tax Management System;
Advanced Program Development Methodology: System Development Life Cycle, Relational
Database Concept, Relational Database, Management System, Data Models (Entity
Relationship Model), Entity and Entity Set, Attributes (Single, Composite and Multi-Valued),
Relationship (One-to-One, One-to-Many and Many-to-Many), Entity Relationship Modeling
Conventions, Communicating with an RDBMS using SQL, Relational Database Management
System, SQL Statements, About programming language in SQL.
Data Dictionary, Data Warehousing, Data Mining, Meta Data;
Object Modeling: Introduction to object oriented modeling using Unified Modeling Language
(Concepts only).
Client Server Computing: Concept of Client Server Computing.
UNIT 2: PROGRAMMING: Visual Basic
Review of Class XI;
Programming Fundamentals
Modules: Modules in Visual Basic- Form Modules, Standard Modules, and Class Modules;
Procedures: Procedures (General, Event, Function, Property);
Control Structures:
Decision Structure IF, IF-THEN-ELSE, Select Case;
Looping Structure- Do WhileLoop, DoLoop While, ForNext, For EachNext;
Functions: Concept of Functions, Defining and Use of User Defined functions, function to
perform calculations, Parameterized Functions;
Library Functions (System Functions)
String Function: Space( ), Str( ), Right( ), Left( ), Mid( ), InStr( ), Len( ), Ltrim( ), Rtrim( ),
Ucase(), Lcase( ), String( );
10
11
Total Marks 30
1. Hands on experience
15
A problem should be given covering the following features
1. Start a Standard Exe Project and
it should contain MDI form with Menu Bar
and Tool Bar (with Images)
2. Table structure in the database for the application with Constraints (Primary Key,
Foreign Key, Check, and Unique).
3. A New Form to place an ADO component on it, for accessing data in table Stored
Procedure to perform transactions/ conditional update
4. Trigger (any)
5. Making executable files of the project.
2. Records
05
1. Create an Application using Visual Basic for Students Information System Having a
Student Table in Relational Database and a Student Data Form in Visual Basic to
enter data into the database.
2. Create an Application using Visual Basic for Criminals Information System Having a
Criminal Table in Relational Database and a Criminals Data Entry Form in Visual
Basic to enter data into the database. The Data entry form should contain form level
and Field level checks using procedures.
3. Create an Application using Visual Basic for Nursing Home Automation System
having Linked tables (for example: Patient, Employee, Bill) in Relational Database
and a required Data Entry Forms in Visual Basic to enter data into the database. The
Data entry form should contain form level and Field level checks using procedures.
Use of Bound Controls and Sub-Forms are to be encouraged in this application.
4. Create a database handling application for Student Expert System. Following
features are to be incorporated in the application:
a. Create following linked tables of Student in the Relational Database.
i. StudentMaster : containing general information about the student.
ii. StudentDetail: Table to store data having details such as Class, Section,
Marks and other relevant information.
iii. StudentFeeDetail: Should contain details like Financial Year, Class, Fee,
FeeStatus( such as Paid and UnPaid)
iv. Accounts: General Accounts table to store fee collection details such as
received from, date, chequeno and other relevant information.
b. The database should have Procedures to update data, Insert data and to
perform other database transactions.
c. Database triggers should also be defined wherever automatic data
modification is required.
d. Visual basic forms for data entry.
e. Procedures in Visual Basic to perform Database Transactions and Commit
changes made
f. Reporting tool to make the MIS reports, required to analyse data entry.
3. Project
05
The following case study is to be adopted for the development of project
A book publishing company B R Publishing Group is in existence since1950. They were
untouched with latest technological inventions. They are still using a traditional approach of
bookkeeping and accounts maintenance.
A company, Nova technology, introduced themselves as system integrator and developers
who can change existing working system into the latest concept of paper less office. They
wanted few details from the company about its working. The details are as under:
Name of the company is B R Publishing Group.
The company is having 20 employees. One Managing Director, Two Managers (Work
manager and Marketing Manager) and 17 employees who work as a team for book
publishing.
The company publishes book in different Indian languages and different topics.
Every book involves an Author and its detail.
The book is sold in the market at a variable discount options
12
05
13
Reference Books:
14