Professional Documents
Culture Documents
CHAPTER 3
MANAGEMENT SYSTEM
Namma Kalvi
9. Which is the MySQL instance responsible for
www.nammakalvi.org data processing?
a) MySQL Client b) MySQL Server
PART II
c) SQL d) Server Daemon Program
2 SURYA
www.nammakalvi.org
XII Std - Computer Application Chapter - 3 Introduction to Database Management System
It is defined as the number of items that must be Hierarchical Database Model
included in a relationship.ie) number of entities In this model each record has information in par-
in one set mapped with the number of entities of ent/child relationship like a tree structure.
another set via the relationship. The collection of records was called as record
Three classifications in Cardinality are one-to-one, types, which are equivalent to tables in relational
one-to-many and Many-to-Many. model.
The individual records are equal to rows.
4. List any 5 privileges available in MySQL for
The famous Hierarchical database model was
the User.
IMS (Information Management System), IBM’s
Privileges Action Performed (If Granted) first DBMS.
Select_priv User can select rows from
database tables. Advantages:
Insert_priv User can insert rows into database Less redundant data
tables. Efficient search
Update_priv User can update rows of database Data integrity
tables. Security
Delete_priv User can delete rows of database
tables. Limitations:
Create_priv User can create new tables in Complex to implement and difficulty in handling
database Many to many relationships.
Relational model:
PART IVI
Oracle and DB2 are few commercial relational
models in use.
Explain in Detail
Relational model is defined with two terminologies
Instance and Schema.
1. Discuss on various database models •• Instance – A table consisting of rows and
available in DBMS. columns
The major database models are listed below: •• Schema – Specifies the structure including
Hierarchical Database Model name and type of each column.
Network model A relation (table) consists of unique attributes
Relational model (columns) and tuples (rows).
Object-oriented database model
SURYA 3
www.nammakalvi.org
Chapter - 3 Introduction to Database Management System XII Std - Computer Application
Object-oriented database model Entity Instance
This model incorporates the combination of •• Instances are the values for the entity if we
Object Oriented Programming(OOP’s) concepts consider animals as the entity their instances will
and database technologies. be dog, cat, cow… Etc.
Practically, this model serves as the base of •• So an Entity Instance denotes the category val-
Relational model. ues for the given entity.
Object oriented model uses small, reusable
software known as Objects. Attributes:
These are stored in object oriented database. •• An attribute is the information about that entity
This model efficiently manages large number of and it will describe, quantify, classify, and specify
different data types. an entity.
Moreover complex behaviors are handled •• An attribute will always have a single value, that
efficiently using OOP’s concepts. value can be a number or character or string.
4 SURYA
XII Std - Computer Application Chapter - 3 Introduction to Database Management System
into simple attributes without change in the MySQL Workbench (DesktopApplication)
meaning of that attribute. It is a database tool used by developers and
•• For Example: In the above diagram the em- DBA’s mainly for visualization.
ployee is the entity with the composite attri-
bute Name which are sub-divided into two This toolhelps in data modeling, development
simple attributes first and last name. of SQL,server configuration and backup for
MySQLin a better way.
4. Single Valued Attributes: Its basic release version is 5.0and is now in 8.0
•• A single valued attribute contains only one supporting all OperatingSystems.
value for the attribute and they don’t have The SQL editor of this tool is veryflexible and
multiple numbers of values. comfortable in dealing multipleresults set.
•• For Example: Age- It is a single value for a
person as we cannot give n number of ages HeidiSQL (Desktop Application)
for a single person; therefore it is a single This open source tools helps in theadministration
valued attribute. of better database systems.
It supports GUI (Graphical User Interface)
5. Multi Valued Attributes: features for monitoring server host, servercon-
•• A multi valued attribute has more than one nection, Databases, Tables, Views,Triggers and
value for that particular attribute. Events.
•• For Example: Degree - A person can hold
5. Explain in detail on Sub Queries with
n number of degrees so it is a multi-valued
suitable examples.
attribute.
The SQL query is written within amain Query.
4. Write a note on open source software tools This is called as Nested Inner/SubQuery.
available in MySQL Administration. The sub query is executed firstand the results
MySQL is open source software that allows of sub query are used as thecondition for main
managing relational databases. query.
It also provides the flexibility of changing the The sub querymust follow the below rules:
source code as per the needs. 1. Subqueries are always written withinthe
It runs on multiple platforms like Windows, Linux parentheses.
and is scalable, reliable and fast. 2. Always place the Subquery on theright side of
the comparison operator.
PHPMYADMIN (Web Admin) 3. ORDER BY clause is not used insub query,
This administrative tool of MySQL is aweb since Subqueries cannotmanipulate the results
application written in PHP. They areused
internally.
predominantly in web hosting.
Themain feature is providing web interface, Example: (Consider the Employee tablewith the
importing data from CSV and exportingdata to fields EmpID, Name, Age andSalary.)
various formats.
SELECT * from Employeewhere EmpID IN (SELECT
It generates livecharts for monitoring MySQL
EmpID fromEmployee WHERE Salary < 20000);
serveractivities like connections, processes
andmemory usage. It also helps in making
First, the inner query is executed. Then outer query
thecomplex queries easier. will be executed.
SURYA 5
www.nammakalvi.org
Chapter - 3 Introduction to Database Management System XII Std - Computer Application
10. ____describes a unique characteristic of
ADDITIONAL QUESTIONS AND ANSWERS: an entity.
a) Key Attribute
PART AI b) Simple Attributes
c) Composite Attributes
Choose the correct answers: d) Single Valued Attribute
1. Which of the following is a not a database? 11. __can be subdivided into simple attributes
a) Oracle b) PostgreSQL without change in the meaning of that
c) SQLite d) None of these attribute.
a) Key Attribute
2. DBMS provides to ___ data b) Simple Attributes
a) create b) retrieve c) Composite Attributes
c) update d) all of the above d) Single Valued Attribute
3. Which of the following are the limitations 12. A _____contains only one value for the
of file system attribute and they don’t have multiple
a) Data Duplication b) High Maintenance numbers of values.
c) Security d) All of the above a) Key Attribute
b) Simple Attributes
4. ___is defined as the system’s ability to
c) Composite Attributes
recover all committed transactions during
d) Single Valued Attribute
the failure of storage or the system.
a) Durability b) Consistency 13. The ______cannot be separated it will be
c) Concurrency d) All of the above having a single value for their entity.
a) Key Attribute
5. Which of the following is a commercial
b) Simple Attributes
relational models in use.
c) Composite Attributes
a) Oracle b) DB2
d) Single Valued Attribute
c) PostgreSQL d) Both a and b
14. A______has more than one value for that
6. A ____is a “copy” of a primary key
particular attribute.
a) Candidate Key b) Super Key
a) Multi valued attribute
c) Foreign Key d) Composite Key
b) Simple Attributes
7. A key with more than one attribute to c) Composite Attributes
identify rows uniquely in a table is called d) Single Valued Attribute
____
15. ______ is most popular for Web
a) Candidate Key b) Super Key
Administration.
c) Foreign Key d) Composite Key
a) PhpMyAdmin b) MySQL Workbench
8. An____ can be anything a real-world object c) HeidiSQL d) All of the above
or animation
a) Data b) Entity ANSWERS FOR OBJECTIVES
c) Instance d) Relationship 1. d 2. d 3. d 4. a 5. d
9. _____are the values for the entity 6. c 7. d 8. b 9. c 10. a
a) Data b) Entity 11. c 12. d 13. b 14. a 15. a
c) Instance d) Relationship
6 SURYA
XII Std - Computer Application Chapter - 3 Introduction to Database Management System
11. ANSI - American National Standards
Fill in the blanks: Institute.
12. ISO - International Organization For
1. ____ is known a predecessor of database system Standardization.
Ans: File system 13. DDL - Data Definition Language.
2. MySQL is a database management system founded 14. DML - Data Manipulation Language.
by ____ Ans: Monty Widenius 15. DQL - Data Query Language.
16. TCL - Transaction Control Language.
3. ____ who takes care of configuration, installation, 17. DCL - Data Control Language.
performance, security and data backup.
Ans: Database Administrators
Syntax & Example (Basic Sql Commands)
4. _____ is a web application written in PHP
Ans: 1) CREATE DATABASE:
Syntax: CREATE database databasename;
5. ____tool of MySQL is a web application written in
Example: mysql> create database studentDB;
PHP. Ans: PHPMYADMIN
7. The ____of this tool is very flexible and comfortable 3) SELECT DATABASE
in dealing multiple results set. Syntax: USE databasename;
Ans: SQL editor Example: mysql> USE studentDB;
8.
____ is a program or process of copying table
contents into a file for future reference 4) INSERT RECORD
Ans: Backup Syntax 1: INSERT INTO tablename (column1,
column 2, column 3) Values(value 1, value 2,
9. SQL query is written within a main Query is called value 3)
as_____ Ans: Sub Query Syntax 2: INSERT INTO tablename
Values(value 1, value2, value3)
10. An attribute is the information about that _____
Ans: Entity
5) DELETING RECORD :
Syntax 1; DELETE for tablename WHERE
Abbrevation
Columnname =” value “
1. DBMS - Database Management System. Syntax 2; DELETE for tablename
2. RDBMS - Relation Database Management
System. 6) MODIFYING RECORD:
3. OSBMS - Objective Database Management Syntax : UPDATE tablename SET column 1=
System. “newvalue” where column 2= value2
4. ACID - Automicity, Consistency, I solation,
And Durability. 7) SORTING RECORD:
5. IMS - Information Management S ystem. Syntax 1 SELECT * FROM TABLENAME ORDER
6. IDS - Integrated Data Store. BY COLUMNNAME;
7. OOP’S - Object Oriented Programming. Syntax 2 select * from tablename ORDER BY
8. SQL - Structure Query Language. columnname DESC;
9. ER - Entity Relationship.
10. DBA - Database Administration.
SURYA 7
www.nammakalvi.org
Chapter - 3 Introduction to Database Management System XII Std - Computer Application
8. Write the types of SQL commands. 2. List few commonly used databases.
Data Definition Language (DDL) DB2
Data Manipulation Language (DML) MySQL
Data Query Language (DQL) Oracle
Transaction Control Language (TCL) PostgreSQL
Data Control Language (DCL) SQLite
SQL Server
9. What is the purpose of JOIN Clause?
Sybase
When we have to select data from more than 2
tables SQL JOIN clause is used. 3. What are the roles of Database admini
Retrieves data from two or more tables, by strator?
referencing columns in the tables that hold
Database Administrators (DBA’s) who takes
identical values care of configuration, installation, performance,
security and data backup.
10. What is XAMPP?
DBA’s possess the skills on database design,
XAMPP is a free and open source package.
database queries, RDMS, SQL and networking.
It was developed by Apache.
The primary task is the creation of new user and
It is a software platform for MySQL, PHP and Peri
providing them with access rights.
programming languages.
4. What are the major parts to form a
11. What is meant by the Designing of
database?
databases?
The three major parts that forms a database are
The process of creating, implementing and
Tables, Queries and Views.
maintaining the enterprise data in a system is
Tables - similar to an excel sheet, containing
known as Designing of databases.
multiple rows and columns. Where each row is a
record and each column is an attribute.
PART CI Queries – It is a question with multiple condi-
tions posted to the database. The records in the
Explain in Brief Answer database that satisfies the passed conditions are
retrieved.
1. What are attributes in database? Views – A set of stored queries.
Write short note on Columns (attributes) in a
5. Write a note on MySQL.
table.
MySQL is a database management system
The table consists of several rows and columns.
founded by Monty Widenius
Table can be divided into smaller parts, in terms
MySQL is open source software that allows man-
of columns.
aging relational databases.
Each column is known as attributes.
It also provides the flexibility of changing the
source code as per the needs.
Example:
It runs on multiple platforms like Windows, Linux
•• In the Employee table four attributes are avail-
and is scalable, reliable and fast.
able namely Id, Name, Age and Salary. The
attribute is defined in a table to hold values of 6. Write a short note on Row (or Record or
same type. tuple)
•• This is known as Attribute Domain. A single entry in a table is called as Row or
•• In the Employee table, the Name field will hold Record or Tuple.
only characters not the numbers in it.
SURYA 9
www.nammakalvi.org
Chapter - 3 Introduction to Database Management System XII Std - Computer Application
Set of related data’s are represented in a row or A foreign key is a “copy” of a primary keythat
tuple. has been exported from one relation into an-
The horizontal entity in a table is known as other to represent the existence of a rela-
Record or row. tionship between them.
A foreign key is a copy of the whole of its
7. What are the major the functions performed
parent primary key i.e if the primary key is
using SQL?
composite, then so is the foreign key.
Few major functions performed using SQL are
Foreign key values do not (usually) have to
listed below:
be unique.
Executes queries against a database.
Foreign keys can also be null.
Retrieves data from database.
A composite foreign key cannot have some
Inserts and updates records in a database
attribute(s) null and others non-null.
Delete records from database.
Creates new databases and new tables in a
(iii) Candidate Key
database.
Each super key is called a candidate key.
A candidate key is selected from the set of
PART DI
Super Key.
While selecting candidate key, redundant at-
Explain in detail
tributes should not be taken.
1. Explain the following The candidate key is also known as minimal
(i) Primary Key (ii) Foreign Key (iii) Candidate Key super keys.
(iv) Super Key (v) Composite key
(iv) Super Key
(i) Primary Key An attribute or group of attributes, which is
This key of relational table identifies each re- sufficient to distinguish every tuple in the
cord in the table in a unique way. relation from every other one is known as
A primary key which is a combination of Super Key.
more than one attribute is called a compos-
ite primary key. (v) Composite Key (Compound Key)
The candidate key that is chosen to perform A key with more than one attribute to identify
the identification task is called the primary rows uniquely in a table is called Composite
key key.
This is also known as Compound Key.
(ii) Foreign Key
10 SURYA
XII Std - Computer Application Chapter - 3 Introduction to Database Management System
Student
www.nammakalvi.org
SURYA 11