IMPORTANT QUESTIONS OF Data Base Management System MGU
aljufmuhammad
192 views
49 slides
May 30, 2024
Slide 1 of 49
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
About This Presentation
BCA MGU important questions and answers of DBMS
Size: 2.03 MB
Language: en
Added: May 30, 2024
Slides: 49 pages
Slide Content
www.edulearninghub.com
What is data, database, dbms ?
www.edulearninghub.com
Data is everything that is not program code.
A database is a collection of information that is
organized so that it can easily be accessed, managed, and
updated. In one view, databases can be classified
according to types of content:
That is a structured set of data held in a computer,
especially one that is accessible in various ways.
www.edulearninghub.com
The database management system (DBMS), is a computer
software program that is designed as the means of
managing all databases that are currently installed on a
system hard drive or network.
Different types of database management systems exist
www.edulearninghub.com
www.edulearninghub.com
What is meta-data ?
The database definition is also stored in the
database in the form of database catalog or
dictionary , it is called meta-data.
The DBMS software such as Oracle, My SQL, SQL
Server, MS Access are used to manipulate the
data stored.
www.edulearninghub.com
What are the functionality or characteristics of
DBMS?
www.edulearninghub.com
Slide 1-9
Typical Functionality of DBMS
•Concurrent Processing and Sharing by a set of users
and programs – yet, keeping all data valid and
consistent
www.edulearninghub.com
Slide 1-10
Main Characteristics of the Database Approach
•1) Self-describing nature of a database system:
A DBMS catalog stores the description of the
database. The description is called meta-data). This
allows the DBMS software to work with different
databases.
•2) Insulation between programs and data: Called
program-data independence. Allows changing data
storage structures and operations without having to
change the DBMS access programs.
www.edulearninghub.com
Slide 1-11
•3) Data Abstraction: A data model is used to hide
storage details and present the users with a
conceptual view of the database.
•4) Support of multiple views of the data: Each
user may see a different view of the database,
which describes only the data of interest to that
user.
www.edulearninghub.com
•5) Sharing of data and multiuser transaction
processing :
Allowing a set of concurrent users to retrieve and to
update the database.
Concurrency control within the DBMS guarantees that
each transaction is correctly executed or completely
aborted
. OLTP (Online Transaction Processing) is a major part of
database applications.
www.edulearninghub.com
Slide 1-13
Explain Database Users/ Actors on the scene/
workers behind the scene
www.edulearninghub.com
Slide 1-15
Actors on the scene
–Database administrators: responsible for
authorizing access to the database, for co-
ordinating and monitoring its use, acquiring
software, and hardware resources, controlling its
use and monitoring efficiency of operations.
–Database Designers: responsible to define the
content, the structure, the constraints, and
functions or transactions against the database.
They must communicate with the end-users and
understand their needs.
–End-users: they are the peoples whose jobs require
access to the database for querying, updating, and
generating reports ; the database primarily exists
for their use
www.edulearninghub.com
Slide 1-16
Categories of End-users
•Casual : occasionally access the database, but they
may need different information each time.
• They use query language to satisfy their needs.
www.edulearninghub.com
•Naive or Parametric : they make up a large section
of the end-user population. They use previously
well-defined functions against the database.
•They are constantly querying and updating the
database, using standard type of queries and
updates called canned transactions- that have
been carefully programmed and tested.
• Examples are bank-tellers or reservation clerks
who do this activity for an entire shift of
operations.
www.edulearninghub.com
Slide 1-18
Categories of End-users
•Sophisticated : these include business analysts,
scientists, engineers, others thoroughly familiar with
the system capabilities.
• Many use tools in the form of software packages that
work closely with the stored database.
•Stand-alone : mostly maintain personal databases
using ready-to-use packaged applications
www.edulearninghub.com
System Analysist and Application Programmers
( Software Engineers)
•System Analysts determine the requirement of end
users.
• Application programmers implements these
specification as programs; then they test, debug,
document, and maintain.
• Such analysis or application programmes are
commonly called software engineers.
•They use the DBMS to accomplish their task.
www.edulearninghub.com
Slide 1-20
Advantages of Using the Database
Approach
1.Controlling redundancy
2.Restricting unauthorized access to data.
3.Providing persistent storage for program Objects
4.Providing Storage Structures for efficient Query
Processing
5.Providing backup and recovery services.
6.Providing multiple user interface
7.Representing complex relationships among data.
8.Enforcing integrity constraints on the database.
9.Availability to up-to-date information.
10.Reduces application development time
www.edulearninghub.com
Differentiate data model, schema, instance
Data Model:
A set of concepts to describe the structure (types, relationships,
constraints) of a database, and certain constraints that the database
should obey.
Schema:
The description of a database. Includes descriptions of the database
structure and the constraints that should hold on the database.
Database Instance:
The actual data stored in a database at a particular moment in time.
Also called database state (or occurrence).
www.edulearninghub.com
Write a note about Entity, Attribute,
Relationship
•Entity : An entity represents a real-world object or
concept such as an employee or student that is described
in the database
Example: student
•Attribute: An attributes represents property of an entity
Example: name, age , dob of a student
•Relationship: it is the association among two or more
entities
Example studying relationship between a student and a
class
www.edulearninghub.com
Slide 23
Explain three-schema or 3-tier architecture of
DBMS.
www.edulearninghub.com
Three-Schema Architecture
•Defines DBMS schemas at three levels:
•Internal schema at the internal level to describe
physical storage structures and access paths. Typically
uses a physical data model.
•Conceptual schema at the conceptual level to
describe the structure and constraints for the whole
database for a community of users. Uses a conceptual
or an implementation data model.
•External schemas at the external level to describe the
various user views. Usually uses the same data model
as the conceptual level.
www.edulearninghub.com
What do you mean by Mapping in DBMS?
Mappings among schema levels are needed to transform
requests and data. Programs refer to an external
schema, and are mapped by the DBMS to the internal
schema for execution.
•The process of transforming the request and the result
between levels are called mapping
www.edulearninghub.com
Slide 2-26
What is Data Independence ?
•Data independence can be defined as the
capacity to change schema at one level of db
system without having to change the schema
at the next higher level
•Two types of data independence
1.Logical Data Independence:
2.Physical Data Independence:
www.edulearninghub.com
•Logical Data Independence: The capacity to
change the conceptual schema without having
to change the external schemas and their
application programs.
•Physical Data Independence: The capacity to
change the internal schema without having to
change the conceptual schema.
www.edulearninghub.com
Slide 28 www.edulearninghub.com
Write a note about DBMS languages?.
Data Definition Language (DDL)
Data Manipulation Language (DML)
Data Control Language (DCL)
Examples:
DDL - CREATE, ALTER , RENAME
DML - SELECT , INSERT, DELETE, UPDATE
DCL - GRANT , REVOKE
www.edulearninghub.com
The Database System Environment
www.edulearninghub.com
DBMS Component Module
www.edulearninghub.com
Explain different Types of attributes in DBMS
1: ATOMIC ATTRIBUTE
An attribute that cannot be divided into smaller independent attribute is known
as atomic attribute.
Example: age
2: COMPOSITE ATTRIBUTE
An attribute that can be divided into smaller independent attribute is known as
composite attribute.
Example: name
3:SINGLE VALUED ATTRIBUTE
An attribute that has only single value for an entity is known as single valued
attribute.
Example: age
www.edulearninghub.com
4: MULTI VALUED ATTRIBUTE
An attribute that can have multiple values for an entity is known as multi valued
attribute.
Example: phone number
5: STORED ATTRIBUTE
An attribute that cannot be derived from another attribute is known as stored
attribute.
For example, birth date cannot derive from age of student.
6: DERIVED ATTRIBUTE
An attribute that can be derived from another attribute is known as derived
attribute.
For example, age can be derive from date of birth.
www.edulearninghub.com
7: NULL VALUED ATTRIBUTE
An attribute, which has not any value for an entity is known as null valued
attribute.
For example, if age of a person not known
8: KEY ATTRIBUTE
An attribute that has unique value of each entity is known as key attribute.
For example, Email id
www.edulearninghub.com
What is ER diagram and draw the symbols .
ER diagrams and Naming Conventions
Entity Relationship diagram is the pictorial representation
of entities ,attributes and relationships
It helps db designers to design the database easily
www.edulearninghub.com
www.edulearninghub.com
www.edulearninghub.com
www.edulearninghub.com
Write a note about Naming Conventions and Design
Guidelines of ER design
When designing a database schema , the choice of names
for entity, attribute and relationship type is not always
straight forward.
The names must reflect the nature of the schema
Try to use singular names for entity
Use entity uppercase letters for entity, and lowercase
letters for attributes
While naming entities, attributes try to avoid use of special
characters, digits except underscore
www.edulearninghub.com
Difference between File System and DBMS
File System :
File system is basically a way of arranging the files in a storage
medium like hard disk. File system organizes the files and helps
in retrieval of files when they are required.
DBMS(Database Management System) :
Database Management System is basically a software that
manages the collection of related data. It is used for storing data
and retrieving the data effectively when it is needed.
www.edulearninghub.com
www.edulearninghub.com
www.edulearninghub.com
Categories of Database model
A database model is a type of data model that determines
the logical structure of a database and fundamentally
determines in which manner data can be stored, organized
and manipulated.
•Hierarchical database model.
•Relational model.
•Network model.
•Object-oriented database model.
•Entity-relationship model.
•Document model.
•Entity-attribute-value model.
•Star schema.
www.edulearninghub.com
What is Domain of an Attribute
•The set of all possible vales of an attribute is called domain set
of an attribute
•Example: age of a person
domain contains only numbers from 1, 2,…….up to
maximum age limit
What is Key Attribute
•An attribute whose value is used to uniquely identify an entity
from an entity set
www.edulearninghub.com
Different Types of Keys
Primary Key
Foreign Key
Super Key
Candidate Key
Alternate key
Primary Key
•It is the value that is uniquely identify each records in the
table
•Example: roll_number, emp_id, reg_number
Foreign Key
•A foreign key is generally a primary key from one table
that appears as a field in another table
•It is used to point primary key in another table
•Example: detp_id may appear in the employee table as
well as in the department table
www.edulearninghub.com
Super Key
•A Super key is any combination of fields within a table
that uniquely identifies each record within that table.
Example:
•Employee (emp_id, name, job, detp_id)
Super Keys are
1.Emp_id, name
2.Emp_id, name, job
3.Emp_id, name, job, dept_id
www.edulearninghub.com
Candidate Key
•A candidate is a subset of a super key.
•A candidate key is a single field or the least combination
of fields that uniquely identifies each record in the
table.
•The minimal super key is the candidate key
Example:
•Employee (emp_id, name, job, detp_id)
www.edulearninghub.com
Alternate key/ secondary keys
•A table may have one or more choices for the primary
key.
•One is selected as the primary key.
•Those not selected are known as secondary keys or
alternative keys.
Example:
•Student( s_name, reg_no, adm_no, class)
•Part of candidate key which is not a primary key
www.edulearninghub.com