Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

Table of Contents

INTRODUCTION TO DATABASES.....................................................................................2
Chapter 1...............................................................................................................................2
Chapter 2...............................................................................................................................2
Chapter 3...............................................................................................................................2
Chapter 4...............................................................................................................................3
Chapter 5...............................................................................................................................3
Chapter 6...............................................................................................................................3
Chapter 7...............................................................................................................................3
Chapter 8...............................................................................................................................3
Chapter 9...............................................................................................................................4
Chapter 10.............................................................................................................................4
Chapter 11.............................................................................................................................4
Chapter 12.............................................................................................................................4
ANSWERS................................................................................................................................5
Chapter 1...............................................................................................................................5
Chapter 2...............................................................................................................................7
Chapter 3...............................................................................................................................9
Chapter 4.............................................................................................................................10
Chapter 5.............................................................................................................................11
Chapter 6.............................................................................................................................12
Chapter 7.............................................................................................................................13
Chapter 8.............................................................................................................................14
Chapter 9.............................................................................................................................15
Chapter 10...........................................................................................................................16
Chapter 11...........................................................................................................................17
Chapter 12...........................................................................................................................20
INTRODUCTION TO DATABASES

Chapter 1

1. What is data?
2. What is information?
3. What is Database?
4. What is a DBMS?
5. What are the Roles/Functions of DBMS?
6. What are the Advantages of DBMS?
7. What are the types of databases?
8. What are the types of databases based on location?
9. What are the types of databases based on its use?
10. What is the difference between data and information?
11. Describe the difference between database and DBMS?

Chapter 2

1. Why Database Design is Important?


2. What is a file?
3. What is a file system?
4. What are the types of file system?
5. What is a field?
6. What is a record?
7. What are the shortcomings of File System Data Management?
8. What is Data Redundancy?
9. What are the types of data anomalies?

Chapter 3

1. Define Entity, Attribute, Relationship and Constraint.


2. What is an Entity Set?
3. What is data model?
4. What is entity relationship model?
5. What is the source of business rules?
Chapter 4

1. What is a Table/Relation?
2. Define Primary Key, Secondary Key, Foreign Key, Candidate key and Composite Key
3. What is referential integrity?
4. What is entity integrity?
5. What are the conditions for selecting a primary key?
6. What is a data dictionary?
7. What is a System Catalogue?
8. What is attribute domain?
9. Why is NULL not favourable when inserting data values?

Chapter 5

1. Explain the types of relationships with example.


2. Explain how to resolve M: N relationship.

Chapter 6

1. What are the types of attributes?


2. What are derived attributes?
3. What are the advantages and disadvantages of derived attributes?
4. What is cardinality?
5. What are weak entities?

Chapter 7

1. What are the types of Relationship Participation?


2. Explain the types of cardinalities.
3. What are the types of relationship Degrees?
4. What are recursive relationships?
5. What are Composite Entities or Associative Entities or Bridge Entities?

Chapter 8

1. What is Normalization?
2. Explain the stages of Normalization.
3. Why do we need Normalization?
4. How to convert to First Normal Form (1NF)?
5. How to convert to Second Normal Form (2NF)?
6. How to convert to Third Normal Form (3NF)?
7. What is partial dependency?
8. What is transitive dependency?

Chapter 9

1. What is DDL? Explain


2. What is DML? Explain
3. What are the two main categories of SQL?
4. Explain the rule of precedence for arithmetic operators.
5. Describe the difference between DDL & DML

Chapter 10

1. What is a virtual table?


2. What are the types of Joins?
3. State the difference between types of Joins

Chapter 11

1. What are the levels of data abstraction?


2. What is EERD?
3. Explain Entity Supertypes and Subtypes.
4. Explain the Key Concepts in the EER Model.

Chapter 12

1. What is the Information System and what is it composed of?


2. What is SDLC?
3. What are the phases of SDLC? Explain
4. What is DBLC?
5. What are the phases of DBLC? Explain
ANSWERS
Chapter 1

