0% found this document useful (0 votes)
22 views10 pages

Viva Questions

Uploaded by

saniayasmeen004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views10 pages

Viva Questions

Uploaded by

saniayasmeen004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

What is database?

A database is an organized collection of data that is stored and accessed electronically. Databases are designed to
efficiently store, manage, and retrieve large amounts of information.
What are popular database models?
1. Relational Database Model:
• Description: Data is organized into tables (also called relations) consisting of rows and columns. Each
row represents a record, and each column represents an attribute of the record.
• Examples: MySQL, PostgreSQL, Oracle, Microsoft SQL Server.
2. NoSQL Database Models:
• Document Store:
o Description: Data is stored in documents (typically JSON or BSON), which can have a flexible
schema.
o Examples: MongoDB, CouchDB.
Key-Value Store:
o Description: Data is stored as key-value pairs, where each key is unique and maps to a value.
o Examples: Redis, DynamoDB, Riak.
• Column Store:
o Description: Data is stored in columns rather than rows, optimizing read performance for large
datasets.
o Examples: Apache Cassandra, HBase.
• Graph Database:
o Description: Data is stored as nodes and edges, representing entities and their relationships.
o Examples: Neo4j, Amazon Neptune.
3. Hierarchical Database Model:
• Description: Data is organized in a tree-like structure with parent-child relationships. Each child node has
only one parent node.
• Examples: IBM Information Management System (IMS), Windows Registry.
• Use Cases: Used in applications with a clear hierarchical relationship, such as organizational structures
and file systems.
4. Network Database Model:
• Description: Data is organized as a graph structure, allowing multiple parent-child relationships. It is a
more flexible version of the hierarchical model.
• Examples: Integrated Data Store (IDS), CA-IDMS.
Object-Oriented Database Model:
• Description: Data is represented as objects, like object-oriented programming. Objects contain both data
and methods for data manipulation.
• Examples: db4o, ObjectDB.
What is data administrator and database administrator?
Data Administrator (DA)
Role and Responsibilities
Data Governance: Establishing policies and procedures for managing data within the organization, ensuring
data quality, consistency, and compliance with regulations.
Data Modeling: Designing and maintaining the data architecture, including the creation of data models that
define the structure, relationships, and constraints of the data.
Data Security: Implementing and enforcing data security policies to protect sensitive information from
unauthorized access and breaches.
Data Standards: Defining and maintaining data standards, including naming conventions, data definitions,
and metadata management.
Data Quality Management: Ensuring the accuracy, completeness, and reliability of the data by implementing
data validation and cleansing processes.
Coordination: Collaborating with other departments and stakeholders to understand their data needs and
ensuring that data management practices support the organization's goals and objectives.
Skills and Knowledge
1. Understanding of data governance frameworks and best practices.
2. Expertise in data modeling tools and techniques.
3. Knowledge of data security principles and practices.
4. Familiarity with data quality management tools and methodologies.
5. Strong analytical and problem-solving skills.
6. Excellent communication and collaboration skills.
Database Administrator (DBA)
Role and Responsibilities

Database Installation and Configuration: Setting up and configuring database management systems
(DBMS) such as MySQL, PostgreSQL, Oracle, or SQL Server.
Database Maintenance: Performing routine maintenance tasks such as backups, recovery, and patch
management to ensure the database operates smoothly.
Performance Tuning: Monitoring and optimizing database performance to ensure efficient query execution
and response times.
Security Management: Implementing security measures such as access controls, encryption, and auditing to
protect the database from unauthorized access and threats.
Database Design and Implementation: Creating and managing database schemas, tables, indexes, and other
database objects to support application requirements.
Data Recovery: Planning and executing data recovery strategies to protect against data loss and ensure
business continuity.
Troubleshooting: Identifying and resolving database issues, such as performance bottlenecks, connectivity
problems, and data corruption.
User Support: Assisting developers, analysts, and other users with database-related issues and providing
technical support as needed.
Skills and Knowledge

1. Proficiency in DBMS platforms such as MySQL, PostgreSQL, Oracle, or SQL Server.


