ddm-question-bank
ddm-question-bank
ddm-question-bank
QUESTION BANK
UNIT I
18. What is data model? Explain various data models with example?
Ans : There are three main models of data modeling like conceptual, logical, and physical. A
conceptual model is used to establish the entities, attributes, and relationships. A logical data
model is to define the structure of the data elements and set the relationship between them.
Finally, the physical model is used to specify the database-centric implementation of the model.
PART – B
UNIT II
Relational model concepts -- Integrity constraints -- SQL Data manipulation – SQL Data
definition – Views -- SQL programming.
PART – A
4. Domain Constraints
Domain constraints can be violated if an attribute value is not appearing in the corresponding
domain or it is not of the appropriate data type.
Domain constraints specify that within each tuple, and the value of each attribute must be
unique. This is specified as data types which include standard data types integers, real numbers,
characters, Booleans, variable length strings, etc.
Example:
Create DOMAIN CustomerName
CHECK (value not NULL)
5. Key Constraints
An attribute that can uniquely identify a tuple in a relation is called the key of the table. The
value of the attribute for different tuples in the relation has to be unique.
Example:
In the given table, CustomerID is a key attribute of Customer Table. It is most likely to have a
single key for one customer, CustomerID =1 is only for the CustomerName =” Google”.
CustomerID Customer Name Status
1 Google Active
2 Amazon Active
3 Apple Inactive
18. Indexes
An index, as you would expect, is a data structure that the database uses to find records within a
table more quickly. Indexes are built on one or more columns of a table; each index maintains a
list of values within that field that are sorted in ascending or descending order. Rather than
sorting records on the field or fields during query execution, the system can simply access the
rows in order of the index.
PART - B
UNIT -III
PART - A
To test relations to see whether they are legal under a given set of functional dependencies. To
specify constraints on the set of legal relations.
If the original table is decomposed into multiple fragments, then somehow, we suppose to get
all original FDs from these fragments. In other words, every dependency in original table
must be preserved or say, every dependency must be satisfied by at least one decomposed
table.
22) 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.
Each insurance policy covers one or more cars, and has one or more premium payments
associated with it. Each payment is for a particular period of time and has an associated due
date, and the date when the payment was received?
23) Discuss the correspondence between the ER model construct and the relational model
constructs. Show how each ER model construct can be mapped to the relational model.
Discuss the option for mapping EER model construct?
24) Explain in detail about Functional Dependencies? Briefly discuss about the Functional
Dependency Concepts?
25) A car rental company maintains a database for all vehicles in its current fleet. For all
vehicles, it includes the vehicle identification number, license number, manufacturer, model,
date of purchase and color. Special data are included for certain types of vehicles. Trucks:
cargo capacity Sports car: horsepower, renter age requirement Vans: number of passengers
Off-road vehicle: ground clearance,drivetrain(four or two-wheeler drive) Construct an ER
model for the car rental company database.
26) State the need for normalization of a Database and Explain the various Normal Forms
(1st , 2 nd,3rd, BCNF, 4th, 5th and Domain-key) with suitable examples?
(Or)
Exemplify multivalue dependency and fourth normal form (4NF) and join dependency and
fifth 5 3 normal form(5NF) ?
((OR)
What is Normalization? Explain in detail about all Normal Forms
27) Draw E-R diagram for the “Restaurant menu ordering system” that will facilitate the food
items ordering and services with in a restaurant. The entire restaurant scenario is detailed as
follows. The customer is able to view the food items menu, call the waiter, place orders and
obtain the final bill through the computer kept in their table. The waiters through their
wireless tablet PC are able to initializw a table for customer, control the table functions to
assist customers, orders, send orders to food preparation staff(chef) and finalize the customers
bill. The food preparation staffs(chefs), with their touch-display interfaces to the system, are
able to view orders sent to the kitchen by waiters. During preparation, they are able to let the
waiter know the status of each item and can send notifications when items are completed. The
system should have full accountability and logging facilities and should support supervisor
actions to account for exceptional circumstances such as meal being refunded or walked out
on?
28) Explain first normal form, second normal form, third normal form and BCNF with an
example?
TRANSACTION MANAGEMENT
PART – A
1. What is transaction?
Ans : Collections of operations that form a single logical unit of work are Called transactions.
2. Define lock?
Ans : Lock is the most common used to implement the requirement is to allow a Transaction
to access a data item only if it is currently holding a lock on that item
7. Define atomicity?
Ans : Either all operations of the transaction are refl ected properly in the database
Or none are.
8. Define Durability?
Ans : A transaction completes successfully then changes It has made to the
Database persist even if there are system failure.
12. What are the steps followed in Executing read(x) command in Transaction?
Ans : Find the address of the disk block that contains item x.
Copy that disk block in to a buffer in main memory.
Copy that disk block in to a buffer in main memory.
13. What are the steps followed in executing write(x) command in Transaction?
Ans : Find the address of disk block that contain item x.
Copy that disk block into buffer in main memory.
Copy item x from the program variable named x into its correct location
In the buffer
Store the update block from the buffer back to disk.
17. What are the three problems that any concurrency control mechanism must address?
Ans: The three problems are:
The lost update problem
The uncommitted dependency problem
The inconsistent analysis problem
PART – B
Mapping EER to ODB schema – Object identifier – reference types – rowtypes – UDTs –
Subtypes and supertypes – user-defined routines – Collection types – Object Query
Language; No-SQL: CAP theorem – Document-based: MongoDB data model and CRUD
operations; Column-based:Hbase data model and CRUD operations.
PART - A
1. What is NoSQL?
NoSQL, also referred to as “not only SQL”, “non-SQL”, is an approach to database design
that enables the storage and querying of data outside the traditional structures found in
relational databases.
NoSQL Databases are mainly categorized into four types: Key-value pair, Column-
oriented, Graph-based and Document-oriented. Every category has its unique attributes
and limitations. None of the above-specified database is better to solve all the problems. Users
should select the database based on their product needs.
The CAP theorem is a belief from theoretical computer science about distributed data stores
that claims, in the event of a network failure on a distributed database, it is possible to provide
either consistency or availability—but not both.
CAP stands for Consistency, Availability and Partition tolerance. It wants system
designers to make a choice between above three competing guarantees in final design. It's said
that achieving all 3 in system is not possible, and you MUST choose at most two out of three
guarantees in your system. OK.
HBase is a distributed column-oriented database built on top of the Hadoop file system. It
is an open-source project and is horizontally scalable. HBase is a data model that is similar to
Google's big table designed to provide quick random access to huge amounts of structured
data.
HBase architecture has 3 main components: HMaster, Region Server, Zookeeper. The
implementation of Master Server in HBase is HMaster. It is a process in which regions are
assigned to region server as well as DDL (create, delete table) operations.
PART -B
8. What is HBase list out and explain the basic concepts of HBase in detail?
10. What are the data modeling explain the concepts used in MongoDB?