1. What is Data?
Data refers to raw, unprocessed facts and figures that are collected from various sources. Data
alone does not have meaning and requires processing to be useful.
2. What is Information?
Information is processed, organized, or structured data that has been given context and
meaning. Information is useful and provides insights for decision-making.
3. What is a Database?
A Database is an organized collection of data that is stored and accessed electronically.
Databases are designed to manage large amounts of data efficiently and allow for data
retrieval, insertion, updating, and deletion. It consists of tables, rows, and columns.
4. What is a DBMS?
A Database Management System (DBMS) is software that provides an interface between the
user and the database. It allows users to create, retrieve, update, and manage data in a
database efficiently. Provides tools for data definition, data manipulation, and data control.
Example: MySQL, Oracle, SQL Server.

5. What are the Roles/Functions of DBMS?


Roles/Functions of DBMS include:

 Data Definition: Defines data structures, such as tables and indexes. Example:
Creating a new table.
 Data Storage, Retrieval, and Update: Stores data, retrieves data as per user queries,
and updates existing data. Example: Inserting new records, updating existing records.
 User Access Management: Manages user permissions and access levels to ensure
data security. Example: Granting or revoking user access.
 Data Integrity Management: Enforces data integrity constraints to ensure data
accuracy and consistency. Example: Primary keys, foreign keys.
 Transaction Management: Ensures that database transactions are processed reliably
and adhere to ACID properties. Example: Handling multiple transactions.
 Backup and Recovery: Provides mechanisms for data backup and recovery to
protect against data loss. Example: Automated backup schedules.
 Data Security: Protects data from unauthorized access and breaches. Example: Data
encryption.
6. What are the Advantages of DBMS?
Advantages of DBMS include:

 Data Integrity and Accuracy: Ensures data accuracy and consistency through
integrity constraints. Example: Primary and foreign key constraints.
 Data Security: Implements security features to protect data. Example: User
authentication and access control.
 Efficient Data Management: Provides efficient storage and retrieval of data.
Example: Indexing for fast search.
 Concurrent Access: Allows multiple users to access data simultaneously. Example:
Locking mechanisms.
 Data Redundancy and Inconsistency Reduction: Minimizes data duplication.
Example: Normalization.
 Data Independence: Separates data from application programs. Example: Schema
changes without affecting applications.
 Backup and Recovery: Robust mechanisms for data backup and recovery. Example:
Automated backups.
7. What are the types of databases?
Database can be classified into two main types: single user and multi-user.

 Single User Database: Databases that supports only one user at a time. Single
User Database can be further classified into a type called Desktop User
Database. Which is a single user database running on a user’s personal computer.
 Multiuser Database: Multiuser Database are the types of Databases that can
support multiple users at the same time. It can be further classified into two
groups:
o Workgroup Database: It is a multi-user database that supports a small
group of users or a single department.
o Enterprise Database: It is a multi-user database that supports a large
group of users or an entire organization.
8. What are the types of databases based on location?
There are two types of databases based on location.

 Centralised Database: Centralised Database supports a database in only one site.


 Distributed Database: It is a type of decentralised database where the data can be
stored across multiple sites.
9. What are the types of databases based on its use?
Two types:

 Transactional: Databases containing data used for day-to-day purpose.


 Warehouse: Used to store historical data. Stores data used to generate information
required to make tactical or strategic decisions.
10. What is the difference between data and information?

Data Information
Raw and unprocessed information Processed data that holds a meaning
Not meaningful or organised Meaningful and organised
Example: 101, John Doe, 5000. Example: Employee ID 101 is John Doe,
and his salary is $5000.
11. Describe the difference between database and DBMS?

Database DBMS
A structured collection of data A software that manages databases
Stores data in tables, rows, and columns. Provides tools for creating, retrieving,
updating, and managing data.
Example: Customer database containing Example: MySQL, Oracle, SQL Server.
customer information.

Chapter 2

1. Why Database Design is Important?


Database design is crucial because it serves as the foundation for ensuring efficient data
management, retrieval, and security. Proper database design is essential for several reasons:

 Data Integrity and Accuracy: Well-designed databases enforce data integrity


constraints, ensuring that data is accurate, consistent, and reliable. Examples: Primary
keys, foreign keys, and unique constraints prevent data anomalies.
 Performance: A good design optimizes database performance, enabling fast data