2. Strong understanding of SQL and database query optimization techniques.
3. Knowledge of database backup and recovery procedures.
4. Familiarity with database security practices and tools.
5. Experience with database performance tuning and monitoring tools.
6. Strong problem-solving and troubleshooting skills.
7. Good communication and interpersonal skills.
Key Differences
Focus
Data Administrator: Focuses on high-level data management, governance, and ensuring data quality and
compliance across the organization.
Database Administrator: Focuses on the technical aspects of managing and maintaining the database
infrastructure, ensuring its performance, security, and availability.
Scope
Data Administrator: Works at an organizational level, dealing with data policies, standards, and
governance.
Database Administrator: Works at a technical level, dealing with the implementation, maintenance, and
optimization of database systems.
Responsibilities
Data Administrator: Involves strategic planning, data architecture, and collaboration with business units.
Database Administrator: Involves hands-on technical work, database setup, performance tuning, and
troubleshooting.
What is database user? what is difference between Naive user and Sophisticated user?
A database user is an individual or a program that interacts with a database system to perform various
operations such as querying, updating, inserting, and deleting data. Database users can be categorized based on
their level of interaction and expertise with the database system.
Types of Database Users
1. End Users: Individuals who interact with the database through applications to perform specific tasks.
They might not have detailed knowledge of the database structure.
2. Database Administrators (DBAs): Professionals responsible for managing and maintaining the database
system, ensuring its performance, security, and availability.
3. Application Programmers: Developers who write applications that interact with the database. They use
SQL and other database programming languages to implement business logic.
4. System Analysts: Professionals who design and model the database according to business requirements.
They work closely with end users and developers to ensure the database meets organizational needs.
What is difference between Naive User and Sophisticated User
Naive User:
• Naive users, also known as casual or end users, interact with the database at a high level, usually through
a graphical user interface (GUI) or predefined reports and queries. They do not require deep technical
knowledge of the database or SQL.
• Characteristics:
1. Use applications to interact with the database.
2. Perform routine tasks like data entry, retrieval, and updates through forms or interfaces.
3. Rely on pre-defined queries and reports created by more advanced users or developers.
4. Limited understanding of the underlying database schema or query languages.
• Example: An employee using a CRM system to update customer information.
Sophisticated User:
• Sophisticated users, also known as power users or advanced users, interact with the database directly using
SQL queries or advanced database tools. They have a deep understanding of the database schema, query
optimization, and often write complex queries to extract specific information.
• Characteristics:
1. Write and execute complex SQL queries.
2. Understand the database schema, relationships, and indexing.
3. Use advanced database features and tools for data analysis and reporting.
4. Often perform data modeling and schema design tasks.
• Example: A data analyst writing custom SQL queries to generate detailed business reports.
Key Differences

