0% found this document useful (0 votes)
13 views6 pages

Customer Relationship Management Questions

The document is a question bank for a Database Management System course, covering various topics across six units. It includes questions on differences between file-processing systems and DBMS, data independence, E-R models, SQL queries, normalization, query optimization, and transaction management. Each unit addresses specific concepts, definitions, and practical applications in database systems.
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)
13 views6 pages

Customer Relationship Management Questions

The document is a question bank for a Database Management System course, covering various topics across six units. It includes questions on differences between file-processing systems and DBMS, data independence, E-R models, SQL queries, normalization, query optimization, and transaction management. Each unit addresses specific concepts, definitions, and practical applications in database systems.
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

Database Management System

Question Bank
UNIT – I
1. List four significant differences between a file-processing system and a DBMS
2. What is data independence? Differentiate between physical and logical data
independence.
3. Describe the architecture of Database system and explain each component in the
system.
4. Explain main functions of database administrator.
5. List six major steps that you would take in setting up a database for a particular
enterprise
6. Define and explain following terms associated with E-R model
(i) Entity
(ii) Attribute, single valued, multivalued attributes
(iii) Entity set
(iv) Domain
7. Construct an E-R diagram of a banking environment where in the customer,
borrows a loan from the bank. Reduce the E-R schema to a table.
8. Design an E-R diagram for keeping track of the exploits of your favorite sports
team. You should store the matches played, the score in each match, the players in
each match, and individual player statistics for each match. Summary should be
modeled as derived attributes.
9. Consider a database used to record the marks that students get in different exams
of different course offerings. Construct a E-R diagram that models exams as
entities, and uses a ternary relationship, for the above database
10. Construct an E-R diagram for a car insurance company whose customers own one
or more cars each. Each car has associated with it zero to any number of recorded
accidents.
11. Explain the following terms with proper examples
a. Weak entity set
b. Derived attribute
c. Primary key
d. Aggregation
12. Define the concept of aggregation. Give an example where this concept is useful.

UNIT – II
1. Explain the following joins with suitable example:
i) Inner join ii) Left outer join
iii) Natural inner join iv) Full outer join
2. Let R = (A,B,C) and let r1 and r2 both be relations on R. Give an expression in the
domain relational calculus that is equivalent to each of the following:
i) r1  r2 ii) r1  r2
iii) r1 – r2 iv) A,B (r1)  B,C
3. Let R = (A,B) and S = (A,C) and let r(R) and s(S) be relations. Write relational
expressions equivalent to the following domain-relational calculus expressions:
i) {<a> |  b ( <a,b,c>  r  b = 17)}
ii) {<a, b,c> | <a,b>  r  <a,c>  s}
1. Explain fundamental operations of Relational Algebra.
2. Describe the difference in meaning between the terms relation and relation
schema with example.
6. Explain different join operations in SQL with an example
7. Suppose that we have a relation marks(student-id, score) and we wish to assign
grades to students based on the score as follows: grade F if score < 40, grade C if
40<= score < 60, grade B if 60<= score < 80, and grade S if 80<= score. Write
SQL queries to do the following
a. Display the grade for each student, based on the marks relation
b. Find the number of students with each grade. (7)

8. Consider the employee database where the primary keys are underlined.
Construct the SQL queries for this relational database:
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name, manager-name)
1. Find the names and cities of residence of all employees who work for First Bank
Corporation.
1. Find the name, street, addresses, and cities of residence of all employees who
work for First Bank Corporation and earn more than $10,000.
2. Find all employees in the database who do not work for First Bank Corporation.
3. Assume that the companies may be located in several cities. Find all companies
located in every city in which Small Bank Corporation is located.
4. Find the company that has the most employees.
5. Find those companies whose employees earn a higher salary, on average, than the
average salary at First Bank Corporation.
6. Give all managers of First Bank Corporation a 10-percent raise unless the salary
becomes greater than $100,000; in such cases, give only a 3-percent raise.