retrieval and efficient data manipulation. Examples: Proper indexing, normalization,
and query optimization.
 Scalability: Proper design allows the database to handle increasing amounts of data
and users without significant performance degradation. Examples: Partitioning tables,
using appropriate data types.
 Maintenance: A well-structured database is easier to maintain and update, reducing
the time and cost associated with managing the database. Examples: Clear schema
documentation, modular design.
 Security: Good design includes security measures to protect data from unauthorized
access and breaches. Examples: User roles, access controls, and encryption.
 Redundancy Minimization: Proper normalization reduces data redundancy,
minimizing storage costs and ensuring data consistency. Examples: Normal forms to
eliminate duplicate data.
 Ease of Use: A well-designed database is intuitive and easy for users to navigate and
use, improving productivity and user satisfaction. Examples: Logical table structures,
meaningful table and column names.
2. What is a File?
A file is a collection of related data or information that is stored on a computer or storage
device. Files can contain various types of data, including text, images, audio, and software
programs.
3. What is a File System?
A file system is a method and data structure that the operating system uses to control how
data is stored and retrieved on a storage device. Without a file system, data placed in storage
would be one large block with no way to tell where one piece of data ends and the next
begins.
4. What are the Types of File System?
Two types:

 Manual or Physical: Collection of file folders kept in file cabinet


 Electronic: Stored in an electrical device like a computer.

5. What is a Field?
A field is a basic unit of data entry in a database or file system. It represents a specific
attribute or characteristic of an entity. Fields are the columns in a table within a database.
6. What is a Record?
A record is a collection of related fields that represent a single entity or item in a database.
Records are the rows in a table within a database.
7. What are the Shortcomings of File System Data Management?

 Data Redundancy: Duplicate data stored in multiple files leading to increased


storage costs and potential inconsistencies.
 Data Inconsistency: Updates to data in one file may not be reflected in other files,
leading to conflicting data.
 Data Isolation: Data is scattered across multiple files, making it difficult to access
and retrieve related data.
 Lack of Data Integrity: Difficult to enforce data integrity constraints across multiple
files.
 Security Issues: Difficult to enforce security policies and access controls uniformly
across multiple files.
 Concurrency Control: Handling multiple users accessing and modifying data
simultaneously is challenging.
 Scalability: File systems do not scale well with large amounts of data and complex
data relationships.
 Backup and Recovery: Difficult to implement efficient backup and recovery
mechanisms.
8. What is Data Redundancy?
Data Redundancy refers to the unnecessary duplication of data within a database or file
system. It occurs when the same piece of data is stored in multiple places.
9. What are the Types of Data Anomalies?
Data anomalies are problems that arise in a database when data is inserted, updated, or
deleted. They typically occur in poorly designed databases, particularly those that have not
been properly normalized.

 Insertion Anomaly: Occurs when certain attributes cannot be inserted into the
database without the presence of other attributes. Example: Inserting a new employee
without a department because the department information is not yet available.
 Update Anomaly: Occurs when changes to data in one place are not correctly
propagated to other instances of that data. Example: Changing a customer's address
in one table but not updating it in another table where the same address is stored.
 Deletion Anomaly: Occurs when the deletion of data inadvertently causes loss of
additional data that should be retained. Example: Deleting a customer record also
deletes associated order history if stored in the same table.

Chapter 3

1. Define Entity, Attribute, Relationship and Constraint.


Entity: Each row in a database is known as an entity.
Attribute: Each column in a database represents an attribute.
Relationship: It defines how the tables or relations are connected in a database through
entities.
Constraint: Constraints are the conditions or restrictions placed on the attributes of the
databases.
2. What is an Entity Set?
An entity set is a collection of entities of the same type.
3. What is data model?
Data models are representations, usually graphical, of complex real-world data structures that
facilitate interaction among database designers, application programmers, and end-users.
Helps organize data according to various users' views and needs.
4. What is entity relationship model?
Entity relationship model is a model that shows the relationships among different entities in a
database. It is a graphical tool for data modelling.
5. What is the source of business rules?
Policy makers, company managers, written instructions and documents, department
managers, direct interview with end users

Chapter 4