Naive User: Interacts through applications and Sophisticated User: Interacts directly with the
interfaces database using SQL and advanced tools
Naive User: Limited understanding of the Sophisticated User: In-depth knowledge of the
database structure and query languages database schema, query optimization, and database
management tools.
Naive User: Routine tasks like data entry, basic Sophisticated User: Complex tasks like custom
retrieval, and updates querying, data analysis, and schema design.
Naive User: Relies on predefined queries and Sophisticated User: Creates and modifies queries
reports and reports as needed.
What is meant by people and procedure?
"People" refers to the various individuals who interact with the database system, each playing a distinct
role to ensure the system's operation, maintenance, and utilization. Key roles include:
Database Administrators (DBAs):
Responsibilities: Managing and maintaining the database system, ensuring its performance, security,
backup, and recovery.
Skills: Knowledge of DBMS, SQL, performance tuning, security protocols, and data integrity.
Database Designers:
Responsibilities: Designing the database schema, defining tables, relationships, constraints, and indexes.
Skills: Data modeling, understanding of normalization, and database design principles.
Application Developers:
Responsibilities: Writing applications that interact with the database, including queries, transactions, and
business logic.
Skills: Proficiency in SQL, programming languages, and understanding of database APIs and drivers.
End Users:
Responsibilities: Using applications to perform tasks such as data entry, querying, and generating reports.
Skills: Basic knowledge of using the application interfaces and understanding the data relevant to their tasks.
Data Analysts:
Responsibilities: Analyzing data, generating insights, and creating reports.
Skills: Advanced SQL, data analysis tools, and understanding of the database schema.
System Administrators:
Responsibilities: Managing the hardware and operating systems on which the database runs.
Skills: Knowledge of system administration, network configuration, and security.
Procedures
"Procedures" refer to the documented methods and processes that guide the interaction with the database
system. These procedures ensure that the database is used consistently and correctly, maintaining data integrity,
security, and performance. Key procedures include:
Backup and Recovery Procedures:
Steps to regularly back up data and restore it in case of data loss or corruption.
Importance: Ensures data availability and business continuity.
Security Procedures:
Measures to protect the database from unauthorized access, including user authentication, authorization,
and encryption.
Importance: Safeguards sensitive data and complies with regulations.
Data Entry Procedures:
Guidelines for entering data into the database to ensure consistency, accuracy, and completeness.
Importance: Maintains data quality and integrity.
Query and Reporting Procedures:
Standards for writing and executing queries and generating reports to ensure efficient data retrieval and
analysis.
Importance: Optimizes performance and ensures relevant data is retrieved.
Maintenance Procedures:
Regular tasks such as indexing, defragmentation, and updates to maintain database performance.
Importance: Keeps the database running smoothly and efficiently.
Change Management Procedures:
Processes for managing changes to the database schema, application code, and infrastructure.
Importance: Ensures changes are tested, documented, and implemented without disrupting operations.
Audit Procedures:
Methods for tracking and logging database access and changes to detect and investigate unauthorized or
suspicious activities.
Importance: Enhances security and compliance.
What is difference between DBMS and RDMS?

DBMS RDBMS
Software for managing databases using various data models A type of DBMS that uses a relational model
(hierarchical, network, etc.). with structured tables (relations).

Highly structured, data stored in tables with


Less structured, file-based storage.
predefined schemas.
Does not enforce normalization rules. Enforces normalization to reduce redundancy.
Supports complex relationships using foreign
Supports simple relationships.
keys and ensures referential integrity.

Strong support for data integrity with keys and


Limited support for data integrity.
constraints.

Suitable for large-scale, complex applications


Suitable for smaller, simpler applications.
requiring robust data management.

Examples: MySQL, PostgreSQL, Oracle,


Examples: File systems, XML databases, IBM IMS.
Microsoft SQL Server.

What is difference between file management system and Database management system?

FMS DBMS
Manages data files on a computer system. Software for managing structured data in
databases.
Individual files. Organized into tables.
Often unstructured or semi-structured. Highly structured with predefined schemas.
Manual navigation through file directories. SQL or other query languages.
High, with possible duplication. Reduced due to normalization.
Limited enforcement mechanisms. Strong enforcement with keys and constraints.
Basic file-level security. Advanced features like role-based access control.
Less scalable, cumbersome with large volumes. Highly scalable and efficient.
Examples: FAT32, NTFS, HFS+, ext4. Examples: MySQL, PostgreSQL, Oracle,
Microsoft SQL Server, MongoDB.
Limited support. Robust support.

