Database Design can be defined as a set of procedures or collection of tasks involving various steps taken to implement a database.A good database design is important. It helps you get the right information when you need it.
Database Design can be defined as a set of procedures or collection of tasks involving various steps taken to implement a database.A good database design is important. It helps you get the right information when you need it.
Similar to Database Design can be defined as a set of procedures or collection of tasks involving various steps taken to implement a database.A good database design is important. It helps you get the right information when you need it. (20)
Database Design can be defined as a set of procedures or collection of tasks involving various steps taken to implement a database.A good database design is important. It helps you get the right information when you need it.
2. COURSE OBJECTIVES:
• To introduce database development life cycle and conceptual modeling
• To learn SQL for data definition, manipulation and querying a database
• To learn relational database design using conceptual mapping and
normalization
• To learn transaction concepts and serializability of schedules
• To learn data model and querying in object-relational and No-SQL
databases
3. Contd..
1. Database Development Life Cycle & Conceptual Modeling
Simple Explanation:
This is like planning before building a house. You figure out what the database
needs to do, how it will be used, and draw a "blueprint" (called a conceptual
model) of how data will be stored and related.
4. 2. Learning SQL for Data Definition, Manipulation, and Querying
Simple Explanation:
SQL (Structured Query Language) is the language used to talk to databases.
Data definition: Creating tables and structures
Data manipulation: Adding, changing, or deleting data
Contd..
5. 3. Relational Database Design Using Conceptual Mapping & Normalization
Simple Explanation:
This is about designing a clean and efficient database.
Conceptual mapping: Turning your blueprint (model) into real database
tables
Normalization: Organizing data to reduce repetition and avoid errors
Contd..
6. 4. Transaction Concepts and Serializability of Schedules
Simple Explanation:
A transaction is a complete task (like transferring money between bank
accounts).
Serializability means making sure that even if many users use the database at
once, the result is still correct — as if they each used it one after another.
Contd..
7. 5. Data Models and Querying in Object-Relational and NoSQL Databases
Simple Explanation:
Not all databases look like tables:
Object-relational databases are like regular databases but allow more
complex data (e.g., images or videos) and relationships.
NoSQL databases don’t use tables. They're great for big, fast-changing data
like social media or real-time apps.
You’ll learn how to store and get data from these types too.
Contd..
9. After the completion of this course, students will be able to: CO1:Understand
the database development life cycle and apply conceptual modeling
CO2:Apply SQL and programming in SQL to create, manipulate and query the
database
CO3:Apply the conceptual-to-relational mapping and normalization to design
relational database
CO4:Determine the serializability of any non-serial schedule using
concurrency techniques
CO5:Apply the data model and querying in Object-relational and No-SQL
databases.
Contd..
10. CO1: Understand the database development life cycle and apply
conceptual modeling
Simple Explanation:
You will learn how to plan and design a database step-by-step.
Just like an architect designs a building, you’ll learn to draw a data blueprint
before building the actual database.
Contd..
11. CO2: Apply SQL and programming in SQL to create, manipulate, and query
the database
Simple Explanation:
You will be able to use SQL commands to:
Create tables (like making folders)
Insert and update data (like adding or editing files)
Ask questions to the database (called queries) and get useful answers
Contd..
12. CO3: Apply the conceptual-to-relational mapping and normalization to
design relational database
Simple Explanation:
You’ll learn how to turn a paper design into real database tables and then
organize data neatly so it avoids repetition, saves space, and prevents
mistakes.
Contd..
13. CO4: Determine the serializability of any non-serial schedule using
concurrency techniques
Simple Explanation:
You’ll understand how multiple users can safely use a database at the same
time without causing errors — like how ATMs work without mixing up your
balance with someone else’s.
14. CO5: Apply the data model and querying in Object-relational and No-SQL
databases
Simple Explanation:
You will be able to work with modern databases that store complex data
(like images or videos) and big real-time data (like social media posts), and
ask questions (queries) in those systems too.
Contd..
15. Data
Data is a word we hear everywhere nowadays. In general, data is a collection
of facts, information, and statistics and this can be in various forms such as
numbers, text, sound, images, or any other format.
18. What is Database?
A database is an organized collection of data stored electronically. It allows
users and applications to easily access, update, and manipulate information.
This data contains text, numbers, images, videos and more. Databases are
managed using specialized software known as a Database Management
System (DBMS), which facilitates the storage, retrieval, and manipulation of
data.
Databases are fundamental to modern computing, supporting various
applications from online shopping platforms to social media networks.
It is widely used in business, government, healthcare, and many other
sectors to store and manage data, enabling informed decision-making and
efficient operations.
25. Why do we use database
Efficient Data Storage: Databases can store large amounts of data and ensure
it remains accessible and organized.
Facilitate Transactions: They enable smooth transactions in online banking,
shopping, social media, and more by processing and retrieving data in real-
time.
Data Updates: Databases allow for easy and quick updates to data, ensuring
that the most current information is always available.
Data Analysis: Databases provide an excellent framework for analyzing trends
and making data-driven decisions.
26. Applications of Databases
Databases are essential part of our life. There are several everyday activities that involve
our interaction with databases.
Banking: Databases store financial transactions, account information and customer details.
Transportation: Railway stations and airlines use databases to manage bookings, schedules,
and ticketing systems.
Education: Schools use databases to store student records, grades, and class schedules.
Retail: Grocery stores, e-commerce platforms, and other businesses use databases to track
inventory, customer orders, and transactions.
Social Media & Communication: Platforms like WhatsApp, Gmail, and social media
websites use databases to store user data, messages, photos, and interaction history.
Multimedia Databases: With advancements in technology, databases now handle not only
text data but also multimedia files like Images, Audio and Video
Business: They allow businesses to analyze customer behavior, sales trends, and
operational performance, leading to better strategies and decisions.
Data Science: Companies apply data science techniques to the stored data in databases to
identify patterns, make predictions, and optimize business processes.
27. Key Features of DBMS
Data Modeling: Tools to create and modify data models, defining the
structure and relationships within the database.
Data Storage and Retrieval: Efficient mechanisms for storing data and
executing queries to retrieve it quickly.
Concurrency Control: Ensures multiple users can access the database
simultaneously without conflicts.
Data Integrity and Security: Enforces rules to maintain accurate and secure
data, including access controls and encryption.
Backup and Recovery: Protects data with regular backups and enables
recovery in case of system failures.
28. Advantages of DBMS
Data organization: A DBMS allows for the organization and storage of data in a structured
manner, making it easy to retrieve and query the data as needed.
Data integrity: A DBMS provides mechanisms for enforcing data integrity constraints, such as
constraints on the values of data and access controls that restrict who can access the data.
Concurrent access: A DBMS provides mechanisms for controlling concurrent access to the
database, to ensure that multiple users can access the data without conflicting with each
other.
Data security: A DBMS provides tools for managing the security of the data, such as
controlling access to the data and encrypting sensitive data.
Backup and recovery: A DBMS provides mechanisms for backing up and recovering the data
in the event of a system failure.
Data sharing: A DBMS allows multiple users to access and share the same data, which can be
useful in a collaborative work environment.
29. Advantages of DBMS
Disadvantages of DBMS
Complexity: DBMS can be complex to set up and maintain, requiring specialized knowledge
and skills.
Performance overhead: The use of a DBMS can add overhead to the performance of an
application, especially in cases where high levels of concurrency are required.
Scalability: The use of a DBMS can limit the scalability of an application, since it requires
the use of locking and other synchronization mechanisms to ensure data consistency.
Cost: The cost of purchasing, maintaining and upgrading a DBMS can be high, especially for
large or complex systems.
Limited Use Cases: Not all use cases are suitable for a DBMS, some solutions don't need high
reliability, consistency or security and may be better served by other types of data storage.
31. Relational Database Management
System (RDBMS)
RDBMS organizes data into tables (relations) composed of rows and columns.
It uses primary keys to uniquely identify rows and foreign keys to establish
relationships between tables. Queries are written in SQL (Structured Query
Language), which allows for efficient data manipulation and retrieval.
Examples: MySQL oracle, Microsoft SQL Server and Postgre SQL.
32. NoSQL DBMS
2. NoSQL systems are designed to handle large-scale data and provide high
performance for scenarios where relational models might be restrictive. They
store data in various non-relational formats, such as key-value pairs,
documents, graphs or columns. These flexible data models enable rapid
scaling and are well-suited for unstructured or semi-structured data.
Examples: MongoDB, Cassandra, DynamoDB and Redis.
33. 3. Object-Oriented DBMS (OODBMS)
OODBMS integrates object-oriented programming concepts into the database
environment, allowing data to be stored as objects. This approach supports
complex data types and relationships, making it ideal for applications
requiring advanced data modeling and real-world simulations.
Examples: ObjectDB, db4o.
34. 4. Hierarchical Database
A hierarchical database organizes data in a tree-like structure, where each
record (node) has a single parent and can have multiple children. This model
is similar to a file system with folders and subfolders. It is efficient for storing
data with a clear hierarchy, such as organizational charts or file directories.
Navigation is fast and predictable due to the fixed structure. However, it lacks
flexibility and is difficult to restructure or handle complex many-to-many
relationships.
Example: IBM Information Management System (IMS).
35. 5. Network Database
A network database uses a graph-like model to allow more complex
relationships between entities. Unlike the hierarchical model, it permits each
child to have multiple parents, enabling many-to-many relationships. Data is
represented using records and sets, where sets define the relationships. This
model is more flexible than the hierarchical model and better suited for
applications with complex data linkages. However, it can be complicated to
design and maintain.
Example: Integrated Data Store (IDS), TurboIMAGE.
36. Cloud-Based Database
Cloud-based databases are hosted on cloud computing platforms like AWS,
Azure or Google Cloud. They offer on-demand scalability, high availability,
automatic backups and remote accessibility. These databases can be
relational (SQL) or non-relational (NoSQL) and are maintained by cloud service
providers, reducing administrative overhead. They support modern
application requirements, including distributed access and real-time analytics.
Security and data privacy are managed through built-in compliance and
encryption features.
Example: Amazon RDS (for SQL), MongoDB Atlas (for NoSQL), Google BigQuery.
37. Database Languages
Database languages are specialized sets of commands and instructions used to
define, manipulate and control data within a database. Each language type
plays a distinct role in database management, ensuring efficient storage,
retrieval and security of data. The primary database languages include:
38. 1. Data Definition Language (DDL)
DDL is the short name for Data Definition Language, which deals with
database schemas and descriptions, of how the data should reside in the
database.
CREATE: to create a database and its objects like (table, index, views, store
procedure, function and triggers)
ALTER: alters the structure of the existing database
DROP: delete objects from the database
TRUNCATE: remove all records from a table, including all spaces allocated for
the records are removed
COMMENT: add comments to the data dictionary
RENAME: rename an object
39. 2. Data Manipulation Language (DML)
DML focuses on manipulating the data stored in the database, enabling users
to retrieve, add, update and delete data.
SELECT: retrieve data from a database
INSERT: insert data into a table
UPDATE: updates existing data within a table
DELETE: Delete all records from a database table
MERGE: UPSERT operation (insert or update)
CALL: call a PL/SQL or Java subprogram
EXPLAIN PLAN: interpretation of the data access path
LOCK TABLE: concurrency Control
40. 3. Data Control Language (DCL)
DCL commands manage access permissions, ensuring data security by
controlling who can perform certain actions on the database.
GRANT: Provides specific privileges to a user (e.g., SELECT, INSERT).
REVOKE: Removes previously granted permissions from a user.
41. 4. Transaction Control Language (TCL)
TCL commands oversee transactional data to maintain consistency, reliability
and atomicity.
ROLLBACK: Undoes changes made during a transaction.
COMMIT: Saves all changes made during a transaction.
SAVEPOINT: Sets a point within a transaction to which one can later roll back.
42. 5. Data Query Language (DQL)
DQL is a subset of DML, specifically focused on data retrieval.
SELECT: The primary DQL command, used to query data from the database
without altering its structure or contents.
43. Database Environment
One of the primary aims of a database is to supply users with an abstract view
of data, hiding a certain element of how data is stored and manipulated.
Therefore, the starting point for the design of a database should be an
abstract and general description of the information needs of the organization
that is to be represented in the database.
And hence you will require an environment to store data and make it work as
a database. In this chapter, you will learn about the database environment
and its architecture.
44. Contd..
A database environment is a collective system of components that comprise and
regulates the group of data, management, and use of data, which consist of
software, hardware, people, techniques of handling database, and the data also.
Here, the hardware in a database environment means the computers and
computer peripherals that are being used to manage a database, and the
software means the whole thing right from the operating system (OS) to the
application programs that include database management software like M.S.
Access or SQL Server.
Again the people in a database environment include those people who
administrate and use the system. The techniques are the rules, concepts, and
instructions given to both the people and the software along with the data with
the group of facts and information positioned within the database environment.
45. ANSI_SPARC Architecture of the
database system:
An early proposal for a standard terminology and general architecture for
database systems was produced in 1971 by the DBTG (Data Base Task Group)
appointed by the Conference on Data Systems and Languages (CODASYL,
1971). The DBTG recognized the need for a two-level approach with a system
view called the schema and user views called sub-schemas.
46. The levels form a three-level architecture that includes an external, a
conceptual, and an internal level. The way users recognize the data is called
the external level. The way the DBMS and the operating system distinguish
the data is the internal level, where the data is stored using the data
structures and file. The conceptual level offers both the mapping and the
desired independence between the external and internal levels.
48. Levels in the Architecture:
1. External Level (User Views)
Shown at the top with "View 1", "View 2", ..., "View n".
This level represents the user’s view of the database.
Each user sees only the data they need in a customized form.
Different users can have different views (subset of the database).
Example: A sales manager sees sales data, while an HR manager sees employee
records.
49. 2. Conceptual Level (Conceptual Schema)
This is the community view of the entire database structure.
It represents the logical structure of all data in the database.
Independent of how data is stored or how users view it.
Includes relationships, constraints, and data types.
Acts as a bridge between users and the physical data.
50. . Internal Level (Internal Schema)
Deals with how data is physically stored in the system.
Describes the physical structure: files, indexing, compression, etc.
This is managed by the DBMS for optimal storage and retrieval.
51. Physical Data Organization
The actual database (DB) at the bottom.
Data is stored in binary format on storage devices (like HDD, SSD).
52. DBMS Architecture 1-level, 2-Level, 3-Level
Types of DBMS Architecture
There are several types of DBMS Architecture that we use according
to the usage requirements.
1-Tier Architecture
2-Tier Architecture
3-Tier Architecture
53. 1-Tier Architecture
In 1-Tier Architecture, the user works directly with the database on the same
system. This means the client, server and database are all in one application.
The user can open the application, interact with the data and perform tasks
without needing a separate server or network connection.
54. Contd..
A common example is Microsoft Excel. Everything from the user interface to
the logic and data storage happens on the same device. The user enters data,
performs calculations and saves files directly on their computer.
This setup is simple and easy to use, making it ideal for personal or
standalone applications. It does not require a network or complex setup,
which is why it's often used in small-scale or individual use cases.
This architecture is simple and works well for personal, standalone
applications where no external server or network connection is needed.
55. Advantages of 1-Tier Architecture
Below mentioned are the advantages of 1-Tier Architecture.
Simple Architecture: 1-Tier Architecture is the most simple architecture to
set up, as only a single machine is required to maintain it.
Cost-Effective: No additional hardware is required for implementing 1-Tier
Architecture, which makes it cost-effective.
Easy to Implement: 1-Tier Architecture can be easily deployed and hence it is
mostly used in small projects.
56. Disadvantages of 1-Tier Architecture
Limited to Single User: Only one person can use the application at a time.
It’s not designed for multiple users or teamwork.
Poor Security: Since everything is on the same machine, if someone gets
access to the system, they can access both the data and the application
easily.
No Centralized Control: Data is stored locally, so there's no central database.
This makes it hard to manage or back up data across multiple devices.
Hard to Share Data: Sharing data between users is difficult because
everything is stored on one computer.
57. 2-Tier Architecture
The 2-tier architecture is similar to a basic client-server model. The
application at the client end directly communicates with the database on the
server side. APIs like ODBC and JDBC are used for this interaction. The server
side is responsible for providing query processing and transaction
management functionalities.
59. On the client side, the user interfaces and application programs are run. The
application on the client side establishes a connection with the server side to
communicate with the DBMS. For Example: A Library Management System used
in schools or small organizations is a classic example of two-tier architecture.
Client Layer (Tier 1): This is the user interface that library staff or users
interact with. For example they might use a desktop application to search for
books, issue them, or check due dates.
Database Layer (Tier 2): The database server stores all the library records such
as book details, user information and transaction logs.
The client layer sends a request (like searching for a book) to the database layer
which processes it and sends back the result. This separation allows the client to
focus on the user interface, while the server handles data storage and retrieval.
60. Advantages of 2-Tier Architecture
Easy to Access: 2-Tier Architecture makes easy access to the database, which
makes fast retrieval.
Scalable: We can scale the database easily, by adding clients or upgrading
hardware.
Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture and
Multi-Tier Architecture.
Easy Deployment: 2-Tier Architecture is easier to deploy than 3-Tier
Architecture.
Simple: 2-Tier Architecture is easily understandable as well as simple because
of only two components.
61. Disadvantages of 2-Tier Architecture
Limited Scalability: As the number of users increases, the system
performance can slow down because the server gets overloaded with too
many requests.
Security Issues: Clients connect directly to the database, which can make the
system more vulnerable to attacks or data leaks.
Tight Coupling: The client and the server are closely linked. If the database
changes, the client application often needs to be updated too.
Difficult Maintenance: Managing updates, fixing bugs, or adding features
becomes harder when the number of users or systems increases.
62. 3-Tier Architecture
In 3-Tier Architecture, there is another layer between the client and the
server. The client does not directly communicate with the server.
Instead, it interacts with an application server which further communicates
with the database system and then the query processing and transaction
management takes place.
This intermediate layer acts as a medium for the exchange of partially
processed data between the server and the client.
This type of architecture is used in the case of large web applications.
64. Example: E-commerce Store
User: You visit an online store, search for a product and add it to your cart.
Processing: The system checks if the product is in stock, calculates the total
price and applies any discounts.
Database: The product details, your cart and order history are stored in the
database for future reference.
65. Advantages of 3-Tier Architecture
Enhanced scalability: Scalability is enhanced due to the distributed
deployment of application servers. Now, individual connections need not be
made between the client and server.
Data Integrity: 3-Tier Architecture maintains Data Integrity. Since there is a
middle layer between the client and the server, data corruption can be
avoided/removed.
Security: 3-Tier Architecture Improves Security. This type of model prevents
direct interaction of the client with the server thereby reducing access to
unauthorized data.
66. DATABASE ENVIRONMENT
One of the primary aims of a database is to supply users with an abstract
view of data, hiding certain elements of how data is physically stored and
manipulated.
Therefore, the starting point for designing a database should be an abstract
and general description of the information needs of the organization. To do
this, we require an environment capable of storing data and managing it as a
database.
67. VIEWS OF DATA / DATA ABSTRACTION
A major purpose of a database system is to provide users with a simplified,
abstract view of the data. In other words, the system hides internal storage
and maintenance details from users.
68. Disadvantages of 3-Tier Architecture
More Complex: 3-Tier Architecture is more complex in comparison to 2-Tier
Architecture. Communication Points are also doubled in 3-Tier Architecture.
Difficult to Interact: It becomes difficult for this sort of interaction to take
place due to the presence of middle layers.
Slower Response Time: Since the request passes through an extra layer
(application server), it may take more time to get a response compared to 2-
Tier systems.
Higher Cost: Setting up and maintaining three separate layers (client, server
and database) requires more hardware, software and skilled people. This
makes it more expensive.
69. Conceptual Data Modeling
Conceptual Data Modeling is the first step in
database design that focuses on high-level,
abstract representation of organizational data.
It describes what data is stored, what the
relationships are, and what the business rules
are, without worrying about how the data is stored
in a database system.
70. contd..
Definition:
Conceptual Data Modeling is the process of creating
a model that shows the entities, attributes, and
relationships in a domain, representing real-world
objects and their interactions.
71. Main Components:
Component Description
Entity
A real-world object or concept (e.g.,
Student, Book, Order)
Attribute
A property of an entity (e.g., Name,
Date of Birth)
Relationship
Association between entities (e.g.,
Student borrows Book)
72. THREE-SCHEMA ARCHITECTURE
This model separates the database system into three levels, providing data
abstraction and helping manage data independence. The three levels are:
73. Purpose:
To understand the data requirements of an organization.
To communicate business rules and structure clearly to stakeholders (both
technical and non-technical).
To serve as a blueprint for creating logical and physical data models.
74. (i) Internal Level (Physical Level)
Describes how the data is physically stored on the hardware.
Uses physical data models.
Includes details such as:
File structures
Indexing
Access paths
Data blocks and pages
81. What is a Schema in a Database?
A schema is the blueprint or structure of a database. It defines how data is
organized and how the relationships among data are handled.
Formal Definition:
A database schema is the logical design of a database. It describes:
The tables (relations)
The columns (attributes) in each table
The data types
The relationships between tables
Constraints like primary keys, foreign keys, and uniqueness
82. The Database Development Life Cycle (DDLC) is a structured process
followed to design, develop, and maintain a database system. It includes
several stages to ensure that the database meets user requirements, is
efficient, and is scalable.
83. 1. Requirements Analysis
Goal: Understand what data needs to be stored, how it will be used, and
what the users expect.
Activities:
Interview stakeholders (users, managers).
Gather data requirements and constraints.
Define the scope of the database.
Output: Requirement specification document.
85. 3. Logical Design
Goal: Convert the conceptual model into a logical model based on a database
system (e.g., relational).
Activities:
Define tables, columns, keys, and constraints.
Normalize tables to reduce redundancy.
Output: Logical schema (relational model).
86. 5. Implementation
Goal: Create the actual database using a DBMS (e.g., PostgreSQL, MySQL).
Activities:
Execute SQL commands to create the schema.
Load sample or real data.
Write procedures, triggers, views if needed.
Output: Working database.
87. 6. Testing and Evaluation
Goal: Ensure the database works correctly and efficiently.
Activities:
Test queries, reports, constraints, and performance.
Validate data integrity and security.
Output: Tested and validated database.
88. 7. Operation and Maintenance
Goal: Keep the database running and updated.
Activities:
Monitor performance and security.
Back up data regularly.
Update structure or data as needed.
Output: Maintained and updated database system.
89. Example: Library Management System
1. Requirements Analysis
Goal: Understand what data the library needs to store.
Requirements:
Keep records of books, members, and loans.
Each book has a title, author, and ISBN.
Members can borrow multiple books.
Track borrow and return dates.
📝 Output: Requirement Specification Document.
90. 2. Conceptual Design
Goal: Identify entities, attributes, and relationships.
Entities:
•Book (BookID, Title, Author, ISBN)
•Member (MemberID, Name, Email)
•Loan (LoanID, BookID, MemberID, LoanDate, ReturnDate)
Relationships:
•A Member borrows many Books.
•A Book can be borrowed many times.
🧩 Output: ER Diagram.
92. INSERT INTO Book VALUES (1, 'Harry Potter', 'J.K. Rowling', '9780747532743');
INSERT INTO Member VALUES (101, 'Alice', 'alice@example.com');
INSERT INTO Loan VALUES (1, 1, 101, '2025-08-01', NULL);
93. 6. Testing and Evaluation
Goal: Ensure everything works.
•Test queries like:
sql
SELECT Name, Title FROM Loan JOIN Book ON Loan.BookID = Book.BookID JOIN Member ON Loan.MemberID = Member.MemberID;
•Check constraints (e.g., foreign key rules, unique emails).
✅ Output: Verified database.
94. 7. Operation and Maintenance
Goal: Keep the system running.
Schedule backups.
Add new features (e.g., track fines).
Tune queries for performance.
🔄 Output: Updated, reliable system.