1. What is a Table/Relation?
A Table (or Relation) in a relational database is a structured format for organizing and storing
data. It consists of rows and columns, where each row represents a unique record, and each
column represents a specific attribute of the record.
2. Define Primary Key, Secondary Key, Foreign Key, Candidate key and Composite Key
Primary Key: A unique not null attribute that identifies/represents an entity in a relation.
Secondary key: Secondary Key is an attribute to make the data retrieval process faster, and it
is not necessarily unique or involved in table relationships.
Foreign Key: Foreign Key is a primary key that connects two tables in a database. That
means when a primary key from one table is used in another table to connect the tables, it
becomes a foreign key in that table.
A foreign key is an attribute in one table that links to the primary key in another table. It
establishes a relationship between the two tables.
Candidate key: Candidate key is a potential primary key. Which means any attribute that can
uniquely identify an entity can be called a candidate key and each candidate key qualifies to
be a primary key.
Composite Key: When two or more attributes work together to uniquely identify a record in
a table, then it is called a composite key. It is a primary key composed of more than one
attribute.
3. What is referential integrity?
Referential Integrity is a property of a database that ensures that relationships between tables
remain consistent. It ensures that a foreign key in one table must either be null or match a
primary key in the related table.
Example: In a database with Orders and Customers tables, referential integrity ensures that
every CustomerID in the Orders table must match a valid CustomerID in the Customers table
or be null if allowed.
4. What is entity integrity?
Entity Integrity is a constraint that ensures each table has a primary key, and that the primary
key is unique and not null. This ensures that each record in the table is uniquely identifiable.
5. What are the conditions for selecting a primary key?
Not null, unique, has a simple attribute domain, immutable and stable.
6. What is a data dictionary?
A data dictionary is a repository that contains the metadata about the data stored in a
database.
7. What is a System Catalogue?
A system catalogue is a repository very similar to a data dictionary, which is an organised and
structured collection of metadata about the data stored in a database.

8. What is attribute domain?


An attribute domain is a set of permissible values an attribute can take. It defines the range of
attributes and the constraints for a specific attribute.
9. Why is NULL not favourable when inserting data values?

 Data Integrity Issues: NULL values can indicate missing or unknown data, leading
to incomplete information. Example: If a PhoneNumber column contains NULL
values, it is unclear whether the phone number is missing or simply unknown.
 Query Complications: Queries involving NULL values can be complex and may
require additional handling using IS NULL or IS NOT NULL conditions. Example:
Finding records where the Salary is not null requires a specific condition.
 Aggregations and Calculations: NULL values can affect aggregate functions and
calculations, leading to inaccurate results. Example: Calculating the average salary in
a table with NULL values requires excluding NULLs to get an accurate average.
 Indexing and Performance: NULL values can complicate indexing and may impact
query performance. Example: Indexes may need to handle NULL values separately,
affecting search efficiency.
 Consistency: Having NULL values can lead to inconsistencies in data interpretation.
Example: A NULL Email address could mean the email is not provided, not
applicable, or unknown, leading to ambiguity.

Chapter 5

1. Explain the types of relationships with example.


There are mainly three types of relationship. Such as:
 1:1 Relationships: In a one-to-one relationship, a single record in one table is related
to a single record in another table. For example, an employee table contains
information about employees and a position table contains the position for each
employee. Each employee can have only one position, and one position cannot have
more than one employee either.
 1:M Relationships: In one-to-many relationship, a single record in one table can be
related to multiple records in another table. 1:M is the ideal type of relationship seen
in a database. For example, a table called student has the information of students
name, age etc and another table has course information and course name. One student
can be enrolled in one course only, but many students can be enrolled in one course.
 M:M Relationships: In many-to-many relationships, multiple records in one table
can be related to multiple records in another table. Usually in database, one cannot use
M:M relationships and they need to be broken down into 1:M relationships. For
example, a table containing students’ information and another table containing module
information. Multiple students can have the same module while one student can also
have multiple modules.
2. Explain how to resolve the M: M relationship.
To resolve the M:M relationships, it must be broken down into 1:M relationship using
another table that acts as a bridge between the two tables. The junction table will contain
foreign keys referencing the primary keys of the two original tables.

Chapter 6

1. What are the types of attributes?


