0% found this document useful (0 votes)
3 views

Unit-1 Important Questions & Answers

The document outlines key concepts in database systems, including the distinctions between database and file systems, centralized versus client/server models, and the roles of various database users. It explains data abstraction and independence within DBMS, detailing the three levels of data abstraction: physical, logical, and view levels. Additionally, it highlights the structure of DBMS, its functionalities, and the importance of data security against theft.

Uploaded by

23kq1a05h6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Unit-1 Important Questions & Answers

The document outlines key concepts in database systems, including the distinctions between database and file systems, centralized versus client/server models, and the roles of various database users. It explains data abstraction and independence within DBMS, detailing the three levels of data abstraction: physical, logical, and view levels. Additionally, it highlights the structure of DBMS, its functionalities, and the importance of data security against theft.

Uploaded by

23kq1a05h6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

UNIT-1
10M Q &A

1. Distinguish between database system and file system.


2. Describe the concept of centralized Vs client/server model.
3. Define DBMS. Explain database users in detail.
4. How does DBMS provide data abstraction? Explain the concept of data
independence?
5. Explain the structure of Database Management System. With a neat diagram.
6. What is data independence and how does a DBMS support it? Explain.
7. List and explain various data models used for database design.
8. Define Schema. Explain Three level schema architecture in DBMS.

1. Distinguish between database system and file system.


ANS: A Database System and a File System are both used to manage and store data, but they
differ significantly in terms of structure, capabilities, and use cases. Here’s a detailed comparison between the two:
1. Data Storage & Organization
 File System:
o Stores data in individual files, often organized in folders or directories.
o Files are typically unstructured, and the system doesn’t enforce relationships between files.
o Examples include NTFS, FAT32, HFS+, and EXT.
 Database System:
o Stores data in a structured format, often in tables, rows, and columns (e.g., relational databases) or other structures
like documents or key-value pairs (e.g., NoSQL databases).
o A database management system (DBMS) enforces relationships, constraints, and integrity among the stored data.
o Examples include MySQL, PostgreSQL, MongoDB, Oracle.
2. Data Access
 File System:
o Data is accessed by reading and writing to files using the file’s path or directory location.
o Access is typically sequential, though some file systems support random access.
 Database System:
o Data is accessed using structured query languages (e.g., SQL) or APIs, which allow sophisticated queries and
retrieval of specific data.
o Supports random access to data using indexes and keys, offering faster and more efficient querying.
3. Data Integrity
 File System:
o Does not provide built-in mechanisms for enforcing data integrity or relationships.
o The user or application is responsible for ensuring data consistency and handling corruption.
 Database System:
o Offers built-in mechanisms to enforce data integrity through constraints (e.g., primary keys, foreign keys),
triggers, and transaction management.
o Ensures data consistency even in multi-user environments through ACID (Atomicity, Consistency, Isolation,
Durability) properties.
4. Concurrency Control
 File System:
o Basic concurrency control, often using file locking mechanisms, which can lead to contention and
inefficiencies in multi-user environments.
 Database System:
o Sophisticated concurrency control through locking, isolation levels, and transactions.
Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 1 of 13
o Multiple users can read or write data simultaneously without conflicts, with DBMS ensuring consistency and
isolation.
5. Data Redundancy
 File System:
o High risk of data redundancy as there is no built-in mechanism to manage duplicate or redundant data.
o Data duplication must be managed manually.
 Database System:
o Redundancy is minimized through normalization and relationships between tables.
o A DBMS helps eliminate unnecessary redundancy while still allowing controlled duplication when needed.
6. Data Security
 File System:
o Basic security features like file permissions, restricting access based on users or groups.
 Database System:
o Advanced security features such as user authentication, encryption, role-based access control, and auditing to
secure sensitive data.
7. Backup & Recovery
 File System:
o Backups are manual, requiring users to copy files to another location or use external software for automation.
o Recovery processes depend on the tools used for backup.
 Database System:
o Provides built-in backup and recovery mechanisms.
o Supports full, incremental, and point-in-time recovery, ensuring minimal data loss in the event of failures.
8. Performance for Large Data
 File System:
o As data grows, file systems can become inefficient due to the lack of indexing or optimization techniques
for fast searching.
o Performance degrades when handling large volumes of data or complex queries.
 Database System:
o Optimized for handling large datasets, supporting indexing, partitioning, and caching for faster data retrieval and
manipulation.
o Suitable for managing complex queries, joining tables, and large data sets efficiently.
9. Use Cases
 File System:
o Suitable for simple data storage like text files, images, videos, and documents.
o Used when no complex relationships between data are required.
 Database System:
o Ideal for applications requiring structured data, complex querying, transactions, and data integrity.
o Commonly used in business applications, e-commerce, customer relationship management (CRM)
systems, and large-scale data analytics.
2. Describe the concept of centralized Vs client/server model.
ANS:
The centralized model and the client/server model are two different architectural approaches for organizing
and managing resources in a networked environment. These models describe how services, data, and processing
tasks are distributed across a system.

1. Centralized Model

The centralized model refers to an architecture where all services, resources, and processing power are located
on a single, central server or system. Clients or end users connect to this central server to access the resources and
services they need.
Characteristics:
 Single Point of Control: The central server handles all processing, data storage, and service management.
 Thin Clients: Clients in a centralized model typically act as simple interfaces or terminals, relying on the
central server for processing.
 Tight Control: Centralized control allows for easier management, security, and resource allocation since all
data and processes are housed in one location.
 Examples:

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 2 of 13
o Early mainframe systems where users accessed applications via terminals connected to a central
mainframe.
o Traditional banking systems with centralized data centers.
Advantages:
 Simplified Maintenance: Since everything is located in one place, it’s easier to maintain, update, and manage
the system.
 Strong Security: With all data residing on one server, security measures can be more easily enforced
and monitored.
 Cost-Efficient for Small Scale: For small organizations, centralizing resources can be cost- effective as
there is no need to distribute hardware or computing resources across many nodes.
Disadvantages:
 Single Point of Failure: If the central server fails, the entire system goes down, disrupting service for
all users.
 Scalability Issues: As more users and demands grow, the central server can become a bottleneck, making it
harder to scale the system efficiently.
 Performance Constraints: A centralized system can become slow if all clients depend on one server for
processing and resources, especially with a large number of users.

2. Client/Server Model
The client/server model is a distributed architecture where services, data, and processing tasks are shared
between servers and client devices. In this model, multiple clients (users or devices) request services from one or
more servers, which respond with the requested resources or data.

Characteristics:
 Division of Labor: The server handles processing, data management, and service provision, while the client can
perform its own local tasks (e.g., UI rendering, local processing).
 Clients and Servers Communicate Over a Network: Clients connect to the server through a network (e.g.,
LAN, WAN, internet) to request services or resources.
 Decentralized Processing: Unlike the centralized model, the client/server model distributes some processing
tasks to the clients, reducing the load on the server.
 Examples:
o Web browsers (clients) accessing websites (servers).
o Email systems where the client (email application) interacts with an email server.
o Modern business applications like ERP or CRM systems.
Advantages:
 Scalability: As the system grows, more servers can be added to handle increased loads, and clients can be
upgraded or replaced without affecting the entire system.
 Better Performance: By distributing some processing tasks to clients, the system can be more efficient, reducing
the load on the server and improving response times.
 Fault Tolerance: The failure of a single client doesn’t affect the rest of the system, and in some cases, servers can
be replicated to avoid single points of failure.

Disadvantages:
 Complexity: The client/server model is more complex to set up and manage because it requires network

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 3 of 13
configuration, server management, and ensuring clients and servers work together efficiently.
 Security Challenges: Distributed systems often require more robust security measures, as data is transmitted
between clients and servers, making them potentially vulnerable to attacks like eavesdropping or man-in-the-
middle attacks.
 Higher Costs: Depending on the scale, setting up multiple servers and managing the network infrastructure can
be expensive.
3. Define DBMS. Explain database users in detail.
ANS: A Database User is defined as a person who interacts with data daily, updating, reading, and modifying the
given data. Database users can access and retrieve data from the database through the Database Management System
(DBMS) applications and interfaces.
Types of Database Users
Database users are categorized based on their interaction with the database. There are seven types of database users
in DBMS. Below mentioned are the types of database users:
1. Database Administrator (DBA)
A Database Administrator (DBA) is a person/team who defines the schema and also controls the 3 levels of the
database. The DBA will then create a new account ID and password for the user if he/she needs to access the
database. DBA is also responsible for providing security to the database and he allows only authorized users to
access/modify the database. DBA is responsible for problems such as security breaches and poor system response
time.
 DBA also monitors the recovery and backup and provides technical support.
 The DBA has a DBA account in the DBMS which is called a system or superuser account.
 DBA repairs damage caused due to hardware and/or software failures.
 DBA is the one having privileges to perform DCL (Data Control Language) operations such as GRANT