UNIT – III
1. What is role? Explain authorization grant graph.
2. Define trigger. Explain need for trigger with example.
3. Consider the following relational database;
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name, manager-name)
Give an SQL DDL definition of this database. Identify referential integrity
constraints that should hold, and include them in DDL definition.
4. Explain different encryption techniques.
5. Define the term Normalization. Why is it necessary to decompose the relation into
several relations? With an example state the anomalies are removed by decompositions
6. Explain with suitable example the concept of functional dependencies and transitive
dependencies..
7. List and explain with a suitable example the pitfalls in relational database design.
8. Explain with appropriate example, a relation is said to be in 1NF, 2NF and 3NF
9. Explain with suitable example a relation is said to be in 2NF, BCNF and DKNF
10. What is encryption list? Explain different encryption techniques
11. Write an SQL trigger to carry out the following action: On delete of an account, for
each owner of the account, check if the owner has any remaining accounts, and if she
does not, delete her from the depositor relation.

UNIT – IV
1) Consider the schema Account(account-number, branch-name, balance) and
Branch(branch-name, branch-city, assets). Give the optimize queries for the following:
a) Write a nested query on the relation account to find for each branch with name
starting with ‘B’, all accounts with maximum balance at the branch.
b) Rewrite the preceding query, without using nested subquery, that is,
decorrelate the query.
2) Describe the steps involved in query processing. Explain the functionality of each step
3) Define materialized view. Give an example explaining view maintenance.
4) What is meant by Query Optimization? How is it achieved?
5) Define external sort. Explain external sort merge algorithm
6) Give and explain Merge Join Algorithm for computing the join operation
7) Explain structure of Query optimization.
8) Explain cost-based optimization.

UNIT – V
1) Describe the ACID properties. Explain the usefulness of each
2) Justify the following statement: Concurrent execution of transaction is more important
when data must be fetched from (slow) disk or when transactions are long, and is less
important when data is in memory and transactions are very short.
3) What is serializability? Explain the distinction between serial schedule and serializable
schedule
4) What is cascadeless schedule? Why is cascadelessness of schedules desirable? Are
there any circumstances under which it would be desirable to allow noncascadeless
schedules? Explain your answer with example
5) How atomicity and durability of a transaction is implemented by the recovery
management?
6) What are the different states that every transaction enters into, and if a transaction
aborts? What action a system initiates?
7) Explain view serializability .
8) List advantages and disadvantages of two-phase locking
9) What is serializability of a schedule and how a conflict of operations are removed?
10) What is deadlock? Under what conditions is it less expensive to avoid deadlock than
to allow deadlock to occur and then to detect them.

UNIT-VI
1) Explain two-phase locking with and example
2) Explain how lock requests are implemented.
3) Consider the following two transactions:
T31: read(A);
read(B);
if A= 0 then B:= B+1;
write(B).

T32: read(B);
read(A);
if B = 0 then A:=A+1;
write(A).
Add lock and unlock instructions to transactions T31 and T32, so that they
observe the two-phase locking protocol. Can the execution of these
transactions result in deadlock?
4) What is deadlock? Explain deadlock detection and recovery.
5) Explain Timestamp-Based protocol
6) Show by example that there are schedules possible under the tree protocol that are
possible under the two-phase locking protocol, and vice-versa
7) Compare the deferred and immediate-modification versions of the log-based recovery
scheme in terms of ease of implementation and overhead cost
8) Draw architecture of remote backup system and explain several issues in designing a
remote backup system.
9) Explain the shadow paging crash recovery technique.
10) Explain multiple granularity mechanism of locking.
11) What are checkpoints? What are the advantages of using checkpoints?
12) Explain log-based recovery scheme deferred database modification

Common questions

Powered by AI

A Database Administrator (DBA) is primarily responsible for ensuring database integrity, security, and availability. Key functions include database design, implementation, management of users and security, monitoring performance, backup and recovery planning, and fine-tuning the database functions. They are also responsible for setting up and testing new database management software before it goes live, and continuously updating the system to meet the needs of the evolving environment .

Aggregation in an E-R model is a higher-level abstraction used to express relationships among relationships, essentially treating a relationship between entities as an entity itself. This is useful in scenarios involving multi-level hierarchies. For example, in modeling a university database, aggregation lets us model a 'research project' involving 'professors' and 'students' by considering the 'project' relationship entity as a standalone entity participating in another relationship, like 'funding' from external organizations. Thus, it simplifies complex database designs and accommodates the representation of inter-relationship constraints .