Single valued Attributes and Multivalued Attributes. Single-value attribute can have only
a single value. Multivalued attributes can have many values.
2. What are derived attributes?
Derived attributes are the attributes that are not stored in a database and can be obtained from
other attributes through calculation. For example, if there is an attribute called “DateOfBirth”
we can easily get the age using a formula which will be the derived attribute.
3. What are the advantages and disadvantages of strong derived attributes?

 Advantages:
o Storage Efficiency: Reduces storage requirements by not storing redundant
data. Example: Not storing Age separately reduces space as it can be
calculated from DateOfBirth.
o Data Consistency: Ensures consistency since derived attributes are always
calculated from the most current values of other attributes. Example:
TotalPrice always reflects the latest Quantity and UnitPrice.
o Data Integrity: Minimizes the risk of discrepancies between stored values
and calculated values. Example: Calculated Age will always be accurate if
DateOfBirth is correct.
 Disadvantages:
o Performance Overhead: Computation of derived attributes can add
overhead, especially if the calculations are complex or need to be performed
frequently. Example: Recalculating TotalPrice every time it is accessed.
o Complex Queries: Queries may become more complex and slower if many
derived attributes need to be computed on the fly. Example: Complex
calculations involving multiple tables.
o Limited Flexibility: Changes in the underlying attributes or their relationships
may require changes in the derivation logic. Example: If the method of
calculating TotalPrice changes, all queries using this attribute must be updated.
4. What is cardinality?
A cardinality represents the minimum and maximum number of instances of one entity that
can or must be associated with each instance of another entity. For example: 1:1, 1:M, M:M
5. What are weak entities?
A Weak Entity is an entity that cannot be uniquely identified by its own attributes alone. It
depends on a "strong" or "owner" entity to ensure its uniqueness.

Chapter 7

1. What are the types of Relationship Participation?


Mandatory Participation and Optional Participation. Mandatory participation means
every instance of an entity must participate in the relationship. For example, In a relationship
between Students and Enrollments, if every student must enroll in at least one course, the
participation of Students in the Enrollments relationship is total. While Optional Participation
means not every instance of an entity needs to participate in the relationship. In a relationship
between Employees and Dependents, not every employee has dependents, so the participation
of Employees in the Dependents relationship is partial.
2. Explain the types of cardinalities.
There are three types of cardinalities.

 One-to-One (1:1): Each instance of entity A is related to at most one instance of


entity B, and each instance of entity B is related to at most one instance of entity A.
Example: Each person has one passport, and each passport is issued to one person.
 One-to-Many (1): Each instance of entity A can be related to multiple instances of
entity B, but each instance of entity B is related to at most one instance of entity A.
Example: One teacher can teach many students, but each student is taught by only one
teacher.
 Many-to-Many (M): Each instance of entity A can be related to multiple instances of
entity B, and each instance of entity B can be related to multiple instances of entity A.
Example: Students enroll in multiple courses, and each course can have multiple
students.
What are the types of relationship Degrees?
Unary Relationship: Association is maintained within single entity
Binary Relationship: A relationship between instances of two entity types. Most common
type of relationship.
Ternary Relationship: A relationship among instances of three entity types.
Quaternary relationship: A relationship among instances of four entity types.
What are recursive relationships?
Recursive relationships are seen in unary relationships. Recursive Relationships occur when
an entity type is related to itself. This happens when instances of an entity are associated with
other instances of the same entity. An employee supervises another employee. For example:
Attributes: EmployeeID, EmployeeName, SupervisorID (foreign key referencing
EmployeeID).
What are Composite Entities or Associative Entities or Bridge Entities?
Composite Entities (also known as Associative Entities or Bridge Entities) are used to resolve
many-to-many relationships by breaking them into two one-to-many relationships. Composite
entities contain the primary keys of the entities they associate, serving as a bridge between
them.

Chapter 8

1. What is Normalization?
Normalization is a systematic approach to organizing data in a database to reduce redundancy
and improve data integrity. The process involves dividing a database into two or more tables
and defining relationships between them to eliminate redundant data and ensure data
dependencies make sense.
2. Explain the stages of Normalization.
There are three stages of Normalization.
 First Normal Form (1NF): Ensures that the table is in a tabular format, with each