and REVOKE, to allow/restrict a particular user from accessing the database.

2. Naive / Parametric End Users


Parametric End Users are the unsophisticated who don’t have any DBMS knowledge but they frequently use the
database applications in their daily life to get the desired results. For example, Railway’s ticket
booking users are naive users. Clerks in any bank is a naive user because they don’t have any DBMS knowledge but
they still use the database and perform their given task.
3. A System Analyst
A system Analyst is a user who analyzes the requirements of parametric end users. They check whether all the
requirements of end users are satisfied.
4. Sophisticated Users
Sophisticated users can be engineers, scientists, business analyst, who are familiar with the database. They can
develop their own database applications according to their requirement. They don’t write the program code but they
interact the database by writing SQL queries directly through the query processor.
5. Database Designers
Data Base Designers are the users who design the structure of database which includes tables, indexes, views,
triggers, stored procedures and constraints which are usually enforced before the database is created or populated
with data. He/she controls what data must be stored and how the data items to be
related. It is the responsibility of Database Designers to understand the requirements of different user groups and then
create a design which satisfies the need of all the user groups.
6. Application Programmers
Application Programmers also referred as System Analysts or simply Software Engineers, are the back- end
programmers who writes the code for the application programs. They are the computer professionals. These programs
could be written in Programming languages such as Visual Basic, Developer, C,
FORTRAN, COBOL etc. Application programmers design, debug, test, and maintain set of programs called “canned
transactions” for the Naive (parametric) users in order to interact with database.
7. Casual Users / Temporary Users
Casual Users are the users who occasionally use/access the database but each time when they access the database
they require the new information, for example, Middle or higher level manager.
8. Specialized users
Specialized users are sophisticated users who write specialized database application that does not fit into the
traditional data-processing framework. Among these applications are computer aided-design systems, knowledge-
base and expert systems etc.
4. How does DBMS provide data abstraction? Explain the concept of data independence?
ANS:
Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 4 of 13
Data Abstraction is one of the most important concepts in DBMS. Data abstraction is the process of hiding
unwanted and irrelevant details from the end user. It helps to store information in such a way that the end user can
access data which is necessary, the user will not be able to see what data is stored or how it is stored in a database.
Data abstraction helps to keep data secure from unauthorized access and it hides all the implementation details.
When you go to purchase clothes from the shop, you go there and see the clothes, you look for the color, size,
material, and company that made those clothes. You are not concerned about where these clothes are made or from
where this material comes. So this is what abstraction of data is in DBMS. You need only specified things, so
abstraction helps to hide irrelevant details and it provides the user with the necessary data only. So in this article, we
are going to see data abstraction in detail.
Levels of Abstraction in DBMS
There are three levels of data abstraction in DBMS that are mentioned below.

Data Abstraction levels in DBMS


 Physical or internal level
 logical or conceptual level
 view or external level
So lets see about each level in detail, first we will physical level.

Physical or Internal Level


It is the lowest level of data abstraction which defines how data is stored in database . It defines data structures used
to store data and methods to access data in database. It is very complex to understand and hence kept hidden from
user. Database administrator decides how and where to store the data in database. Physical level deals with actual
storage details like data organization, disk space allocation and data access methods.

Logical or Conceptual Level


It is intermediate level present next to physical level. It defines what data is present in database and their relationships
between them . It is less complex as compared to physical level. Programmers generally work at this level and
depending on data, structure of tables, relationships and their constraints is decided at this level.

View or External Level


It is the highest level in abstraction. There are different levels of views and each view defines only a part of whole
data required to user. This level defines many views of same database for sim0lication of view to user. This is the
highest level and easiest to understand for user.
5. Explain the structure of Database Management System. With a neat diagram.
ANS:A Database Management System (DBMS) is software that allows users to define, store, maintain, and manage
data in a structured and efficient manner. It acts as an intermediary between data and users, allowing disparate data
from different applications to be managed. A DBMS simplifies the complexity of data processing by providing tools to
organize data, ensure its integrity, and prevent unauthorized access or loss of data. In today’s data-driven world,
DBMS are essential for applications such as banking systems, e-commerce platforms, education, and medical systems.
They not only store and manage large amounts of data, but also provide functionality that provides performance,
security, and scalability for multiple users with multiple access levels.
It also allows access to data stored in a database and provides an easy and effective method of –
Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 5 of 13
 We are defining the information.
 Storing the information.
 Manipulating the information.
 We are protecting the information from system crashes or data theft.
 Differentiating access permissions for different users.

