DBMS Intro
DBMS Intro
DBMS Intro
1. ER-MODEL
• Which is a popular high-level conceptual data model, this model and its variations are
frequently used for the conceptual design of database applications, and many database design
tools employ its concepts. ER-Models are used in the design of conceptual schemas for database
applications. The diagrammatic notation associated with the ER model, known as ER diagrams.
ENTITIES: An entity may be an real world object with a physical existence, such as an
employee or it may be an object with a conceptual existence such as a company.
Examples: STUDENT, CAR, COMPANY, UNIVERSITY, etc.
ATTRIBUTES : Each entity has attributes, which are the particular properties that describe
it. Example: EMPLOYEE entity may be described by the employee’s name, age, address, salary,
and job.
TYPES OF ATTRIBUTES
1. Simpleattributes.
2. Composite attributes.
3. Singlevalued attributes.
4. Multivalued attributes.
5. Stored attributes.
6. Derived attributes
Simple Attribute:
An attribute that cannot be divided into smaller independent attribute is known as atomic
attribute. Example: The age (attribute) of student (entity) cannot further divide. Age
is atomic attribute.
Composite attribute:
An attribute that can be divided into smaller independent attribute is known ascomposite
attribute. Example: The address (attribute) of student (entity) can be further divide into
House no, city and so on.
Single valued attribute :
An attribute that has only single value for an entity is known as single valued attribute.
Example:Any manufactured product can have only one serial no, the serial no. can be
subdivided on the basis of region, part no. etc.
The single valued attribute cannot be simple valued attribute because it can be
subdivided.
An attribute that can have multiple values for an entity is known as multi valued attribute.
Example: Phone no (attribute) of student (entity) can have multiple value because a
student may have many phone numbers.
Stored attribute
An attribute that cannot be derived from another attribute is known as stored attribute.
Example: Birth date cannot derive from age of student.
Derived attribute
An attribute that can be derived from another attribute is known as derived attribute.
Example: Age cannot derive from birth date of student.
EMPLOYEE refers to both a type of entity as well as the current set of all employee entities
in the database.
Symbols Meaning
Ternary relationship
o Unary Relationship : if number of participating entity type is only one then Its degree is
one. A relationship type of degree one is called Unary Relationship.
In some cases the same entity type participates more than once in a relationship type
in different roles. In such cases the role name becomes essential for distinguishing the
meaning of the role that each participating entity plays. Such relationship types are
called recursive relationships.
Example: The SUPERVISION relationship type relates an employee to a supervisor,
where both employee and supervisor entities are members of the same EMPLOYEE
entity set. Hence, the EMPLOYEE entity type participates twice in SUPERVISION:
once in the role of supervisor (or boss), and once in the role of supervisee (or
subordinate).
o Binary Relationship : if number of participating entity type is two then Its degree is
two. A relationship type of degree two is called Binary Relationship.
Example: the WORKS_FOR relationship type is of degree two since two entity types
EMPLOYEE and DEPARTMENT participate.
o Ternary relationship : if number of participating entity type is three then Its degree is
three. A relationship type of degree three is called Ternary relationship
Example of a ternary relationship is SUPPLY, shown in Figure in below 7.10, where
each relationship instance ri associates three entities—a supplier s, a part p, and a
project j, whenever s supplies part p to project j.
that each department can be related to (that is, employs) any number of employees, but an
employee can be related to (work for) only one department.
The possible cardinality ratios for binary relationship types are 1:1, 1:N, N:1, and M:N.
Participation Constraints and Existence Dependencies
The participation constraint specifies whether the existence of an entity depends on its
being related to another entity via the relationship type. This constraint specifies the
minimum number of relationship instances that each entity can participate in, and is
sometimes called the minimum cardinality constraint.
There are two types of participation constraints
1. Total participation constraints and
2. Partial participation constraints
o Example : If a company policy states that every employee must work for a department, then
an employee entity can exist only if it participates in at least one WORKS_FOR relationship
instance Thus, the participation of EMPLOYEE in WORKS_FOR is called total
participation, meaning that every entity in the total set of employee entities must be related
to a department entity via WORKS_FOR. Total participation is also called existence
dependency.
o we do not expect every employee to manage a department, so the participation of
EMPLOYEE in the MANAGES relationship type is partial, meaning that some or part of
the set of employee entities are related to some department entity via MANAGES, but not
necessarily all.
o In ER diagrams, total participation (or existence dependency) is displayed as a double line
connecting the participating entity type to the relationship, whereas partial participation is
represented by a single line.
1. An ________ is a set of entities of the same type that share the same properties, or attributes.
a)Entity set
b)Attribute set
c)Relation set
d) Entity model
2. Entity is a _________
a) Object of relation
b) Present working model
c) Thing in real world
d) Model of relation
3. The descriptive property possessed by each entity set is _________
a) Entity
b) Attribute
c) Relation
d) Model
4. The function that an entity plays in a relationship is called that entity’s _____________
a) Participation
b) Position
c) Role
d) Instance
5. The attribute name could be structured as a attribute consisting of first name, middle initial,
and last name. This type of attribute is called
a) Simple attribute
b) Composite attribute
c) Multi-valued attribute
d) Derived attribute
Explanation: Composite attributes can be divided into sub-parts or Attributes that can be
arranged into hierarchy.
6. The attribute AGE is calculated from DATE_OF_BIRTH . The attribute AGE is
a) Single valued
b) Multi valued
c) Composite
d) Derived
Explanation: The value for this type of attribute can be derived from the values of other
related attributes or entities.
7. Not applicable condition can be represented in relation entry as
a) NA
b) 0
c) NULL
d) Blank Space
Explanation: NULL always represents that the value is not present.
8. Which of the following can be a multivalued attribute?
a) Phone_number
b) Name
c) Date_of_birth
d) All of the mentioned
Explanation: Name and Date_of_birth cannot hold more than 1 value.
9. Which of the following is a single valued attribute
a) Register_number
b) Address
c) SUBJECT_TAKEN
d) Reference
10. In a relation between the entities the type and condition of the relation should be specified.
That is called as______attribute.
a) Descriptive
b) Derived
c) Recursive
d) Relative
Explanation: Consider the entity sets student and section, which participate in a relationship
set takes. We may wish to store a descriptive attribute grade with the relationship to record
the grade that a student got in the class.
11. Considering binary relationships, possible cardinality ratios are
a) one : one
b) 1 : N
c) M : N
d) all of above
12. Set of values which specifies which values are to be assigned to individual entities is
considered as
a) domain of values
b) composition of values
c) attribution of values
d) derivation of values
Explanation: Domain is value set or set of values specified to particular attribute of entity
type.
13. Snapshot of the data in the database at a given instant of time is called
a) Database Schema
b) Database Instance
c) Database Snapshot
d) All of the above
14. Which of the following indicates the maximum number of entities that can be involved in a
relationship?
a) Minimum cardinality
b) Maximum cardinality
c) Greater Entity Count
d) Key constraint
15. Which type of entity cannot exist in the database unless another type of entity also exists in
the database, but does not require that the identifier of that other entity be included as part of
its own identifier?
a) Weak entity
b) Strong entity
c) ID-dependent entity
d) ID- independent entity
16. In a one-to-many relationship, the entity that is on the one side of the relationship is called
a(n) ________ entity.
a) Parent
b) Child
c) Instance
d) Subtype
18. In which of the following is a single-entity instance of one type related to many entity
instances of another type?
a) One-to-One Relationship
b) One-to-Many Relationship
c) Many-to-Many Relationship
d) Composite Relationship
19. In which of the following can many entity instances of one type be related to many entity
instances of another type?
a) One-to-One Relationship
b) One-to-Many Relationship
c) Many-to-Many Relationship
d) Composite Relationship
20. Which of the following is NOT a basic element of all versions of the E-R model?
a) Entities
b) Attributes
c) Relationships
d) Primary keys
21. In which of the following is a single-entity instance of one type of related to a single-entity
instance of another type?
a) One-to-One Relationship
b) One-to-Many Relationship
c) Many-to-Many Relationship
d) Composite Relationship
22. Entities can be associated with one another in which of the following?
a) Entities
b) Attributes
c) Identifiers
d) Relationships
23. In a one-to-many relationship, the entity that is on the many side of the relationship is called
a(n) ________ entity.
a) Parent
b) Child
c) Instance
d) Subtype
24. Which of the following gives a logical structure of the database graphically?
a) Entity-relationship diagram
b) Entity diagram
c) Database diagram
d) Architectural representation
Explanation: E-R diagrams are simple and clear—qualities that may well account in large
part for the widespread use of the E-R model.
27. Consider a directed line(->) from the relationship set advisor to both entity sets instructor and
student. This indicates _________ cardinality
a) One to many
b) One to one
c) Many to many
d) Many to one
Explanation: This indicates that an instructor may advise at most one student, and a student
may have at most one advisor.
28. We indicate roles in E-R diagrams by labeling the lines that connect ___________ to
__________
a) Diamond , diamond
b) Rectangle, diamond
c) Rectangle, rectangle
d) Diamond, rectangle
Explanation: Diamond represents a relationship set and rectangle represents a entity set.
29. An entity set that does not have sufficient attributes to form a primary key is termed a
_________
a) Strong entity set
b) Variant set
30. For a weak entity set to be meaningful, it must be associated with another entity set, called
the
a) Identifying set
b) Owner set
c) Neighbour set
d) Strong entity set
Explanation: Every weak entity must be associated with an identifying entity; that is, the
weak entity set is said to be existence dependent on the identifying entity set. The identifying
entity set is said to own the weak entity set that it identifies. It is also called as owner entity
set.
33. Relationship type in which one attribute is migrated to N-side of relationship is classified as
a) 4:N
b) 3:N
c) 1:N
d) 2:N
34. For a relationship type, participation constraints and cardinality ratio are considered together
to make
a) intensive constraints
b) recursive constraints
c) composite constraints
d) structural constraints
a) participation constraint
b) non-participation constraint
c) extensive constraint
d) intensive constraint
2. Data Model
Data models define how the logical structure of a database is modeled. Data Models are
fundamental entities to introduce abstraction in a DBMS.Data models define how data is
connected to each other and how they are processed and stored inside the system. Data models
can facilitate interaction among the designer, the applications programmer, and the end user.
Depending on the levels of data, data model divided into 3 categories
1. Object Based
2. Physical and
3. Record based Data models.
• Object oriented data model : Along with the mapping between the entities,
describes the state of each entity and the tasks performed by them. It considers each
object in the world as objects and isolates it from each other. It groups its related
functionalities together and allows inheriting its functionality to other related sub-
groups.
a. Hierarchical data model: In this data model, the entities are represented in a
hierarchical fashion(tree like structure). Here we identify a parent entity, and its child
entity. Again we drill down to identify next level of child entity and so on.
b. Network data model: It is designed to address the drawbacks of the hierarchical model.
It helps to address M:N relationship. This data model is also represented as hierarchical,
but this model will not have single parent concept. Any child in the tree can have
multiple parents here.
• Relational data models: This model is designed to overcome the drawbacks of hierarchical
and network models. This models define how they are structured in the database physically
and how they are inter-related. It purely based on how the records in each table are related.It
purely isolates physical structure from the logical structure. Logical structure is defines
records are grouped and distributed.
• Most widely used record based data model is relational data model.
Entity is real world thing, such as a person, place, thing, or event, about which data are to be
collected and stored. Example: CUSTOMER, STUDENT, EMPLOYEE, DEPARTMENT
Attribute is a characteristic of an entity. Example: a CUSTOMER entity would be described by
attributes such as customer last name, customer first name, customer phone, customer
address, and customer credit limit.
Relationship describes an association among (two or more) entities. Example: A relationship
between customers and agents that may be described as “an agent can serve many customers
and each customer may be served by one agent. Here serve is a relationship.
Constraint: is a restriction placed on the data. Constraints are important because they help to
ensure data integrity. And it's normally expressed in the form of rules. Example: An
employee's salary must have values that are between 6000 and 350000 Each class must have
one and only one teacher
Data Model(MCQs)
36. Which of the following is a Data Model?
a) Entity-Relationship model
b) Relational data model
c) Object-Based data model
d) All of the above
41. Form of data model in which concepts provided are useful for end users and are also close to
way it is stored in computer system is called
a) representational data models
b) implementation data models
c) clientele data models
d) both a and b
42. Form of data model which focuses concepts in same way as data stored in computer system
is classified as
a) low level data models
b) high level data models
c) dynamic data models
d) medium level data models
43. In categories of data modeling, low level data models are also called
a) conceptual data models
b) physical data models
c) triggered data models
d) logical data models
44. In categories of data modeling, high level data models are also called
a) conceptual data models
45. Concepts of data models that are only useful to computer specialists rather than end users of
programs are classified as
A. triggered data models
B. logical data models
C. conceptual data models
D. physical data models
47. Which of the following design is both software and hardware independent?
a) Logical
b) physical
c) conceptual
d) none of the above
48. Object based data models are used in describing the abstraction of the following level
a) Only physical
b) conceptual and view
c) physical and conceptual
d) none of the above
3. Relational Model
RELATIONAL MODEL CONCEPTS
Relational Model represents how data is stored in Relational Databases. A relational
database stores data in the form of relations (tables). The relational model represents the
database as a collection of relations.
Each relation resembles a table of values each row in the table represents a collection of
related data values. The table name and column names are used to help to interpret the
meaning of the values in each row.
In the formal relational model terminology, a row is called a tuple, a column header is called
an attribute, and the table is called a relation. The data type describing the types of values
that can appear in each column is represented by a domain of possible values.
IMPORTANT TERMINOLOGIES
Attribute: Attributes are the properties that define a relation. e.g.; ROLL_NO, NAME
Relation Schema: A relation schema represents name of the relation with its attributes. e.g.;
STUDENT (ROLL_NO, NAME, ADDRESS, PHONE and AGE) is relation schema for
STUDENT. If a schema has more than 1 relation, it is called Relational Schema.
Tuple: Each row in the relation is known as tuple. The above relation contains 4 tuples, one
of which is shown as:
1 RAM DELHI 9455123451 18
Relation Instance: The set of tuples of a relation at a particular instance of time is called
as relation instance. Table 1 shows the relation instance of STUDENT at a particular time.
It can change whenever there is insertion, deletion or updation in the database.
4
NULL Values: The value which is not known or unavailable is called NULL value. It is
represented by blank space. e.g.; PHONE of STUDENT having ROLL_NO 4 is NULL.
CONSTRAINTS ON RELATION
Constraints
Every relation has some conditions that must hold for it to be a valid relation. These
conditions are called Relational Integrity Constraints. There are three main integrity
constraints −
1. Key constraints
2. Domain constraints
3. Referential integrity constraints
1. Key Constraints
There must be at least one minimal subset of attributes in the relation, which can identify
a tuple uniquely. This minimal subset of attributes is called key for that relation.
If there are more than one such minimal subsets, these are called candidate keys.
Key constraints force that −in a relation with a key attribute, no two tuples can have
identical values for key attributes.
a key attribute cannot have NULL values.
Key constraints are also referred to as Entity Constraints.
2. Domain Constraints
Attributes have specific set of values in real-world scenario.
For example, age can only be a positive integer.
The same constraints have been tried to employ on the attributes of a relation. Every
attribute is bound to have a specific range of values.
For example, age cannot be less than zero and telephone numbers cannot contain a digit
outside 0-9.
3. Referential integrity Constraints
Referential integrity constraints work on the concept of Foreign Keys. A foreign key is a
key attribute of a relation that can be referred in other relation.
Referential integrity constraint states that if a relation refers to a key attribute of a different
or same relation, then that key element must exist.
The rules are:
o We can't delete a record from a primary table if matching records exist in a
related table.
o We can't change a primary key value in the primary table if that record has
related records.
o We can't enter a value in the foreign key field of the related table that doesn't
exist in the primary key of the primary table.
o We can enter a Null value in the foreign key, specifying that the records are
unrelated.
NOT NULL:
NOT NULL constraint makes sure that a column does not hold NULL value. When we don’t
provide value for a particular column while inserting a record into a table, it takes NULL
value by default. By specifying NULL constraint, we can be sure that a particular column(s)
cannot have NULL values.
UNIQUE:
UNIQUE Constraint enforces a column or set of columns to have unique values. If a column
has a unique constraint, it means that particular column cannot have duplicate values in table.
DEFAULT:
The DEFAULT constraint provides a default value to a column when there is no value
provided while inserting a record into a table.
CHECK:
This constraint is used for specifying range of values for a particular column of a table. When
this constraint is being set on a column, it ensures that the specified column must have the
value falling in the specified range.
KEY CONSTRAINTS:
PRIMARY KEY:
Primary key uniquely identifies each record in a table. It must have unique values and cannot
contain nulls. In the below example the ROLL_NO field is marked as primary key, that
means the ROLL_NO field cannot have duplicate and null values.
FOREIGN KEY:
Foreign keys are the columns of a table that points to the primary key of another table. They
act as a cross-reference between tables.
Integrity constraints are specified when a relation is created and enforced when a relation is
modified.The impact of domain, PRIMARY KEY, and UNIQUE constraints is
straightforward: if an insert, delete, or update command causes a violation, it is rejected.
A similar problem arises whenever we try to insert a tuple with a value in a field that is not in
the domain associated with that field, i.e., whenever we violate a domain constraint.
Deletion does not cause a violation of domain, primary key or unique constraints.
The impact of foreign key constraints is more complex because SQL sometimes tries to
rectify a foreign key constraint violation instead of simply rejecting the change.
The referential integrity enforcement steps taken by the DBMS in terms of our Enrolled and
Students tables, with the foreign key constraint that Enrolled.sid is a reference to (the primary
key of) Students.
Deletions of Enrolled tuples do not violate referential integrity, but insertions of Enrolled
tuples could.
Insertions of Students tuples do not violate referential integrity although deletions could.
Further, updates on either Enrolled or Students that change the sid value could potentially
violate referential integrity.
SQL provides several alternative ways to handle foreign key violations.
We must consider three basic questions:
1. What should we do if an Enrolled row is inserted, with a sid column value that does not
appear in any row of the Students table? In this case the INSERT command is simply
rejected.
2. What should we do if a Students row is deleted?
The options are:
o Delete all Enrolled rows that refer to the deleted Students row (CASCADE).
o Disallow the deletion of the Students row if an Enrolled row refers to it(NO
ACTION).
o Set the sid column to the sid of some (existing) ‘default’ student, for every
Enrolled row that refers to the deleted Students row(SET DEFAULT).
o For every Enrolled row that refers to it, set the sid column to null. In our example,
this option conflicts with the fact that sid is part of the primary key of Enrolled
and therefore cannot be set to null (SET NULL).
3. What should we do if the primary key value of a Students row is updated? The options
here are similar to the previous case.
The options are specified as part of the foreign key declaration. The default option is NO
ACTION, which means that the action (DELETE or UPDATE) is to be rejected. Thus, the
ON UPDATE clause in our example could be omitted.
The CASCADE keyword says that if a Students row is deleted, all Enrolled rows that refer to
it are to be deleted as well. If the UPDATE clause specified CASCADE, and the sid column
of a Students row is updated, this update is also carried out in each Enrolled row that refers to
the updated Students row.
If a Students row is deleted, we can switch the enrollment to a ‘default’ student by using ON
DELETE SET DEFAULT. The default student is specified as part of the definition of the sid
field in Enrolled.
Example: sid INT DEFAULT ‘53666’.
SQL also allows the use of null as the default value by specifying ON DELETE SET NULL.
Relational Model(MCQs)
10. Key which specifies that two different tuples cannot have same value is classified as
a) super key
b) simple key
c) parallel key
d) conceptual key
13. A Relation is a
a) A Subset of a Cartesian product of a list of attributes
b) Subset of a Cartesian product of a list of domains
c) Subset of a Cartesian product of a list of tuple
d) Subset of a Cartesian product of a list of relations
21. Which of the following is a group of one or more attributes that uniquely identifies a row?
a) Key
b) Determinant
c) Tuple
d) Relation
22. When the values in one or more attributes being used as a foreign key must exist in another
set of one or more attributes in another table, we have created a(n):
a) transitive dependency.
b) insertion anomaly.
c) referential integrity constraint.
d) normal form.
c) two-dimensional table.
d) three-dimensional table.
24. In the relational model, relationships between relations or tables are created by using:
a) composite keys.
b) determinants.
c) candidate keys.
d) foreign keys.
27. A key:
a) must always be composed of two or more columns.
b) can only be one column.
c) identifies a row.
d) identifies a column.
29. ____defines the structure of a relation which consists of a fixed set of attribute-domain pairs.
a) Instance
b) Schema
c) Program
d) Super Key
A database is a collection of related data which are known facts that can be recorded and
that have implicit meaning.
o For example, consider the names, telephone numbers, and addresses of the people we
know. We may have recorded this data in an indexed address book or you may have
stored it on a hard drive, using a personal computer and software such as Microsoft
Access or Excel. This collection of related data with an implicit meaning is a
database.
Advantages of DBMS :
Minimize Data Redundancy - In Database Management System, all the files are integrated
in a single database. The whole data is stored only once at a single place so there is no chance
of duplicate data.
Sharing Of Data - In DBMS, Data can be shared in between authorized user of database. All
the users have their own right to access the database up to a level. Database Administration
has complete access of database..
Data Consistency - DBMS controls data redundancy which in turn controls data
consistency. Data consistency means if you want to update data in any files then all the files
should not be updated again.
Data Integrity - Data integrity means unification of so many files into a single file. In
DBMS data is stored in different tables. A database contains different tables that are linked to
each other. Many users feed entries in these tables so it is important to maintain data items
and association between data items.
Search Capability - Users of database may require to fetch data from the database. There are
numerous queries users may ask about the data. Search speed of the database must be fast to
produce quick results.
Security - Data security means protecting your precious data from unauthorized access. Data
in database should be kept secure and safe to unauthorized modifications. Only authorized
users should have the grant to access the database.
Privacy - Privacy means up to what extent a user can access the data. It is predetermined by
the DBA that who will access the data and up to what level he will be able to access it. Let
say when you make a Facebook page then you have the power to give rights to other users
that who will be the promoter, editor and admin.
Simplicity - Simplicity means to represent the overall logical view of data in a simple and
clear manner. DBMS is very simple for its users who use it. All the operations like insert,
delete, create and update are very easy to implement.
Backup and Recovery - DBMS solves this problem of taking back up again and again
because it allows automatic backup and recovery of database.
Integrity Constraints - Constraints are used to store accurate data because there are many
users who feed data in database. Data stored in database should always be correct and
accurate. DBMS provides the capability to enforce these constraints on database.
Data Atomicity - Any complete transaction in database is called atomic unit. It is the duty of
DBMS to store a complete transaction in database. If any transaction is partially completed
then it roll backs them.
Concurrency Control - If two users are accessing data simultaneously and they both want to
update values of same record then it may create concurrency. DBMS has the power to control
concurrency so that no transactions are lost.
Maintaining Cost is lower - DBMS systems are costly but after purchasing them their
maintenance cost is very less. It can be maintained by few programmers that is not costly for
an enterprise.
Very Less Chances of Data Loss - As there is lot of security constraint made on database so
chances of data loss are minimum. One can store their precious data or many years in DBMS
without loss of any information.
Database system:
Structure of DBMS :
Database Users:
Users are differentiated by the way they expect to interact with the system:
Application programmers:
o Application programmers are computer professionals who write application
programs. Application programmers can choose from many tools to develop user
interfaces.
o Rapid application development (RAD) tools are tools that enable an application
programmer to construct forms and reports without writing a program.
Sophisticated users:
o Sophisticated users interact with the system without writing programs. Instead,
they form their requests in a database query language.
o They submit each such query to a query processor, whose function is to break
down DML statements into instructions that the storage manager understands.
Specialized users :
Database Administrator:
Coordinates all the activities of the database system. The database administrator has a
good understanding of the enterprise’s information resources and needs.
Database administrator's duties include:
o Schema definition: The DBA creates the original database schema by executing
a set of data definition statements in the DDL.
o Storage structure and access method definition.
o Schema and physical organization modification: The DBA carries out changes
to the schema and physical organization to reflect the changing needs of the
organization, or to alter the physical organization to improve performance.
o Granting user authority to access the database: By granting different types of
authorization, the database administrator can regulate which parts of the database
various users can access.
o Specifying integrity constraints.
o Monitoring performance and responding to changes in requirements.
Query Processor:
The query processor will accept query from user and solves it by accessing the database.
Parts of Query processor:
DDL interpreter
This will interprets DDL statements and fetch the definitions in the data dictionary.
DML compiler
a. This will translates DML statements in a query language into low level instructions
that the query evaluation engine understands.
b. A query can usually be translated into any of a number of alternative evaluation plans
for same query result DML compiler will select best plan for query optimization.
Query evaluation engine
This engine will execute low-level instructions generated by the DML compiler on
DBMS.
Storage Manager/Storage Management:
A storage manager is a program module which acts like interface between the data stored
in a database and the application programs and queries submitted to the system.
Thus, the storage manager is responsible for storing, retrieving and updating data in the
database.
The storage manager components include:
o Authorization and integrity manager: Checks for integrity constraints and
authority of users to access data.
o Transaction manager: Ensures that the database remains in a consistent state
although there are system failures.
o File manager: Manages the allocation of space on disk storage and the data
structures used to represent information stored on disk.
o Buffer manager: It is responsible for retrieving data from disk storage into main
memory. It enables the database to handle data sizes that are much larger than the
size of main memory.
d) Data loading
31. The program interface which provides the feature to client side programs to call the database
management system is classified as
a) open programming interface
b) closed programming interface
c) application programming interface
d) data programming language
32. The database catalog or dictionary defining the descriptive information which is stored in
database is called
a) constrained data
b) Metadata
c) basic data
d) filtered data
33. Database catalog or dictionary defining descriptive information which is stored in database is
called
a) constrained data
b) metadata
c) basic data
d) filtered data
34. Collection of known and useful raw facts that has some meaning and can be processed in
useful way is classified as
a) management oriented facts
b) updated facts
c) data
d) recorded facts
35. Specification given to database management system regarding data whether it is string,
integers or special characters is classified as
a) type of data stored
b) type of query asked
c) type of structure developed
d) sequence of data cycle
c) analyzing a database
d) filtering a database
37. Result of Compilation of DDL statement is stored in special file called as _________.
a) Data Dictionary
b) Symbol Table
c) Database File
d) Database Schema File
39. Data Dictionary contain one of the following entity inside it, Guess the answer
a) Associated Data
b) Important Data
c) Meta Data
d) Duplicate Data
40. Storage structure and Access methods used by database system are specified using
____________.
a) Data Storage and Definition Language
b) Data Dictionary
c) Data Manipulation Language
d) None of these
43. The DBMS acts as an interface between what two components of an enterprise-class
database system?
45. An application where only one user accesses the database at a given time is an example of
a(n) ________ .
a) single-user database application
b) multiuser database application
c) e-commerce database application
d) data mining database application
50. _______refers to the basic facts and entities, such as names and numbers.
a) Data
b) Information
c) Input
d) Output
5. Data Independence
Data independence is the capacity to change the schema at one level of a database system
without having to change the schema at the next higher level.
The following are the types of data independence:
o Logical data independence
o Physical data independence
Data Independence(MCQs)
1. The type of data independence in which the internal schema can be modified without
modifying the conceptual schema is classified as
a) logical data independence
b) physical data independence
c) conceptual level independence
d) external level independence
3. Type of data independence in which schema can be altered on conceptual level without
altering external level is classified as
a) conceptual level independence
b) external level independence
c) logical data independence
d) physical data independence
5. Capacity to alter database schema at one level without altering any other schema level is
classified as
a) data mapping
b) data independence
c) data dependence
d) data transformation
6. A physical view of data refers to the way data is handled at a_____ its storage and retrieval:
a) High level
b) Low level
c) Medium level
d) All of these
7. In logical and physical view of data the set of principles that defines a data model may be
divided into how many parts:
a) 1
b) 2
c) 3
d) 4
10. The ability to modify the internal schema without causing any change to the external schema
a) Physical data independence
b) Logical Data independence
c) External Data independence
d) None
11. The ability to modify the conceptual schema without causing any change to the application
program a) Physical data independence
b) Logical Data independence
c) External Data independence
d) None
DATA ABSTRACTION
Database Schema
A database schema is the skeleton structure that represents the logical view of the entire
database. It defines how the data is organized and how the relations among them are associated.
It formulates all the constraints that are to be applied on the data.
A database schema defines its entities and the relationship among them. It contains a descriptive
detail of the database, which can be depicted by means of schema diagrams. It’s the database
designers who design the schema to help programmers understand the database and make it
useful.
Physical Schema
It describes the physical storage structure of the database. Which uses a physical data model
and describes the complete details of data storage and access paths for the database.
The physical schema specifies additional storage details. Essentially, the physical schema
summarizes how the relations described in the conceptual schema are actually stored on
secondary storage devices such as disks and tapes. We must decide what file organizations to
use to store the relations, and create auxiliary data structures called indexes to speed up data
retrieval operations.
A sample physical schema for the university database follows:
o Store all relations as unsorted files of records. (A file in a DBMS is either a collection
of records or a collection of pages, rather than a string of characters as in an operating
system.)
o Create indexes on the first column of the Students, Faculty, and Courses relations, the
sal column of Faculty, and the capacity column of Rooms.
Decisions about the physical schema are based on an understanding of how the data is
typically accessed. The process of arriving at a good physical schema is called physical
database design.
External Schema
External schemas allow data access to be customized (and authorized) at the level of
individual users or groups of users.
Any given database has exactly one conceptual schema and one physical schema because it
has just one set of stored relations, but it may have several external schemas, each tailored to
a particular group of users.
Each external schema consists of a collection of one or more views and relations from the
conceptual schema.
A view is conceptually a relation, but the records in a view are not stored in the DBMS.
Rather, they are computed using a definition for the view, in terms of relations stored in the
DBMS. The external schema design is guided by end user requirements.
For example, we might want to allow students to find out the names of faculty members
teaching courses, as well as course enrollments. This can be done by defining the following
view:
o Courseinfo(cid: string, fname: string, enrollment: integer)
A user can treat a view just like a relation and ask questions about the records in the view.
Even though the records in the view are not stored explicitly, they are computed as needed.
Data Abstraction(MCQs)
15. Type data abstraction which allows conceptual representation of data in database
management system is considered as
a) logical design model
b) data model
c) interface model
d) user friendly model
16. Considering abstraction concepts, process of assigning similar entities to similar entity types
systematically is called
a) classification
b) instantiation
c) identification
d) exception abstract
18. Process of abstraction in which objects and classes are identified with some kind of identifier
is classified as
a) classification
b) instantiation
c) identification
d) exception abstract
22. The type data abstraction which allows the conceptual representation of data in database
management system is considered as
a) data model
b) interface model
c) Relational model
d) User friendly model
23. The characteristic of database management system which allows the program operation
independence and program data independence is classified as
a) conceptual abstraction
b) implementation abstraction
Department of CSE Page 45
DBMS
c) data abstraction
d) interface abstraction
24. The phase considering documentation of analyzed requirements and can be represented with
the help of computerized tools is considered as
a) logical data design
b) storage cycle design
c) conceptual design
d) structural design
25. ——– level describes what data is stored in the database and the relationships among the data
a) Physical Level
b) Logical Level
c) Conceptual Level
d) None of the above
Database Languages in DBMS:To read data, update and store information in DBMS, some
languages are used. Database languages in DBMS are given as below.
o ALTER statement enhance the object of database. In structured query language it modifies
the properties of database object. The ALTER statement is
It has statements which are used to manage the data within the pattern of objects. Some of the
samples of the statements are as follows:
DML also include the structured query language (SQL) data modifying statements, they modify
the saved data but not the pattern of objects. The initial word of the DML statements has
functional capability.
Data manipulation languages are divided as:
Procedural programming
Declarative programming
The operations which has the authorization of REVOKE are CONNECT, INSERT, USAGE,
EXECUTE, DELETE, UPDATE and SELECT.
The execution of DCL is transactional; it also has the parameter of rolling back. But the
execution of data control language in oracle database does not have the feature of rolling
back.
4. The language used in application programs to request data from the DBMS is referred to as
the
a) DM
L
b) DD
L
c) VD
L
d) SDL
5. The DBMS language component which can be embedded in a program is
a) The data definition language (DDL).
b) The data manipulation language (DML).
c) The database administrator (DBA).
d) A query language.
10. A data manipulation command the combines the records from one or more tables is called
a) SELECT
b) PROJECT
c) JOIN
d) PRODUCT
11. The language used in application programs to request data from the DBMS is referred to as
the
a) DML
b) DDL
c) VDL
d) SDL
17. ________ it requires a user to specify what data are needed and how to get those data.
a) Procedural DML
b) Non Procedural DML
c) Abstract DML
d) None of the above
18. ________ it requires a user to specify what data are needed without specifying how to get those
data.
a) Procedural DML
b) Non Procedural DML
c) Abstract DML
d) None of the above
19. The Statement that requests a retrieval of information from database is called as ________.
a) Manipulation Statement
b) Query
c) Control Statement
d) None of these
21. Periodically adding, changing and deleting file records is called file
a) Updating
b) upgrading
c) restructuring
d) renewing