column containing atomic (indivisible) values and each column containing values of a
single type.
 Second Normal Form (2NF): Achieved when a table is in 1NF, and all non-key
attributes are fully functionally dependent on the primary key.
 Third Normal Form (3NF): Achieved when a table is in 2NF and all the attributes
are functionally dependent only on the primary key, eliminating transitive
dependencies.
3. Why do we need Normalization?

 Minimize Redundancy: Reduces duplicate data, saving storage space and preventing
inconsistencies.
 Ensure Data Integrity: Ensures that data dependencies are logical and consistent,
preventing anomalies during data operations.
 Simplify Maintenance: Makes the database easier to maintain and update, as changes
to data are made in one place.
 Improve Performance: Improves query performance by reducing the amount of
redundant data that needs to be processed.
4. How to convert to First Normal Form (1NF)?

 Eliminate Repeating Groups: Ensure that each column contains only atomic values.
 Ensure Single-Valued Attributes: Each column should contain values of a single
type.
 Identify a Primary Key: Choose a primary key that uniquely identifies each record.

5. How to convert to Second Normal Form (2NF)?

 Ensure the Table is in 1NF: The table must already be in 1NF.


 Remove Partial Dependencies: Ensure that all non-key attributes are fully
functionally dependent on the entire primary key.

7. How to convert to Third Normal Form (3NF)?

 Ensure the Table is in 2NF: The table must already be in 2NF.


 Remove Transitive Dependencies: Ensure that non-key attributes are not dependent
on other non-key attributes.
8. What is partial dependency?
Partial Dependency occurs when a non-key attribute is functionally dependent on part of a
composite primary key, rather than on the entire primary key.
9. What is transitive dependency?
Transitive Dependency occurs when a non-key attribute is functionally dependent on another
non-key attribute, which is in turn dependent on the primary key.
Chapter 9

1. What is DDL? Explain


DDL stands for Data Definition Language. It is a key part of SQL that is used to define and
manage the structure of database objects. DDL commands are responsible for creating,
modifying, and deleting database structures but do not manipulate the data contained within
them. Example commands: CREATE, DROP, RENAME, ALTER, TRUNCATE
2. What is DML? Explain
DML stands for Data manipulation Language. This is a part of SQL that can manipulate the
data in a database and its commands are responsible for retrieving, inserting, updating, and
deleting data in the database. Example commands: SELECT, DELETE, INSERT, UPDATE
3. What are the two main categories of SQL?
DDL and DML
4. Explain the rule of precedence for arithmetic operators.
Paratheses, Exponents and Power, Multiplication and Division, Addition and Subtraction
5. Describe the difference between DDL & DML

DDL DML
Defines the data Manipulates the data
Manages database structures Used for managing data within database
structures
Includes commands like CREATE, ALTER, Includes commands like SELECT, INSERT,
DROP, TRUNCATE, and RENAME. UPDATE, and DELETE.

Chapter 10

1. What is a virtual table?


A virtual table, often referred to as a view in SQL, is a result set of a stored query on the data.
Unlike a physical table, a virtual table does not store data itself but dynamically retrieves data
from one or more tables whenever accessed.
2. What are the types of Joins?

 Inner Join: Returns only the rows that have matching values in both tables.
 Left Join: Returns the rows from the left table that matches the value of the right
table.
 Right Join: Returns the value from the right table that matches the value from the left
table.
 Full Join: Returns all the matching values from both tables.
 Cartesian Join: Returns the cartesian product of both tables.
 Self-Join: Joins a table to itself. Used to compare rows within the same table.

3. State the difference between types of Joins

 Inner Join: Returns only the rows that have matching values in both tables.
 Left Join: Returns the rows from the left table that matches the value of the right
table.
 Right Join: Returns the value from the right table that matches the value from the left
table.
 Full Join: Returns all the matching values from both tables.
 Cartesian Join: Returns the cartesian product of both tables.
 Self-Join: Joins a table to itself. Used to compare rows within the same table.

Chapter 11

1. What are the levels of data abstraction?

 External Level (External Model): This is the highest level of abstraction and
