Mod 1
Mod 1
1) RDBMS definition:
RDBMS stands for Relational Database Management System. It is a software system that manages
relational databases, which store data in tables with predefined relationships between them.
RDBMS provides a structured and organized way to store, retrieve, and manage data, following the
principles of the relational model. It ensures data integrity, enforces data consistency, and supports
efficient querying and data manipulation.
i) Physical Schema: It defines how the data is physically stored on the storage media such as disks. It
describes the file organization, indexes, and access methods used for efficient data storage and
retrieval.
ii) Logical Schema: It defines the logical structure of the entire database, including the tables,
relationships, and constraints. It specifies the entities, attributes, and their relationships, forming
the conceptual view of the database.
iii) External Schema: It represents the view of the database from the perspective of individual users
or applications. It defines subsets of the logical schema that are relevant to specific users or groups
of users. It provides data abstraction and allows different users to have different views of the same
data.
The schema architecture provides a layer of abstraction and separation between the physical
storage details and the logical representation of data, allowing for flexibility, security, and scalability
in managing the database.
i) Database Design and Schema Management: DBAs are responsible for designing and creating the
logical and physical database schema. They define the structure, relationships, and constraints of
the database objects. They also manage schema changes, ensuring data integrity and optimizing
performance.
ii) Database Security and User Management: DBAs handle user access and permissions, ensuring
that only authorized users have appropriate levels of access to the database. They implement
security measures such as authentication, authorization, and encryption to protect sensitive data.
iii) Database Performance Monitoring and Tuning: DBAs monitor the database performance,
identifying and resolving bottlenecks, optimizing queries, and fine-tuning the database
configuration. They analyze performance metrics, implement indexing strategies, and configure
database parameters to ensure efficient and reliable system performance.
The term "DM" can have multiple interpretations depending on the context. However, assuming
you are referring to the role of a data manager in the context of database management, a data
manager is responsible for overseeing the management, organization, and maintenance of data
within an organization. Their role may include tasks such as data acquisition, data integration, data
quality assurance, data governance, and ensuring data security and privacy. They collaborate with
stakeholders to understand data requirements, develop data management strategies, and
implement data management policies and procedures.
9) Query Language:
A query language is a specialized language used to communicate with a database and retrieve
information from it. It allows users to interact with the database by formulating queries to retrieve,
manipulate, and manage data. One of the most commonly used query languages is SQL (Structured
Query Language), which is used for relational databases. Query languages provide a standardized
syntax and set of commands for performing operations such as: selecting, inserting, updating, and
deleting data in a database.
Metadata:
Metadata refers to data about data. It provides information about the characteristics, structure, and
organization of data. It describes the meaning, format, relationships, and other properties of data
elements. Metadata helps in understanding and managing data effectively. It can include details
such as data types, constraints, indexes, relationships, and access permissions. Metadata is crucial
for data integration, data governance, and ensuring data quality and consistency.
Example: In a database, metadata can include information about tables, columns, data types,
primary keys, foreign keys, and relationships between tables.
Data Dictionary:
A data dictionary is a centralized repository or database that stores metadata about the data in an
organization. It serves as a reference for the definitions, attributes, and properties of data elements.
A data dictionary provides a standardized and consistent view of the data across the organization. It
can be accessed by database administrators, developers, and end-users to understand the
structure, relationships, and usage of data elements within the system.
Example: A data dictionary may contain information about tables, columns, data types, constraints,
indexes, and other database objects. It may also include additional documentation, such as data
usage guidelines and business rules.
12) Procedural and Non-Procedural DML:
Procedural DML:
Procedural DML is a type of data manipulation language that requires users to specify the step-by-
step procedure or sequence of operations to perform data manipulation. In procedural DML, users
explicitly state how to retrieve, insert, update, or delete data from the database. It focuses on the
process or procedure to achieve the desired outcome.
Non-Procedural DML:
Non-procedural DML is a type of data manipulation language that allows users to specify what data
they want to retrieve, insert, update, or delete from the database, without specifying the step-by-
step procedure to achieve it. Non-procedural DML focuses on the desired outcome rather than the
process to achieve it. The database system internally determines the most efficient way to execute
the requested operations.
Example: SQL (Structured Query Language) is a non-procedural DML commonly used in relational
databases. Users specify the data they want to retrieve using SELECT statements without
specifying how to retrieve it.
2) ALTER TABLE:
Modifies the structure of an existing table, such as adding or dropping columns, modifying column
properties, or renaming the table.
3) DROP TABLE: Deletes a table and removes all its data and associated objects from the database.
Attributes:
- Book: ISBN, Title, Publication Year, Genre
- Author: Author ID, Name, Nationality
- Member: Member ID, Name, Address, Email
- Library Branch: Branch ID, Name, Location, Contact
Relationships:
- Book is written by Author (One-to-Many)
- Member borrows Book (Many-to-Many)
- Book is available at Library Branch (Many-to-Many)
You can represent this information using an ER diagram, illustrating the entities, attributes, and
relationships using appropriate symbols and connections.
17) Cardinality Ratio:
Cardinality ratio refers to the relationship between two entities in terms of the number of instances
(occurrences) on each side of the relationship. It indicates how many instances of one entity are
associated with one instance of another entity. Cardinality ratios are commonly represented using
notation such as "1:1" or "1:N" to describe the relationship.
To calculate the cardinality ratio, you need to analyze the nature of the relationship and the
business rules. The ratio is determined by answering the question: "How many instances of Entity A
are related to how many instances of Entity B?"
Example:
Consider the relationship between the entities "Customer" and "Order" in an online shopping
system. Each customer can place multiple orders, but each order is associated with only one
customer. In this case, the cardinality ratio between Customer and Order is "1:N" (one-to-many). It
means that one customer can have multiple orders, while each order is associated with only one
customer.
One-to-One Mapping:
- Example: One student is associated with one student ID.
One-to-Many Mapping:
- Example: One department can have multiple employees, but each employee belongs to only one
department.
Many-to-One Mapping:
- Example: Multiple products are sold by a single vendor.
Many-to-Many Mapping:
- Example: Many students can enroll in multiple courses, and each course can have multiple
students.
20) Total Participation and Partial Participation:
Total Participation:
Total participation is a concept in entity-relationship modelling that indicates that every instance of
one entity type must participate in a relationship. It means that each instance on one side of the
relationship must be associated with an instance on the other side.
Partial Participation:
Partial participation is the opposite of total participation. It allows for instances of one entity type to
exist without participating in a relationship. It means that an instance on one side of the relationship
can be associated with zero or more instances on the other side.
Example: Continuing with the "Department" and "Employee" example, if partial participation is
allowed, it means that a department can exist without any employees, and an employee can exist
without being associated with any department.
In the specialization example, we start with a general entity (Employee) and derive subclasses
(Manager, Engineer, Clerk) based on specific roles or characteristics. Each subclass inherits
attributes and relationships from the Employee superclass, but can also have its own unique
attributes.
In the generalization example, we start with specific entities (Car, Bus, Motorcycle) and create a
superclass (Transportation) to represent common attributes and relationships. The superclass
inherits common attributes and relationships from its subclasses, enabling a higher-level view of the
entities.