Understanding Data Theft


Data theft means the illicit extraction or manipulation of sensitive information stored in databases, servers, and other
storage systems. This is further defined, in DBMS, as improper access to confidential or sensitive data by
unauthorized persons. This may include information such as personal data, financial records, intellectual property, or
trade secrets. As digital data storage has grown, so has the threat of data theft; it is now a primary priority concern
with serious impacts on organizations worldwide.
Data theft can be carried out by, among others:
 Hacking and exploiting: Attackers can use DBMS security gaps to access unauthorized sensitive data.
 Insider threats: Employees or contractors compromise privileged access to information.
 Phishing and social engineering: These are techniques that will trick the authorized user into revealing the
login credentials to enable intrusion.
 Malware and ransomware attacks: These are malware that make database security vulnerable to attack, thus
giving access to attackers to steal data or lock down data until some amount of ransom is paid.
Data theft prevention is not only an issue in sensitive information matters but also for building trust between
businesses and clients. Controls over access, periodic audits, real-time monitoring of activities done through the
database are effective measures one could consider to reduce the risk. Also, following cyber security protocols and
periodic inundation of database systems will reduce most of the vulnerabilities.
Database Architecture vs. Tier Architecture
Structure of Database Management System is also referred to as Overall System Structure or Database
Architecture but it is different from the tier architecture of Database.
Components of a Database System
Query Processor, Storage Manager, and Disk Storage. These are explained as following below.

Architecture of DBMS
Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 6 of 13
1. Query Processor:
It interprets the requests (queries) received from end user via an application program into instructions. It also executes
the user request which is received from the DML compiler.
Query Processor contains the following components –
 DML Compiler: It processes the DML statements into low level instruction (machine language), so that they
can be executed.
 DDL Interpreter: It processes the DDL statements into a set of table containing meta data (data about data).
 Embedded DML Pre-compiler: It processes DML statements embedded in an application program into
procedural calls.
 Query Optimizer: It executes the instruction generated by DML Compiler.
2. Storage Manager:
Storage Manager is a program that provides an interface between the data stored in the database and the queries
received. It is also known as Database Control System. It maintains the consistency and integrity of the database by
applying the constraints and executing the DCL statements. It is responsible for updating, storing, deleting, and
retrieving data in the database.
It contains the following components –
 Authorization Manager: It ensures role-based access control, i.e,. checks whether the particular person is
privileged to perform the requested operation or not.

 Integrity Manager: It checks the integrity constraints when the database is modified.

 Transaction Manager: It controls concurrent access by performing the operations in a scheduled way that it
receives the transaction. Thus, it ensures that the database remains in the consistent state before and after
the execution of a transaction.

 File Manager: It manages the file space and the data structure used to represent information in the database.

 Buffer Manager: It is responsible for cache memory and the transfer of data between the secondary
storage and main memory.

3. Disk Storage:
It contains the following components:
 Data Files: It stores the data.
 Data Dictionary: It contains the information about the structure of any database object. It is the repository
of information that governs the metadata.
 Indices: It provides faster retrieval of data item.

Levels of DBMS Architecture


The structure of a Database Management System (DBMS) can be divided into three main components: the Internal
Level, the Conceptual Level, and the External Level.

Internal Level:
This level represents the physical storage of data in the database. It is responsible for storing and retrieving data from
the storage devices, such as hard drives or solid-state drives. It deals with low-level implementation details such as
data compression, indexing, and storage allocation.

Conceptual Level:
This level represents the logical view of the database. It deals with the overall organization of data in the database and
the relationships between them. It defines the data schema, which includes tables, attributes, and their relationships.
The conceptual level is independent of any specific DBMS and can be implemented using different DBMSs.

External Level:
This level represents the user’s view of the database. It deals with how users access the data in the database. It allows
users to view data in a way that makes sense to them, without worrying about the underlying implementation details.
The external level provides a set of views or interfaces to the database, which are tailored to meet the needs of specific
user groups.

Schema Mapping in DBMS

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 7 of 13
The three levels are connected through a schema mapping process that translates data from one level to another.
The schema mapping process ensures that changes made at one level are reflected in the other levels.