represents the end users' view of the data environment.
Purpose: It provides a customized view of the database tailored to the needs of
different user groups. Each external view is a subset of the overall database, showing
only the relevant data for that user or application.
Advantages: Simplifies user interaction with the database by hiding the complexity of
the underlying data structure. Ensures data security by restricting access to certain
data based on user roles. Facilitates application development by providing specific
data views.

 Conceptual Level (Conceptual Model): This level provides a global view of the
entire database as perceived by the organization. It represents the logical structure of
the database, including the relationships between data entities.
Purpose: It serves as a bridge between the external and internal levels of abstraction.
The conceptual model defines what data is stored in the database and how the data is
related.
Characteristics: Independent of the database management system (DBMS) and
hardware platform. Focuses on high-level data structures and relationships, without
detailing the actual storage mechanisms. Mostly represented using the Entity-
Relationship (ER) model.
 Internal Level (Internal Model): This level provides a view of the database as seen
by the DBMS. It describes how data is stored and managed within the database
system.
Purpose: It maps the conceptual model to the physical storage structures used by the
DBMS. The internal model defines the internal schema, which includes detailed
information about data storage, indexing, and access paths.
Characteristics: Dependent on the specific DBMS being used. Includes detailed
definitions of tables, indexes, and other database objects. Manages data integrity,
security, and performance optimization.

 Physical Level (Physical Model): This is the lowest level of abstraction, describing
how data is physically stored on storage media, such as disks or tapes.
Purpose: It deals with the actual implementation of the database, including file
structures, data compression, and data encryption.
Characteristics: Highly dependent on the hardware and software used to implement
the database. Requires a detailed understanding of the physical storage mechanisms
and performance considerations.
2. What is EERD?
The Extended Entity Relationship (EER) Model is an enhancement of the traditional Entity
Relationship (ER) model. It introduces additional semantic constructs to provide more
detailed modeling of data and their relationships. These enhancements help to better capture
the complexities of real-world scenarios.
3. Explain Entity Supertypes and Subtypes.

 Entity Supertype: A generic entity type that is related to one or more subtypes. It
contains attributes that are common to all its subtypes.
 Entity Subtype: A more specific entity type that contains attributes unique to that
subtype.
 Example: In a university database, Person could be an entity supertype with subtypes
Student, Professor, and Staff. Common attributes like Name and Address would be in
Person, while Major might be unique to Student.
4. Explain the Key Concepts in the EER Model.
Entity Supertypes and Subtypes:

 Entity Supertype: A generic entity type that is related to one or more subtypes. It
contains attributes that are common to all its subtypes.
 Entity Subtype: A more specific entity type that contains attributes unique to that
subtype.
 Example: In a university database, Person could be an entity supertype with subtypes
Student, Professor, and Staff. Common attributes like Name and Address would be in
Person, while Major might be unique to Student.
Specialization Hierarchy:
Definition: This hierarchy depicts the arrangement of higher-level supertypes and
lower-level subtypes.
IS-A Relationships: Relationships between supertypes and subtypes are often
described using "IS-A" terminology. For example, a Student IS-A Person.
Levels: Can have multiple levels, where a subtype itself can act as a supertype for
other subtypes.
Attribute Inheritance: Subtypes inherit attributes and relationships from their
supertype.
Inheritance:
Definition: This mechanism allows a subtype to inherit attributes and relationships
from its supertype.
Primary Key Inheritance: All subtypes inherit the primary key attribute from their
supertype, ensuring unique identification across the hierarchy.
Subtype Discriminator:
Definition: An attribute in the supertype that determines to which subtype a particular
instance belongs.
Example: A Person entity might have a Role attribute that indicates whether the
person is a Student, Professor, or Staff.
Disjoint and Overlapping Constraints:
Disjoint Subtypes: Subtypes that contain unique subset of supertype entity set
Example: A person cannot be both a Student and a Professor at the same time.
Overlapping Subtypes: Subtypes that contain nonunique subsets of supertype entity
set.
Example: A person can be both an Alumni and a Donor.
Completeness Constraint:
• Definition: Specifies whether an instance of a supertype must also be a member of at
least one subtype. Specifies whether each entity supertype occurrence must also be
member of at least one subtype.
Partial Completeness: Some instances of the supertype may not belong to any
subtype.
Example: Not all Persons in the university database need to be either Student,
Professor, or Staff.
Total Completeness: Every instance of the supertype must be a member of at least one
subtype.
Example: Every Vehicle must be either a Car, Truck, or Motorcycle.
Specialization and Generalization:
Specialization: A top-down approach where a higher-level entity (supertype) is
divided into lower-level entities (subtypes) based on unique characteristics.
Example: From Employee to Engineer and Manager.
Generalization: A bottom-up approach where lower-level entities (subtypes) are
combined to form a higher-level entity (supertype) based on shared characteristics.
Example: From Savings Account and Checking Account to Account.