Functional dependencies form the basis for formalizing relationships among attributes in normalization—the process of organizing database tables to reduce redundancy and improve integrity. A functional dependency between attributes indicates that the value of one attribute is determined by another. In normalization, decomposing relations reduces anomalies. For instance, a relation with attributes {Student ID, Course Code, Instructor} might be prone to update anomalies if instructor names are stored in multiple rows and then changed. By decomposing into two separate tables, one for {Student ID, Course Code} and another for {Course Code, Instructor}, we maintain data integrity and ensure modifications do not lead to anomalies .

Poor relational database design can lead to pitfalls such as redundancy, update anomalies, insertion anomalies, and deletion anomalies. Redundancy leads to unnecessary duplication across tables, consuming space and potentially leading to inconsistencies. An update anomaly occurs when changes in data require modifications to multiple rows, risking inconsistency if not updated synchronously. Insertion anomalies prevent new data insertion due to lack of a complete primary key. Deletion anomalies result in unintended data loss when deleting records. These issues are mitigated through normalization, which organizes attributes across tables to maintain functional dependencies and reduce redundancy. For example, decomposing a single table with many attributes into a well-designed schema can resolve these anomalies .

A SQL trigger is a procedural code that is automatically executed in response to certain events on a particular table or view. Triggers are important for tasks such as enforcing business rules, validating input data, maintaining audit trails, and synchronizing tables. For example, a trigger can be used to automatically log updates to a sensitive field or delete associated records in another table when a record is deleted. In a banking database, a trigger might ensure that transactions remain consistent by checking any modifications to account balances, such as preventing an overdraft before executing a withdrawal .

Query optimization is the process of choosing the most efficient execution strategy for SQL statements. It is crucial because it directly impacts the performance of database operations by minimizing resource usage and speeding up query response time. For large databases, optimized queries reduce the load on system resources. Techniques for optimization may include rewriting queries to leverage efficient access paths, using indexes, and selecting appropriate algorithms for join operations. Additionally, optimization ensures that databases handle complex and large workloads efficiently, improving overall system performance .

Data independence refers to the ability to change the schema at one level of a database system without having to change the schema at the next higher level. There are two types: physical and logical data independence. Physical data independence is concerned with the capacity to change the internal schema without having to change the conceptual schema, thus affecting the physical storage of data only. In contrast, logical data independence involves modifications to the conceptual schema, such as adding new fields or changing data types, without altering existing external schemas or application programs .

In an E-R model, a 'weak entity set' is an entity that cannot be uniquely identified by its own attributes alone and relies on a 'strong entity set' for identification. For example, a 'dependent' entity might be considered weak if it requires the 'employee' entity to which it relates for unique identification . On the other hand, a 'derived attribute' is an attribute that does not exist in the physical database but can be derived or calculated from other stored attributes. For instance, the 'age' of a person can be derived from the 'date of birth' attribute .

The ACID properties refer to Atomicity, Consistency, Isolation, and Durability, which are essential for ensuring reliable transaction processing in database systems. Atomicity ensures that all parts of a transaction are completed; otherwise, it is aborted. Consistency maintains the database state by ensuring that transactions lead the database from one valid state to another. Isolation ensures that transactions operate independently without interference, maintaining correctness notwithstanding concurrent execution. Finally, Durability guarantees that once a transaction is completed, its changes are permanent, even in the event of a system failure. Together, these properties maintain transaction integrity and safeguard the correctness and reliability of databases .

A Database Management System (DBMS) differs from a file-processing system primarily in four areas: data redundancy and inconsistency, data isolation, concurrent access anomalies, and security issues. DBMS reduces redundancy since it integrates various separate files into a single database, addressing redundancy and inconsistency issues. In contrast, a file-processing system isolates data, leading to inconsistencies due to duplicate data . Additionally, DBMS allows multiple users to access the database concurrently without conflicts, whereas file-processing systems may face concurrent access anomalies. Further, DBMS provides a way to enforce data integrity and security, which is typically more challenging in file-processing systems .

You might also like