What is Entity?
An entity is an object or concept that can be distinctly identified and has a set of attributes that describe it. It is
used to model real-world objects or concepts within a database.
What is a File?
File is a digital container used to store data on a storage medium. Files are a more general concept and can be
used to store various types of data, not necessarily organized in a structured manner like in databases.
What is Attribute?
Attributes are the properties or characteristics of an entity. For example, a "Customer" entity might have attributes
like CustomerID, Name, Address, and PhoneNumber.
What is Tuple?
A tuple is a collection of related data items (values) that represent a single entity instance within a table. Each
value in the tuple corresponds to a specific attribute of the table.
What is cardinality of relation?
Cardinality of a relationship refers to the number of instances of one entity that can or must be associated with
instances of another entity. It describes the nature of the relationship between entities in terms of how many
entities are involved in a particular relationship.
Types of Cardinalities
1. One-to-One (1:1):
o In a one-to-one relationship, each instance of Entity A is associated with exactly one instance of
Entity B, and vice versa.
o Example: A "Person" entity and a "Passport" entity might have a one-to-one relationship if each
person can only have one passport and each passport is assigned to only one person.
2. One-to-Many (1):
o In a one-to-many relationship, each instance of Entity A can be associated with multiple instances
of Entity B, but each instance of Entity B is associated with only one instance of Entity A.
o Example: A "Department" entity and an "Employee" entity where each department can have
multiple employees, but each employee belongs to only one department.
3. Many-to-One (N:1):
o In a many-to-one relationship, multiple instances of Entity A can be associated with one instance
of Entity B, but each instance of Entity B is associated with only one instance of Entity A.
o Example: An "Order" entity and a "Customer" entity where each customer can place multiple
orders, but each order is placed by only one customer.
4. Many-to-Many (M):
o In a many-to-many relationship, multiple instances of Entity A can be associated with multiple
instances of Entity B.
o Example: A "Student" entity and a "Course" entity where students can enroll in multiple courses,
and each course can have multiple students enrolled.
What is ERD?
An Entity-Relationship Diagram (ERD) is a visual representation of the data and the relationships between entities
in a database. It is a crucial tool in database design that helps to model the structure of a database and understand
the data requirements of a system.
Who invented RDBMS?
The concept of the Relational Database Management System (RDBMS) was introduced by Edgar F. Codd.
Codd, an English computer scientist, published his groundbreaking paper titled "A Relational Model of Data for
Large Shared Data Banks" in 1970. This paper outlined the principles of the relational model, which
revolutionized the way data is stored, managed, and queried.
What is functional dependency?
functional dependency is a concept that specifies the relationship between two sets of attributes where one
attribute determines the value of another attribute. It is denoted as X → Y, where the attribute set on the left side
of the arrow, X is called Determinant, and Y is called the Dependent.
Properties of Functional dependency (Armstrong’s axioms)
There are 3 types of Axioms:
1. Reflexivity Axiom:
For a set of attributes A and a subset B of A, if B is a subset of A (B⊆A), then A→B. This axiom
represents a trivial property where a set of attributes implies itself.
2. Augmentation Axiom:
If A→B is true and Y is a set of attributes, then AY→BY is also true. This axiom demonstrates that
adding attributes to dependencies does not alter the fundamental dependencies. If A→B holds, AC→BC
holds for any set of attributes C.
3. Transitivity Axiom:
If A→B holds and B→C holds, then A→C also holds, like the transitive rule in algebra. Functionally, it
means that if A determines B and B determines C, then A determines C. If X→Y and Y→Z are true, then
X→Z is also true.
What is Transitive dependency?
When an indirect relationship causes functional dependency, it is called Transitive Dependency.
If P -> Q and Q -> R is true, then P-> R is a transitive dependency.
What is Normalization?
• Normalization is the process of organizing the data in the database.
• Normalization is used to minimize the redundancy from a relation or set of relations. It is also used to
eliminate undesirable characteristics like Insertion, Update, and Deletion Anomalies.
• Normalization divides the larger table into smaller and links them using relationships.
• The normal form is used to reduce redundancy from the database table.
Reason for Normalization:
The main reason for normalizing the relations is removing these anomalies. Failure to eliminate anomalies
leads to data redundancy and can cause data integrity and other problems as the database grows. Normalization
consists of a series of guidelines that helps to guide you in creating a good database structure.
Data modification anomalies can be categorized into three types:
• Insertion Anomaly: Insertion Anomaly refers to when one cannot insert a new tuple into a relationship
due to lack of data.
• Deletion Anomaly: The delete anomaly refers to the situation where the deletion of data results in the
unintended loss of some other important data.
• Updatation Anomaly: The update anomaly is when an update of a single data value requires multiple
rows of data to be updated.

1NF A relation is in 1NF if it contains an atomic value.

2NF A relation will be in 2NF if it is in 1NF and all non-key attributes are fully functional
dependent on the primary key.

3NF A relation will be in 3NF if it is in 2NF and no transition dependency exists.

BCNF A stronger definition of 3NF is known as Boyce Codd's normal form.

4NF A relation will be in 4NF if it is in Boyce Codd's normal form and has no multi-valued
dependency.

You might also like