Role of Database Administrator (DBA)


In addition to these three levels, a DBMS also includes a Database Administrator (DBA) component, which is
responsible for managing the database system. The DBA is responsible for tasks such as database design, security
management, backup and recovery, and performance tuning.

6. What is data independence and how does a DBMS support it? Explain.
ANS:
Data independence is a key feature of a Database Management System (DBMS) that allows changes to be made
to the database schema at one level without affecting the schema at higher levels. It provides the flexibility to
modify the data structure or storage without impacting how users or applications access and interact with the data.

There are two types of data independence in a DBMS:

1. Physical Data Independence


2. Logical Data Independence

1. Physical Data Independence


 Definition: Physical data independence refers to the ability to change the physical storage of data (e.g., file
organization, indexing, compression techniques) without affecting the logical schema or applications that
access the data.
 Explanation: Physical data independence allows the database administrator to change the way data is stored
on disk (e.g., moving from a sequential file to a hashed file) or adjust
storage devices without requiring changes to the database’s logical structure or the programs that use the
database.
 Supported by DBMS:
o DBMS manages physical storage via the storage manager component, which abstracts the details
of file storage and disk access from users and applications.
o Changes to how data is stored (such as changing file formats or reorganizing indexes) can be handled
by the storage manager without altering how users query or update the data.
o The DBMS provides an internal schema (at the physical level), which is hidden from the logical
schema and external views of the data.

2. Logical Data Independence


 Definition: Logical data independence is the ability to change the logical schema (e.g., tables,
relationships, fields) without affecting the external schemas (user views) or application programs.
 Explanation: Logical data independence allows the database designers to modify the logical structure of
the database, such as adding new fields to a table, altering relationships between tables, or even changing
the schema of the database without altering the views that users and applications interact with.
 Supported by DBMS:
o DBMS uses conceptual (logical) and external schemas to provide logical data independence.
o The DBMS separates the logical level (conceptual schema) from the view level (external schema).
Changes to the logical structure (like adding new attributes or tables) can be made without altering
the views or requiring changes to user queries.
o The DBMS supports views and mappings between the conceptual and external schemas, enabling
different user groups to have customized views of the data, independent of changes to the logical
schema.

How DBMS Supports Data Independence:


1. Separation of Schemas:
o DBMS uses a three-schema architecture:
 Internal Schema: Describes the physical storage of data (how the data is stored).
 Conceptual Schema: Describes the logical structure (what data is stored and relationships
between data).
 External Schema: Describes individual user views (how users see the data).
o The separation of these schemas ensures that changes in one schema do not affect the other schemas

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 8 of 13
directly, enabling both physical and logical data independence.
2. Mappings Between Levels:
o DBMS maintains mappings between these schemas to translate between levels of abstraction.
 Mapping between Internal and Conceptual Schemas: Supports physical data
independence by allowing changes in the physical schema without affecting the logical
schema.
 Mapping between Conceptual and External Schemas: Supports logical data independence
by allowing changes in the logical schema without affecting external user views.
3. Query Processing and Optimization:
o The query processor ensures that users can write high-level queries (like SQL) without worrying
about the physical storage details.
o Query optimization ensures that queries are executed in the most efficient way, regardless of how
the data is stored physically, supporting physical data independence.
4. Data Abstraction:
o DBMS provides multiple levels of data abstraction (view level, logical level, and physical level)
that hide the implementation details from users and applications.
o This abstraction ensures that higher-level users and developers work with data in a simplified way,
while the DBMS handles the complexity of data storage and access.
7. List and explain various data models used for database design.
ANS:
A Data Model in Database Management System (DBMS) is the concept of tools that are developed to summarize the
description of the database. Data Models provide us with a transparent picture of data which helps us in creating an
actual database. It shows us from the design of the data to its proper implementation of data.
Types of Relational Models
1. Conceptual Data Model
2. Representational Data Model
3. Physical Data Model
It is basically classified into 3 types:-

Conceptual Data Model


