Syllabus Subject - Mis and Dbms
Syllabus Subject - Mis and Dbms
Syllabus Subject - Mis and Dbms
Unit I Meaning and use MIS: System view of Business, Process of MIS, Development of MIS within
the organization, Management Process, Information needs, System approach in Planning,
Organizing and Controlling MIS.
Unit II MIS Planning and System Design: Planning Implementation and Controlling of
Management Information System, Managerial Decision Making, Characteristics and
components of Decision support Systems.
System Design, Input/ Output design, Forms design.
Unit III Introduction: Purpose of Database System, Advantages and Disadvantages of DBMS, Basic
Database concepts, Instances and Schema, Data Independence, 3 Level architecture,
Database Administrator, Database Users.
Unit IV Data Modeling: Data models, Introduction of E-R Model, Entity Sets, Attributes and Keys,
Relationship (ER), Weak and Strong entity types, Entity Relationship Daigram, Design of
an E-R Database schema.
Unit – V Introduction to SQL: Basic queries in SQL, Data Definition Language, Data manipulation
Language, Data transition language, Data Control Language.
1
Class – Bcom IV (Hons) Sem Introduction to MIS
Unit – 1
Definition of MIS
A system that collects, process, stores the data and distributes information to help in decision making
for managerial function. It is also defined as the integrated user machine system for providing
information to supports the decision making operations & achieving organizational goal.
According to Jerome “A system that aids management in making, carrying out and controlling
decisions”.
According to Kelley, “A combination of human and computer based resources which results in
collection, storage, retrieval, communication and use of efficient management of operations and for
business planning”.
Right InformationTo the right person At the right placeAt the right time In the right formAt
the right cost
MIS
Management:- Management covers the planning, control and administration of the operations of a
concern.
Information:- Information, in MIS, means the processed data that helps the management in planning,
controlling and operations.
System:- data is processed into information with the help of a system.
Need of MIS
MIS helps the management at various levels and it is mean of communication where data are collected,
processed, stored and retrieved for making decisions regarding planning, operation and control of an
organization.
Characteristics of MIS
Management Oriented
Management Directed
Integrated System
Avoid Redundancy
Common Data Flow
Heavy Planning Element
Subsystem Concept
Common Database
Flexibility
Computerization
2
Components of MIS
Management information system refers to the data, hardware and the computer programs that are
used to develop information for managerial use.
People – it is the only living component of MIS which operates, controls the other
components of MIS.
Procedure – procedure explain people how to operate the computer hardware.
Data – Data provide interface between the user and computer.
Hardware – It is the machine part of the system which executes the instruction in
programs.
Programs – The program is the set of instruction written in logical order for performing
specific task related to information production.
Function of MIS
It is used to collect the data and present the information to the managers. MIS is the combination of
computer and procedures for providing information that manager’s use in making decision.
Collect Data – Data can be obtained from sources within organization and outside world.
Store & Process Data – After creation of the data, a database must be stored and process in
the form useful to manager’s data is generally stored to CD ROM or hard disk.
Present Information to Managers – After collection, storing and processing of data, the
next step is to present information to the managers.
Role of MIS
1 MIS ensure that appropriate and relevant data is collected from various sources, processed and is
sent further to the needy destination.
2 It fulfills the need of individual, workgroup and management.
3. MIS satisfies the diverse need of various systems like query, Analysis, Modeling, DSS.
4 MIS helps in strategic planning, management control, operational control and transaction
processing level.
5 MIS play important role in information generation, communication, problem identification and
decision making administration.
6 With good MIS support marketing, finance, production, and personal functions increases
efficiently.
7 MIS helps in streamlining of the operations.
8 MIS creates structured database and therefore saves the time.
9 MIS bring clarity in communication and understanding this help in bringing high degree of
professionalism.
10 MIS helps in systemization of business operation through tools and techniques of the computer,
which makes task simpler, accurate and faster.
Process of MIS
The process of MIS starts by knowing MIS objectives. The objectives of MIS should be compatible
with the company’s objectives.
Management comprises process or activities they are as follows:-
1. Recognition of a problem and an opportunity
2. Define problem or opportunity
3. Develop alternative course of action
3
4. Decision
5. Implementation of plan
6. Control performance against plan
For its smooth functioning and achieving of its predetermined goals through optimal utilization of
its resources like men, money, material and machines.
4
System View of Business
The systems approach provides an overall view of an organization’s activities whereby an
organization is separated into identifiable subsystems or departments. All such departments are
interdependent and perform specific tasks of work which contribute to the organization’s goals.
The simplest model of a business system consist of basic elements, they are input, processes, output
and feedback.
A systems view regards business operations as systems embedded within a larger environmental
setting. It’s an abstract way of thinking, but it has potential value to the manager. The systems view:
1. reduces complexity
2. requires good objectives
3. emphasizes working together
4. acknowledges interconnections
5. values feedback
Eg. Computer
Elements of computer are: - Monitor, CPU, Printer etc
Basic goals: Data Processing
Management Process
Management comprises process or activities via planning, organizing, controlling, directing and
initiating operation of an organization. For its smooth functioning and achieving of its
predetermined goals through optimal utilization of its resources like men, money, material and
machines.
System – System is set of components which interact with each other to accomplish a specific goal.
1 Human body and its subsystem could be nervous system, digestive system and cardiac system etc
2 Computer system and it has various subsystem like ALU, CU, Memory, Input unit and Output unit
etc.
Characteristics of system
Every system has a purpose.
Every system is made up of components like input process output, feedback and control etc.
System is made up of subsystem, whose goals are referred to as sub goals.
Goal of a system is more important than subsystem goal.
Systems whether open or closed have an element of control associated with them.
5
Types of System
There is several way of classifying systems that emphasizes the differences. Classification of system
is as follows-
Open & Closed Systems –An open system interfaces and interacts with other system. An open
system needs to receive feedback to change and continue to exist in its environment. Example – A
marketing system is an open system.
A closed system does not exchange the information with its environment. It does not have any
connection to the other system. Example – Research & development of organization, ICU dept. of
hospital, etc.
Physical & Abstract System – Physical system are tangible entities that may be static or dynamic
in operations. For example the physical parts of the computer center are the computers, desk, chair,
etc. that facilitate operation of the computer.
Abstract systems are conceptual and non physical entities. They may be formulas of relationship
among set of variables or models, software / program.
Information system
Information system are a set of people, procedure and resources that collects , transforms and
disseminates information in an organization
There are six building block of information system, is the input, output, technology, models,
database and control.
Types of Information System- there are two types of information system.
1 Operation Information system – it process the data generated by and used in business
operation. It is of two types:-
Transaction processing system
Office Automation system
2 Management information System – MIS provide information to support management decision
making.
Decision Support System
Executive information System
6
System approach in planning, organizing & Controlling MIS
System Approach in Planning – The important function of management is planning. Planning
means deciding in advance, what has to be done, who has to do it, when is to be done and how it is
to be done. The planning process consist of two steps –
1) Developing the strategic
2) Formulating the steps, timing and cost, required to achieve the strategy.
8
Unit II
General Business Planning
Starting point for MIS planning is general business planning. No MIS department can decide what
they should do or how they should do it without the groundwork provided by objectives and plans
for the company they are supporting.
General Business Item Importance
Statement of mission or purpose Clearly defines the business of the firms.
Objectives set goals for the company in all key performance
areas
Strategic plans Provide general guidance on how to get to the long-
Range objective
Operating plans provide detailed guidance on how to get to the short-
term objectives
Statement of Objectives
Mission and Marketing
purpose Innovation
Human
organization
Financial resources
Physical resources
Productivity
Social
responsibility
Profit requirements
Strategic Operatin
Plans g Plans
9
2. A breakdown of the work to be done (as detailed as practical) is required. Also estimates of
how long each piece will take are needed. Documentation, testing, and maintenance efforts
should be included.
3. A list of dependencies on outside groups with target dates for “delivery” of services or
equipment is required.
4. A list of outside group that depend on this project with target dates for delivery is required.
5. A list of interdependencies of various pieces within this project with dates of need/delivery
is required.
6. The skills needed to complete the project should be listed. Eventually, the people who work
on the project must match this list exactly.
7. Other resources needed to complete the project must be identified (e.g., space, computer
hardware, and telephones). Dates these items are needed must be specified.
8. A budget covering salaries, rent, capital expenditure, and so on must be part of the plan.
9. A statement of the reporting and tracking system to be used must be included.
10. A schedule of activities reflecting all the above work and interdependencies is required.
11. A backup plan if any piece of the plan fails must be supplied.
Planning Techniques
Most of the techniques and tools have been borrowed from engineering project management theory
and practice, where they originated.
Work Breakdown structure
A fundamental concept in project management is the work breakdown structure, which starts with
the total end result desired and terminates with the individual detailed tasks. The project
breakdown structure is a natural decomposition of the project end result. It is created in a level-by-
level breakdown from –
1. System to subsystem
2. Subsystem to task
3. Task to subtask
4. Subtask to work package
Sequence Planning
The relationships among tasks must be set forth by a chronological ordering, starting with the
terminal task of the project and working backward. As each task is set down, it is necessary to
determine what immediately preceding tasks must first be completed. When a network of events
has been established, estimates of the time required to complete each event, based upon the work
package information, may be entered. There are a number of time paths through a network that
run from the starting event to the terminal event. The longest is called the critical path.
Master Program Schedule
The master program schedule (MPS) is a management document giving the calendar dates for
milestones (major tasks and critical path minors tasks), thus providing the control points for
management review. The MPS may be in the form of a Gantt chart for small MIS projects or in
machine (computer) printout for large projects whose networks have been programmed for
computer analysis and reporting.
Budgeting
The establishment of cost and resource targets for a planned series of periods in advance is project
budgeting. Although cost constraints may be applied in a top-down fashion during planning, such
constraints must be reconciled with a bottom-up approach through the work breakdown structure.
Reporting and controlling
10
Control of the project means control of performance/cost/time (P/C/T). These elements, P/C/T,
must be reported in a way that ties them all together, otherwise the report is meaningless.
Reporting Techniques
The reporting system for a project is its own MIS. Some methods of project reporting are
1. Integrated P/C/T charts as shown in Figure 6-4
2. Financial schedules and variance reports.
3. Time-scaled network plans and computerized based on them.
4. Problem analysis and trend charts
5. Project control room and computerized room and computerized graphic systems.
Implementation of MIS
There are four basic methods for implementing the MIS once the design has been completed. This
are–
1. Cut off the old system and install the new. This produces a time gap during which no system.
Small is n operation. It is practical only for small companies or small systems where
installation required one or two dates. An exception to this would be the installation of a
larger system during a plant’s vacation shut down or some other period of inactivity.
2. Cut over by segments. This method is also referred to as “phasing in” the new system. Small
parts or subsystems are substituted for the old. If this method is possible, some careful
questions should be asked about the design of the new system. Is it really just an
automation of isolated groups of clerical activities? Generally, new systems are not
substitutable piece by piece for previous non systems. However, in the case of upgrading old
system, this may be a very desirable method.
3. Operate in parallel and cut over. The new system is installed and operated in parallel with
the current system until it has been checked out; then the current system is cut out. This
method is expensive because of personnel and related costs. However, it is required in
certain essential systems, such as payroll or customer billing. Its big advantage is that the
system is fairly well debugged when it becomes the essential information system of the
company.
13
Process and Modeling in Decision Making
There are two basic models in decision making:
Rational models
Normative model
Decision support systems
Decision support systems are interactive software-based systems intended to help managers in
decision making by accessing large volume of information generated from various related
information systems involved in organizational business processes, like, office automation system,
transaction processing system etc.
DSS uses the summary information, exceptions, patterns and trends using the analytical models.
Decision Support System helps in decision making but does not always give a decision itself. The
decision makers compile useful information from raw data, documents, personal knowledge,
and/or business models to identify and solve problems and make decisions.
Programmed and Non-programmed Decisions
There are two types of decisions - programmed and non-programmed decisions.
14
Programmed decisions are basically automated processes, general routine work, where:
These decisions have been taken several times
These decisions follow some guidelines or rules
Attributes of a DSS
Adaptability and flexibility
High level of Interactivity
Ease of use
Efficiency and effectiveness
Complete control by decision-makers.
Ease of development
Extendibility
Support for modeling and analysis
Support for data access
Standalone, integrated and Web-based
Characteristics of a DSS
Support for decision makers in semi structured and unstructured problems.
Support for managers at various managerial levels, ranging from top executive to line
managers.
Support for individuals and groups. Less structured problems often requires the
involvement of several individuals from different departments and organization level.
Support for interdependent or sequential decisions.
Support for intelligence, design, choice, and implementation.
Support for variety of decision processes and styles
DSSs are adaptive over time.
Benefits of DSS
Improves efficiency and speed of decision making activities
Increases the control, competitiveness and capability of futuristic decision making of the
organization
Facilitates interpersonal communication
Encourages learning or training
Since it is mostly used in non-programmed decisions, it reveals new approaches and sets up
new evidences for an unusual decision
Helps automate managerial processes
Components of a DSS
Following are the components of the Decision Support System:
Database Management System (DBMS) : To solve a problem the necessary data may come from
internal or external database.In an organization,internal data are generated by a system such as
TPS and MIS.External data come from a variety of sources such as newspapers,online data
services,databases (financial, marketing,human resources).
Model Management system: It stores and accesses models that managers use to make decisions.
Such models are used for designing manufacturing facility, analyzing the financial health of an
organization. Forecasting demand of a product or service etc.
Support Tools: Support tools like online help; pull down menus, user interfaces, graphical analysis,
error correction mechanism, facilitates the user interactions with the system.
Classification of DSS
There are several ways to classify DSS. Hoi Apple and Whinstone classify DSS in following:
Text Oriented DSS
15
Database Oriented DSS
Spreadsheet Oriented DSS
Solver Oriented DSS
Rules Oriented DSS
Rules Oriented DSS
Compound DSS
Design
System design:-
A system can be most simply defined as a group of interrelated or interacting elements forming a
unified whole.
Basic components of a system:
Input
Processing
Output
The main objective of general system design:
Specify the logical design
Support business activities
Ensure that system meets user requirements
Easy to use
Provide detailed software development specification
Conform to design standards
Input/output Design
Input Design
The data base is the data that must be obtained and stored for later retrieval for managerial
decision making. The most common cause of error during the data processing is inaccurate input.
The inaccurate input is entered by data entry operators but it can be controlled by input design.
Objectives of input design:
Avoiding errors in data
Avoiding delay
Avoiding duplication of data
Avoiding extra steps
Controlling the amount of input required
Keeping the process simple
Activities involved in input design:
Collection of data
Conversion of the input data to computer acceptable form
Checking the conversion
Transmitting the data to computer
Checking the input data
Correct the error if error occur
Output design:-
The most important source of information is the output, efficient, intelligible output design should
improve the system’s relationship with the user and help in decision making.
Objectives of output design:-
Carry information about past activities, current affairs or projection of the future
Mark important events
Take an action
16
Confirm an action
Principles of output design:-
Too many details should be avoided
Design should be used from top to bottom approach
All pages must have heading and page number
All column must be labeled
Abbreviations should be avoided
Types of output
Report
Document
Message
Form design
Forms provide information and are a request for action.
Types of forms:
Hot forms
Continuous strip/fanfold forms
17
UNIT-III
Introduction:-
There are a number of characteristics to distinguish the database approach from the traditional
approaches of programming with files.
In traditional file processing, each user defines and implements the files needed for a specific application
as part of programming the application.
In database approach, a single repository of data is maintained that is defined once and then is accessed
by various users.
The main characteristics of the database approach versus the file processing approach are as
follows:-
Self-describing nature of a database system
Insulation between programs and data, and data abstraction
Multiple views of the data
Sharing of data and multiuser transaction processing
The major activities, operations & services provided by DBMS are as follows –
1) Transaction Management
2) Concurrency Control
3) Recovery Management
4) Security Management
5) Language Interface
6) Storage Management
7) Data Catalog Management.
Advantages of DBMS –
1) Database reduced the data redundancy to a large extent.
2) Database can control inconsistency to a large extent.
3) Database facilitate sharing of data.
4) Database enforces standards.
5) Database can ensure data security & privacy.
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
18
6) Integrity can be maintained through database.
7) Conflicting requirement can be balance through database
Disadvantages of DBMS
1. Cost of Hardware and Software
2. Cost of data conversion
3. Cost of staff training
4. Appointing technical staff
5. Data damage
Applications of DBMS – There are different applications of Database Management System as its
competitive era the DBMS is used in following areas.
1) Banking
2) Airlines
3) Organization
4) Universities,
5) Credit Card Transactions
6) Tele Communications
7) Finance
8) Sales
9) Human Resources
10) Manufacturing etc.
Database:-
A collection of data designed to be used by different people is called a database. It is collection of
interrelated data stored together with controlled redundancy to serve one or more applications in an
optimal fashion. A database system is basically a computer based record keeping system. The collection
of data, usually referred to as the database, contains information about one particular enterprise.
Characteristics of data – The data stored in database should have this characteristics –
1) Shared 5) Consistency
2) Persistence 6) Non-redundancy
3) Validity / integrity 7) Data independence.
4) Security
In above example collection of variable e1 is called as instance, whereas struct Emp is schema.
Types:
1. Physical schema
2. Logical schema
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
19
Data independence: -
The ability to modify a schema definition at a level without affecting the next higher level is called
independence.
1. Physical data independence: - it is possible to modify the physical schema without affecting the
application program. Of course the application program is called physical schema
2. Logical data independence: - for the database alteration sometimes it is necessary to modify the
logical schema. It is possible to modify the logical schema without affecting application program.
This modification to the logical schema result in logical independence.
3 level architecture:
1. Physical level : - this is the lowest level of architecture . it describe the actual storage of data. The
complex low level data structure are detailed in this level.
2. Logical level : - Next higher level of data abstraction is logical level. It describe the data stored in
the database. It also describes the relationship or associating among those data.
3. View level: - this is the highest level. It describe the many view for the same database. The
complexity if any that exist in the logical level can be removed here. This complexity may be due
to large size of the database.
Database Administrator –
The person who has central control over the system is called database Administrator. The function of
DBA include –
1) Schema definition 4) Granting of Authorization for data
2) Storage structure and access method access.
definition 5) Integrity – Constraints specifications
3) Schema and physical organization, 6) Routine maintenance
modification
Database Users –
A primary goal of database system is to provide an environment for retrieving information from and
storing new information into the database. There are four different types of database users, differentiated
by the way that they expect to interact with the system –
1) Application programmer
2) Sophisticated users
3) Specialized users
4) Naïve Users
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
20
UNIT-IV
Data Models – Data models are different models that can be used to design a database. Design a
database includes describing data, data relationship, data semantics and consistency constraints.
Various data models are as follows –
Object based data Model – Object based logical model are used in describing data at a logical &
view levels. They are characterized that they provide fairly flexible structure in capabilities & allow
data constraints to be specified explicitly. This model emphasis on the fact that everything is a object
having a setoff attributes. There are different data models that utilizes this characteristics –
1) The entity relationship model 3) The semantic data model
2) The object oriented model 4) The functional data model
1) The entity relationship model – Entity relationship model moves around three things–
a) Entity, b) Relationship & c) Attribute.
ER-Model is based on perception that everything that have physical properties that is entity,
every two entities can be distinguish from other. Relationship exists between these entities.
2) The object oriented model – Object Oriented Model as name indicates takes everything as
object is based on collection of object. Object contains values stored in instance variable
within the object. An object also contained bodies of code that operate on the object. These
bodies of code are called method.
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
21
Record based logical model are used in describing data at the logical and view level. In contrast to
object based data model they are used both to specify the overall logical structure of the database
and to provide a higher level description of implementation. Record based model are so named
because the database is structured in fixed format records of several type.
The three most widely used record based data models are –
1) Relational Model
2) Network Model
3) Hierarchical Model
1) Relational Model – This is most popular among the various record based data model. This
model uses a collection of table to represent both data and the relationship among those
data.
2) Network Model – Data in network model are represented by collection of records and
relationship among the data are represented by links (Pointer). A Pointer is a physical
address which identifies where the next record can be found on the disk.
3) Hierarchical Model – It is very similar to network model. In this data model records are
organized as collection of tree rather than arbitrary graphs.
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
22
Physical Data Model – This model is used to describe data at the lowest level that is to describe to
behavior of data at the disk level i.e. the way of data and the data relationship are maintain by storing
them on the disk. This deciding the way the DBMS is going to used secondary storage devices for
storing and accessing database.
The widely used data models are –
1) Unifying model
2) Frame memory model
Entity Relationship Data Model was introduced in a key article by Chen (1976) in which he describe
the main construct of the ER-Model. – Entities & relationships and their associates attribute. An
Entity Relationship Model is a detailed logical representation of the Data for an organization or a
business area. An Entity Relationship Model is normally expressed as an Entity Relationship
Diagram.
Components of ER-Model:
1) Entity – An Entityis a person, place, object, event or concept in the real world i.e.
distinguishable from all other objects.
2) Entity Sets – An Entity set of Entities of the same type that share the same properties or
attributes.
a. Strong Entities – A strong entity set is one that exists independent of other entity
sets. A strong entity set that has primary key.
b. Weak Entities – A weak entity is an entity whose existence depends on some other
entities. A strong entity set that has no primary key.
3) Attributes– An entity can be simply defined as property or characteristics of an entity.
a. Simple Attribute – Simple attributes is an attributes that cannot be broken into
smaller subparts.
b. Composite Attribute – Composite Attribute is an attributes that can be broken into
smaller subparts.
c. Single Valued Attribute – An attribute is said to be single valued attribute if it can
have only one value.
d. Multi Value Attribute - An attribute is said to be single valued attribute if it can have
only more than one value.
e. Stored Attribute – An attribute which is already present as an attribute for an entity
is a stored attribute.
f. Derived Attribute - An attribute which is derived from stored attribute as it is not
present as an attribute for an entity is a derived attribute.
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
23
g. Null Attribute – An attribute that can have null value is a null attribute.
Keys:
Keys are attributes or set of attributes used to distinguish one entity from another in an entity set.
1) Super Key: A super key is set of one or more attributes that can uniquely identify an entity in
an entity set.
2) Candidate Key: All the attributes or set of attribute, when can uniquely identify an entity are
candidate keys. Only those key can be candidate key whose no proper subset is a superkey.
3) Primary Key: The primary key is the term used for the candidates key that is chosen by the
database designer as the principal means of identifying an entity.
4) Alternate Keys: The alternate key is term used for the candidate keys that are remaining
after the primary key has be choosen by database designer.
5) Foreign Key: A foreign key is an attribute or set of attribute in a relation of database that
serve as the primary key of another relation in the same database.
6) Composite Key: A primary key that consists of more than one attribute is called composite
key.
Employee
EmpID Name DeptName Salary
1001 Ravindra Agrawal Finance 20000
1002 Khelan Nagar Production 18000
1003 Himanshu Kulkarni Personnel 25000
1004 Amol Maheshwari Marketing 30000
1005 Ritesh Singh Chouhan Advertisement 22000
Relationship Sets:
A relationship set is a set of relationships of the same type. For example in a bank, any customer can
have any types of loan (Business loan, Personal loan, Home loan) given by the bank. So all the
relationship between all the customers and the loan taken by them are together called as
relationship set.
Degree of Relationship:
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
24
The degree of a relationship is the number of entity types that participate in that relationship. The
three most common relationships in E-R-Model are Unary (degree 1), Binary (degree 2) and Ternary
(degree 3).
1) Unary Relationship: A unary relationship is a relationship between the instance of a single
entity type.
PERSON Is Married
to
ONE-TO-ONE
ONE-TO-ONE
ONE-TO-MANY
MANY-TO-MANY
3) Ternay Relationship: A ternary relationship is a simultaneous relationship among the
instances of three entity types.
COURSE
STUDENT COURSE
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
25
E-R Diagram:
The basic E-R model first introduced during mid 1970s. It has been suitable for modeling most
common business problems and has enjoyed widespread use.
The overall logical structure of a database can be expressed graphically by an E-R diagram.
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
26
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
27
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
28
UNIT-V
There are many popular RDBMS available to work. They are as follows:-
MySQL
MS SQL Server
ORACLE
MS ACCESS
SQL:-
SQL (Structured Query Language) is a database sublanguage for querying and modifying relational
databases. It was developed by IBM Research in the mid 70's and standardized by ANSI in 1986.
SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate
with a database.
SQL statements are used to perform tasks such as update data on a database, or retrieve data from a
database. Some common relational database management systems that use SQL are: Oracle, Sybase,
Microsoft SQL Server, Access, Ingres, etc.
Characteristics of SQL:-
Allows users to describe the data.
Allows users to define the data in database and manipulate that data.
Allows embedding within other languages using SQL modules, libraries & pre-compilers.
Allows users to create and drop databases and tables.
Allows users to create view, stored procedure, functions in a database.
Allows users to set permissions on tables, procedures, and views
SQL Process:
SQL Functions:-
SQL has many built-in functions for performing calculations on data.
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
29
SQL Aggregate Functions
SQL aggregate functions return a single value, calculated from values in a column.
The Useful aggregate functions are as follows:
AVG() - Returns the average value
COUNT() - Returns the number of rows
FIRST() - Returns the first value
LAST() - Returns the last value
MAX() - Returns the largest value
MIN() - Returns the smallest value
SUM() - Returns the sum
Components of SQL:-
SQL commands are instructions used to communicate with the database to perform specific task that
work with data. SQL commands can be used not only for searching the database but also to perform
various other functions like, for example, you can create tables, add data to tables, or modify data,
drop the table, set permissions for users. SQL commands are grouped into four major categories
depending on their functionality:
Data Definition Language (DDL) - These SQL commands are used for creating, modifying,
and dropping the structure of database objects. The commands are CREATE, ALTER, DROP,
RENAME, and TRUNCATE.
Data Manipulation Language (DML) - These SQL commands are used for storing,
retrieving, modifying, and deleting data. These commands are SELECT, INSERT, UPDATE, and
DELETE.
Transaction Control Language (TCL) - These SQL commands are used for managing
changes affecting the data. These commands are COMMIT, ROLLBACK, and SAVEPOINT.
Data Control Language (DCL) - These SQL commands are used for providing security to
database objects. These commands are GRANT and REVOKE.
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
30
Some of the Most Important SQL Commands with SQL statement
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
31
BETWEEN Between an inclusive range
IN
IN operator is used when you know the exact value you want to return for at least one of the
columns
Syntax:-
SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
32
SQL CREATE TABLE Statement
The CREATE TABLE statement is used to create a table in a database.
Tables are organized into rows and columns; and each table must have a name.
CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
column_name3 data_type(size),
....
);
The DROP TABLE Statement
The DROP TABLE statement is used to delete a table.
DROP TABLE table_name;
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
33
The COMMIT Command:
The COMMIT command is the transactional command used to save changes invoked by a transaction
to the database.
The COMMIT command saves all transactions to the database since the last COMMIT or ROLLBACK
command.
Syntax:-
COMMIT;
The ROLLBACK Command:
The ROLLBACK command is the transactional command used to undo transactions that have not
already been saved to the database.
The ROLLBACK command can only be used to undo transactions since the last COMMIT or
ROLLBACK command was issued.
SQL Operator
An operator is a reserved word or a character used primarily in an SQL statement's WHERE clause to
perform operation(s), such as comparisons and arithmetic operations.
Operators are used to specify conditions in an SQL statement and to serve as conjunctions for
multiple conditions in a statement.
Arithmetic operators
Comparison operators
Logical operators
Operators used to negate conditions
Set operators:-
SQL support few of set operators on the SQL tables. They are as follows:-
Union
Intersect
Minus
45, Anurag Nagar, Behind Press Complex, Indore (M.P.) Ph.: 4262100, www.rccmindore.com
34