Chapter 12

1. What is the Information System and what is it composed of?


An information system is designed to manage data and transform it into useful information
for decision-making. It includes various components that work together to collect, store,
process, and retrieve data. Components of an Information System:

 People
 Hardware
 Software
 Database(s)
 Application Programs
 Procedures

2. What is SDLC?
The SDLC traces the history (life cycle) of an information system. It provides the "big
picture" within which database design and application development can be mapped out and
evaluated. The SDLC is divided into five phases:

 Planning
 Analysis
 Detailed Systems Design
 Implementation
 Maintenance
This process is iterative rather than sequential, meaning that it may go through multiple
cycles before the final system is delivered.
3. What are the phases of SDLC? Explain
Planning: Provides a general overview of the company and its objectives. Initial assessment
of information flow and requirements. Evaluation of alternative solutions, including technical
aspects of hardware and software requirements and system costs.
Analysis: Detailed examination of problems defined during the planning phase. Thorough
audit of user requirements and existing systems. Creation of logical system designs using
tools such as Data Flow Diagrams (DFDs), Hierarchical Input Process Output (HIPO)
diagrams, and Entity Relationship (ER) diagrams. Functional descriptions of system
components.
Detailed Systems Design: Completion of system process designs. Includes technical
specifications and steps for system conversion. Plans for training principles and
methodologies.
Implementation: Installation of hardware, DBMS software, and application programs. Cycle
of coding, testing, and debugging continues until the system is ready for delivery. Creation
and customization of the database, including tables, views, and user authorizations.
Maintenance: Grouped into corrective maintenance (response to errors), adaptive
maintenance (due to changes in the business environment), and perfective maintenance
(system enhancements). Utilizes Computer-Assisted Systems Engineering (CASE) tools for
efficiency.

4. What is DBLC?
The DBLC describes the history of the database within the information system. It involves
several phases, starting from initial study to maintenance.
5. What are the phases of DBLC? Explain
1. Database Initial Study: Understand the organization’s requirements and define the scope
of the database project.
 Analyze company situation.
 Define problems and constraints.
 Define objectives.
 Define scope and boundaries.

2. Database Design: Create a detailed blueprint for the database.


 Create the conceptual design: Develop a high-level model of the database that
shows the main entities and relationships.
 DBMS software selection: Choose the database management system software.
 Create the logical design: Design the logical structure of the database, including
tables, columns, and relationships, without considering the physical aspects.
 Create the physical design: Plan the physical storage and retrieval of data,
considering performance and storage efficiency.
3. Implementation and Loading: Build the database according to the design specifications
and load the data.
 Install the DBMS: Set up the chosen database management system software.
 Create the database(s): Create the database structures (tables, indexes, etc.) as per
the design.
 Load or convert the data: Populate the database with initial data or convert existing
data to the new format.
4. Testing and Evaluation: Ensure the database functions correctly and meets performance
requirements.
 Test the database: Perform tests to check the database for errors and ensure it meets
the specifications.
 Fine-tune the database: Optimize the database for better performance.
 Evaluate the database and its application programs: Assess the database and
associated applications to ensure they meet user requirements.
5. Operation: Use the database in a live environment.
 Produce the required information flow: Ensure the database provides the necessary
information and supports business operations as needed.
6. Maintenance and Evolution: Keep the database up-to-date and improve it as needed.
 Introduce changes: Make necessary updates to adapt to new requirements or fix
issues.
 Make enhancements: Improve the database by adding new features or optimizing
existing ones.

You might also like