The conceptual data model describes the database at a very high level and is useful to understand the needs or
requirements of the database. It is this model, that is used in the requirement-gathering process
i.e. before the Database Designers start making a particular database. One such popular model is
the entity/relationship model (ER model). The E/R model specializes in entities, relationships, and even attributes that
are used by database designers. In terms of this concept, a discussion can be made even with non-computer
science(non-technical) users and stakeholders, and their requirements can be understood.
Entity-Relationship Model( ER Model): It is a high-level data model which is used to define the data and the
relationships between them. It is basically a conceptual design of any database which is easy to design the view of
data.
Components of ER Model:
1. Entity: An entity is referred to as a real-world object. It can be a name, place, object, class, etc. These are
represented by a rectangle in an ER Diagram.
2. Attributes: An attribute can be defined as the description of the entity. These are represented by Ellipse in
an ER Diagram. It can be Age, Roll Number, or Marks for a Student.
Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 9 of 13
3. Relationship: Relationships are used to define relations among different entities. Diamonds and Rhombus
are used to show Relationships.
Some Other Data Models

Hierarchical Model
The hierarchical Model is one of the oldest models in the data model which was developed by IBM, in the 1950s. In a
hierarchical model, data are viewed as a collection of tables, or we can say segments that form a hierarchical relation.
In this, the data is organized into a tree-like structure where each record consists of one parent record and many
children. Even if the segments are connected as a chain-like structure by logical associations, then the instant structure
can be a fan structure with multiple branches. We call the illogical associations as directional associations.
2. Network Model
The Network Model was formalized by the Database Task group in the 1960s. This model is the generalization of the
hierarchical model. This model can consist of multiple parent segments and these segments are grouped as levels but
there exists a logical association between the segments belonging to any level. Mostly, there exists a many-to-many
logical association between any of the two segments.
3. Object-Oriented Data Model
In the Object-Oriented Data Model, data and their relationships are contained in a single structure which is referred to
as an object in this data model. In this, real-world problems are represented as objects with different attributes. All
objects have multiple relationships between them. Basically, it is a combination of Object Oriented programming and
a Relational Database Model.
4. Float Data Model
The float data model basically consists of a two-dimensional array of data models that do not contain any duplicate
elements in the array. This data model has one drawback it cannot store a large amount of data that is the tables can
not be of large size.
5. Context Data Model
The Context data model is simply a data model which consists of more than one data model. For example, the Context
data model consists of ER Model, Object-Oriented Data Model, etc. This model allows users to do more than one
thing which each individual data model can do.
6. Semi-Structured Data Model
Semi-Structured data models deal with the data in a flexible way. Some entities may have extra attributes and some
entities may have some missing attributes. Basically, you can represent data here in a flexible way.
Advantages of Data Models
1. Data Models help us in representing data accurately.
2. It helps us in finding the missing data and also in minimizing Data Redundancy.
3. Data Model provides data security in a better way.
4. The data model should be detailed enough to be used for building the physical database.
5. The information in the data model can be used for defining the relationship between tables, primary and
foreign keys, and stored procedures.
Disadvantages of Data Models
1. In the case of a vast database, sometimes it becomes difficult to understand the data model.
2. You must have the proper knowledge of SQL to use physical models.
3. Even smaller change made in structure require modification in the entire application.
4. There is no set data manipulation language in DBMS.
5. To develop Data model one should know physical data stored characteristics.
8. Define Schema. Explain Three level schema architecture in DBMS.
ANS :
Schema
 The Skeleton of the database is created by the attributes and this skeleton is named Schema.
 Schema mentions the logical constraints like table, primary key, etc.
 The schema does not represent the data type of the attributes.

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 10 of 13
Details of a Customer

Schema of Customer

Database Schema
 A database schema is a logical representation of data that shows how the data in a database should be stored
logically. It shows how the data is organized and the relationship between the tables.
 Database schema contains table, field, views and relation between different keys like primary key, foreign key.
 Data are stored in the form of files which is unstructured in nature which makes accessing the data difficult. Thus
to resolve the issue the data are organized in structured way with the help of database schema.
 Database schema provides the organization of data and the relationship between the stored data.
 Database schema defines a set of guidelines that control the database along with that it provides information about
the way of accessing and modifying the data.
Types of Database Schemas
There are 3 types of database schema:
Physical Database Schema
 A Physical schema defines, how the data or information is stored physically in the storage systems in the form
of files & indices. This is the actual code or syntax needed to create the
structure of a database, we can say that when we design a database at a physical level, it’s called physical schema.
 The Database administrator chooses where and how to store the data in the different blocks of storage.
Logical Database Schema
 A logical database schema defines all the logical constraints that need to be applied to the stored data, and also
describes tables, views, entity relationships, and integrity constraints.
 The Logical schema describes how the data is stored in the form of tables & how the attributes of a table are
connected.
 Using ER modelling the relationship between the components of the data is maintained.
 In logical schema different integrity constraints are defined in order to maintain the quality of insertion and
update the data.
View Database Schema
 It is a view level design which is able to define the interaction between end-user and database.
 User is able to interact with the database with the help of the interface without knowing much about the stored
mechanism of data in database.

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 11 of 13
and also allows one to access those objects without needing multiple SQL statements for multiple transactions.

UNIT-1
2M Q&A
1. Define Instances and schemas of database.
2. List any two advantages of database systems.
3. Discuss about Data Definition Language.
4. Define Data Abstraction?
5. Discuss about Data Manipulation Language.
6. Explain the disadvantages of file processing system.

1. Define Instances and schemas of database.


ANS: In database management, instances and schemas are two important concepts that represent different
aspects of a database.
1. Instance of a Database:
An instance refers to the actual data stored in the database at a particular moment in time. It is a snapshot of the
database at a given point. Database instances can change frequently as data is added, updated, or deleted.
2. Schema of a Database:
A schema is the structure or blueprint of the database that defines how data is organized. It describes how the data
is stored, the relationships between data, and the constraints that apply to the data. The schema typically includes
tables, fields, data types, indexes, relationships, views, triggers, etc.

2. List any two advantages of database systems


ANS: .
1. Data Integrity and Consistency:

Database systems ensure that data remains accurate, consistent, and reliable across different applications. Integrity
constraints like primary keys, foreign keys, and data validation rules help prevent data anomalies and maintain
consistency. For example, a database system will ensure that no duplicate entries exist for a unique identifier like a
social security number, preserving data accuracy.

2. Data Security:
Database systems provide robust security mechanisms to control access to the data. User permissions and access
levels can be defined to restrict unauthorized users from viewing, modifying, or deleting sensitive data. This
ensures that only authorized individuals or applications can interact with certain parts of the data, enhancing
overall security.

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 12 of 13
3. Discuss about Data Definition Language.

ANS:
Data Definition Language (DDL) is a subset of SQL (Structured Query Language) used to define and manage all
aspects of database structures. It provides commands for creating, modifying, and deleting database objects, such
as tables, indexes, and schemas.
CREATE: To create new tables, indexes, views, or schemas.
ALTER: To modify existing database objects.
DROP: To remove existing database objects.
TRUNCATE: To remove all records from a table while retaining the table structure.

4. Define data abstraction.


ANS:
Data abstraction is a fundamental concept in database systems and programming that involves simplifying complex
data structures by exposing only the necessary details to the user while hiding the underlying complexities. It allows
users to interact with data at different levels without needing to understand how the data is stored or managed
internally.
Benefits of Data Abstraction:
 Simplicity: It reduces the complexity of data management, making it easier for developers and users to
interact with data.
 Flexibility: Users can change the structure or implementation of data storage without affecting their
applications or how they interact with the data.
 Enhanced Security: By limiting access to only the necessary data and hiding the underlying details, data
abstraction can enhance security and protect sensitive information.

5. Discuss about Data Manipulation Language.


ANS:
Data Manipulation Language (DML) is a subset of SQL (Structured Query Language) used for managing and
manipulating data stored in a relational database. DML provides commands that allow users to perform various
operations on the data, including retrieving, inserting, updating, and deleting records.
Common DML Commands:
 SELECT: To query and retrieve data from one or more tables.
 INSERT: To add new records to a table.
 UPDATE: To modify existing records in a table.
 DELETE: To remove records from a table.

6. Explain the disadvantages of file processing system.


ANS:
File processing systems were one of the earliest ways to manage data, where data is stored in flat files. While they
served their purpose in simpler applications, they have several significant disadvantages compared to modern
database management systems (DBMS). Here are some of the key disadvantages of file processing systems:

1. Data Redundancy and Inconsistency:


2. Difficulty in Data Sharing:
3. Poor Data Security:
4. Lack of Data Integrity:
5. Inefficient Data Retrieval:
6. Complexity in Data Management:
7. Lack of Support for Transactions:
8. Limited Scalability:
9. Data Dependency:

Prepared by: Pavan Kumar Ravinuthala, Asst. Prof., Dept. of CSE, PACE ITS, Vallur-523272 Page 13 of 13

You might also like