0% found this document useful (0 votes)
20 views23 pages

DBDM 2 Marks

The document provides an overview of database management systems (DBMS), including definitions, advantages, and disadvantages, as well as key concepts like data abstraction, entity-relationship models, and relational models. It covers various aspects of SQL, including data manipulation and definition, integrity constraints, and functional dependencies. Additionally, it discusses normalization, types of anomalies, and the rules for different normal forms.

Uploaded by

rajanayaki
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)
20 views23 pages

DBDM 2 Marks

The document provides an overview of database management systems (DBMS), including definitions, advantages, and disadvantages, as well as key concepts like data abstraction, entity-relationship models, and relational models. It covers various aspects of SQL, including data manipulation and definition, integrity constraints, and functional dependencies. Additionally, it discusses normalization, types of anomalies, and the rules for different normal forms.

Uploaded by

rajanayaki
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/ 23

AD8401 & DATABASE DESIGN AND MANAGEMENT

Two Marks with answers

UNIT-1

1. Define database management system?

Database management system (DBMS) is a collection of interrelated data and a set of programs to
access those data.

Applications of DBMS

a) Banking f) Finance

b) Airlines g) Sales

c) Universities h) Manufacturing

d) Credit card transactions i) Human resources

e) Tele communication

2. What are the disadvantages of file processing system?

The disadvantages of file processing systems are

a) Data redundancy and inconsistency b) Difficulty in accessing data

c) Data isolation d) Integrity problems

e) Atomicity problems f) Concurrent access anomalies

3. What are the advantages of using a DBMS?

The advantages of using a DBMS are a) Controlling redundancy

b) Restricting unauthorized access

c) Providing multiple user interfaces

d) Enforcing integrity constraints.

e) Providing backup and recovery

4. Give the levels of data abstraction?

a) Physical level

b) Logical level

c) View level
5. Define instance and schema?

Instance: Collection of data stored in the data base at a particular moment is called an Instance of the
database.

Schema: The overall design of the data base is called the data base schema.

6. Define the terms

1) Physical schema

2) logical schema.

Physical schema: The physical schema describes the database design at the physical level,

which is the lowest level of abstraction describing how the data are actually stored.

Logical schema: The logical schema describes the database design at the logical level, which

describes what data are stored in the database and what relationship exists among the data.

7. List the components of DBMS.


The major components of database management system are:
 Software
 Hardware
 Data
 Procedures
 Database Access Language
 Users

8. What is an entity relationship model?


The entity relationship model is a collection of objects called entities and relationship among those entities.
An entity is a thing or object in the real world entity.
Notations available in E-R model:
a. Entity sets.
b. Relationship sets
c. Attributes.

9. Define the terms i) Entity type ii) Entity set

Entity type: An entity type defines a collection of entities that have the same attributes.

Entity set: The set of all entities of the same type is termed as an entity set.
10. What are attributes? Give examples.

An entity is represented by a set of attributes. Attributes are descriptive properties possessed by

each member of an entity set.

Example: possible attributes of customer entity are customer name, customer id, Customer

Street, customer city.

Types of attributes
o Simple
o Composite
o Single-valued
o Multi-valued
o Derived

11. Define single valued and multivalued attributes.

Single valued attributes: attributes with a single value for a particular entity are called single

valued attributes.

Multivalued attributes : Attributes with a set of value for a particular entity are called

multivalued attributes.

12. Define weak and strong entity sets?

Weak entity set: entity set that do not have key attribute of their own are called weak entity sets.

Strong entity set: Entity set that has a primary key is termed a strong entity set.

13. Explain the two types of participation constraint.

• Total: The participation of an entity set E in a relationship set R is said to be total if every

entity in E participates in at least one relationship in R.

• Partial: if only some entities in E participate in relationships in R, the participation of entity set

E in relationship R is said to be partial.

14. What does the cardinality ratio specify?

Mapping cardinalities or cardinality ratios express the number of entities to which another entity

can be associated. Mapping cardinalities must be one of the following:

• One to one
• One to many

• Many to one

15. What is relationship? Give examples

A relationship is an association among several entities.

Example: A depositor relationship associates a customer with each account that he/she has.

Part-B

1. What are the Components of Database System Environment?


2. Explain Database System Development Lifecycle with neat sketch
3. Write short notes on Entity-Relationship model.
Create ER diagram for ATM management system, College management system
4. Explain Enhanced-ER model with neat diagram.
5. Explain in detail about UML Class diagram. Create a UML diagram for ATM machine,
Library management system
UNIT-2

Part-A

1. What is Relational Model.


The relational model represents the database as a collection of relations. A relation is a table of values.
Every row in the table represents a collection of related data values.

These rows in the table denote a real-world entity or relationship. Each column of the table corresponds to
an attribute of the relation.

Relational model uses a collection of tables to represent both data and the relationships among those data.
The relational model is an example of a record based model.

Advantages of Relational Model


 Simplicity:
 Structural Independence:
 Easy to use:
 Query capability:
 Data independence:
 Scalable:
2. List some of the relational model concepts.
1. Attribute: Each column in a Table. Attributes are the properties which define a relation.

e.g., Student_Rollno, NAME,etc.


2. Tables – In the Relational model the, relations are saved in the table format. It is stored along with its
entities. A table has two properties rows and columns.
Rows represent records and columns represent attributes.
3. Tuple – It is a single row of a table, which contains a single record.
4. Relation Schema: A relation schema represents the name of the relation with its attributes.
5. Degree: The total number of attributes which in the relation is called the degree of the relation.

3. Define the term relation, tuple variable, Domain.

The relation represents the associations among the attributes of an entity as well as the relationship among
different entities. Relation is a subset of a Cartesian product of list domains.

Tuple variable is a variable whose domain is the set of all tuples.

For each attribute there is a set of permitted values called the domain of that attribute.
4. List some relational integrity constraints.
Integrity constraints ensures that changes made to the database by authorized user do not result in a loss of
data consistency. Thus Integrity constraints guard against accidental damage to the database
1. Domain Constraints
2. Key constraints
3. Referential integrity constraints

5. Define the terms i) DDL ii) DML

DDL: Data base schema is specified by a set of definitions expressed by a special language

called a data definition language.

DML:

A data manipulation language is a language that enables users to access or manipulate data as organized by
the appropriate data model

6. Define Data Manipulation Language.


A data manipulation language (DML) is a set of commands permitting users to
manipulate data in a database. This manipulation involves inserting data into
database tables, retrieving existing data, deleting data from existing tables and
modifying existing data.
7. List the DML commands in SQL.
SELECT: This command is used to retrieve rows from a table.
syntax: SELECT [column name(s)] from [table name] where [conditions].
UPDATE: This command modifies data of one or more records.
syntax: UPDATE table name SET column name = value where [condition].
INSERT: This command adds one or more records to a database table.
syntax: INSERT INTO table name [column(s)] VALUES [value(s)].
DELETE: This command removes one or more records from a table according to specified conditions.
syntax: DELETE FROM table name where [condition]

8. List the relational algebraic operations.


• Basic operators: select, project, union, set difference, Cartesian product
• Derived operators: set intersection, division, join

9. Define a primary key.


A column in a table whose values uniquely identify the rows in the table. A primary key value cannot be
NULL to matching columns in other tables
10. What is a Foreign key?
A column in a table that does not uniquely identify rows in that
table, but is used as a link to matching columns in other tables.

11. What is a super key?

A super key is a set of one or more attributes that collectively allows us to identify uniquely an entity in the

entity set.

12. What is a candidate key?

Minimal super keys are called candidate keys.

Superkeys for which no proper subset is a super key. Such minimal superkeys are called candidate keys or

primary keys

13. Define View.


A view is a virtual or logical table composed of the result set of SQL statement.

A view also contains rows and columns.


Changing the data in a view alters the data stored in the database

To create the view, we can select the fields from one or more tables present in database.
A view can either have specific rows based on certain condition or all the rows of a table.

Syntax:
CREATE VIEW view_name AS
SELECT column1, column2.....
FROM table_name
WHERE condition;

14. Define SQL


Structured Query Language (SQL) is a language that provides an interface to relational database systems.
It was developed by IBM in the 1970s.

Structured Query Language (SQL) is database language which can perform certain operations on existing
database and also we can use this language to create a database.

Features of SQL language


The SQL language h as several parts:
data - definition language
Data manipulation language
View definition
Transaction control
Embedded SQL
Integrity
Authorization

15. What are the categories of SQL


command?
SQL commands are divided in to the
following categories:
1. DDL – Data Definition Language
2. DQL – Data Query Language
3. DML – Data Manipulation Language
4. DCL – Data Control Language
5. TCL – Transaction Control Language

16. What are the three classes of SQL expression?


SQL expression consists of three clauses:
Select
From
Where

17. Define Triggers.


A trigger is a statement that is executed automatically by the system as a side effect of a modification to
the database. To design a trigger mechanism, we must meet two requirements:
1. Specify the conditions under which the trigger is to be executed.
2. Specify the actions to be taken when the trigger executed

Part-B

1. Explain SQL Data Manipulation in Detail.


2. Explain SQL Data Definition in Detail.
3. Define Integrity constraints. List out the various Integrity constraints.
4. Illustrate the Concept of SQL Procedures and Functions
5. Explain about SQL views in Detail.
Unit-3
Part-A

1.What are Amstrong axioms? Write the rules.

Axioms or Inference rules provide a simpler technique can apply to a set of FD(functional
dependency) to derive other FD. The Inference rule are Armstrong's axioms, used to conclude functional
dependencies on a relational database.

Inference rules:

Reflexive Rule (IR1)

If X ⊇ Y then X → Y

Augmentation Rule (IR2)

If X → Y then XZ → YZ

Transitive Rule (IR3)

If X → Y and Y → Z then X → Z

Union Rule (IR4)

If X → Y and X → Z then X → YZ

Decomposition Rule (IR5)

If X → YZ then X → Y and X → Z

Pseudo transitive Rule (IR6)

If X → Y and YZ → W then XZ → W

2.What is meant by functional dependency? List out the types

The functional dependency is a relationship that exists between two attributes i.e. the primary key and non-
key attribute within a table.

FD: X → Y

Left side of FD is known as a determinant, Right side of production is known as a dependent.

Primary Key for a table is the column or a group of columns (composite key) which can uniquely identify
each record in the table. This is called Functional Dependency.

Functional dependency can be written as:

Emp_Id → Emp_Name

i.e.Emp_Name is functionally dependent on Emp_Id.


Types of Functional dependencies in DBMS:

1. Trivial functional dependency

2. Non-Trivial functional dependency

3. Multivalued functional dependency

4. Transitive functional dependency

3. What is meant by computing the closure of a set of functional dependency?


+ The closure of F denoted b y F is the set of functional dependencies logically implied by F.

4. Define relational decomposition. List out the desirable properties of decomposition

 Lossless-join decomposition
 Dependency preservation
 Repetition of information

5.What meant by trivial dependency?

A → B has trivial functional dependency if B is a subset of A.

In Trivial Functional Dependency, a dependent is always a subset of the determinant.

i.e. If X → Y and Y is the subset of X, then it is called trivial functional dependency

For example,

roll_no name age

42 abc 17

43 pqr 18

44 xyz 18

6.Define Non-Trivial functional dependency

A → B has a non-trivial functional dependency if the dependent B is not a subset of determinant A.

Example:

1. ID → Name,

2. Name → DOB

i.e. If X → Y and Y is not a subset of X, then it is called Non-trivial functional dependency.


For example,

roll_no name age

42 abc 17

43 pqr 18

44 xyz 18

roll_no → name is a non-trivial functional dependency, since the dependent name is not a subset of

determinant roll_no

7.Define Multivalued functional dependency

In Multivalued functional dependency, entities of the dependent set are not dependent on each other.

i.e. If a → {b, c} and there exists no functional dependency between b and c, then it is called a
multivalued functional dependency.

For example,

roll_no name age

42 abc 17

43 pqr 18

44 xyz 18

roll_no → {name, age} is a multivalued functional dependency, since the dependents name & age are not
dependent on each other

8.Define Transitive functional dependency

In transitive functional dependency, dependent is indirectly dependent on determinant. i.e. If a → b&b →


c, then according to axiom of transitivity, a → c. This is a transitive functional dependency

For example,

enrol_no name dept building_no

42 abc CO 4

43 pqr EC 2

44 xyz IT 1

45 abc EC 2
9.What is Transitive Dependency?

When a non-prime attribute depends on other non-prime attributes rather than depending upon the
prime attributes or primary key. This is Transitive Dependency

10.What is Partial Dependency?

An attribute in a table depends on only a part of the primary key and not on the whole key.

This is Partial Dependency

Partial Dependency exists, when for a composite primary key, any attribute in the table depends
only on a part of the primary key and not on the complete primary key.

11.Define Minimal Cover.

A Minimal Cover E is a minimal set of functional dependencies F

A Minimal Cover is a simplified and reduced version of the given set of functional dependencies

Steps to Find Minimal Cover

1) Split the right-hand attributes of all FDs. Example A->XY => A->X, A->Y

2) Remove all redundant FDs. Example { A->B, B->C, A->C } Here A->C is redundant

3) Find the Extraneous attribute and remove it.

12.What is meant by normalization of data?

It is a process of analyzing the given relation schemas based on their Functional Dependencies

(FDs) and primary key to achieve the properties

Ø Minimizing redundancy

Ø Minimizing insertion, deletion and updating anomalies

13. Define Anamolies. Write its types. How it will be reduced in a databases?

Anamolies are data redundancy(repetition) and data inconsistencies. If a table is not properly normalized and
have data redundancy then it takes extra memory space, difficult to handle and update the database

Types of Anamolies:

Insertion,

Updation and

Deletion Anomalies are very frequent if database is not normalized.

Anamolies will be reduced in a databases by the process of normalization


14.What is First Normal Form? State the rules for 1NF
The domain of attribute must include only ATOMIC VALUES.

For a table to be in the First Normal Form, it should follow the following rules:

1. It should only have atomic (single, indivisible) values.

2. Values stored in a column should be of the same domain

3. All the columns in a table should have unique names

15.What is Second Normal Form? Give the Rules of 2NF

A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally
dependent on primary key.

Rules of 2NF

For a table to be in the Second Normal Form,

1. It should be in the First Normal form.

2. And, it should not have Partial Dependency

16.What is Third Normal Form? Give the Rules of 3NF

A table is said to be in the Third Normal Form when,

1. It is in the Second Normal form.

2. And, it doesn't have Transitive Dependency

17.Define BCNF. Give an Example


A relation schema R is in BCNF with respect to a set F of FD’s if for all FD’s of the form A -> B, where
A is contained in R and B is contained in R, at least one of the following holds:

 R must be in 3rd Normal Form

 A -> B is a trivial FD

 for X → Y , X should be a super Key i.e.,X is a superkey for schema R.

Part-B
1. Define Normalization. Elaborate the various normal forms in detail.
2. Define Functional Dependency. Classify its types in detail.
3. Elaborate the steps involved in mapping of an ER Model-to-Relational Model.
4. State the Properties of relational decomposition
UNIT-4

Part-A

1, What are the ACID properties?

ACID Property is a set of properties that guarantee database transactions are processed reliably.

ACID Means Atomicity, Consistency, Isolation, Durability

2, Define Transaction. Write the Properties of transaction

Transaction is a set of logically related operation. A transaction is an action or series of actions.

It is performed by a single user to perform operations for accessing the contents of the database.

Properties of transaction

The properties o f transactions are:

 Atomicity

 Consistency

 Isolation

 Durability

2. What are the states of transaction? Draw the State Diagram.

The states of transaction are

Ø Active

Ø Partially committed

Ø Failed

Ø Aborted

Ø Committed

Ø Terminated
3, What are the two operation access data in transaction?
Read(x)- transfer data item x from database.
Write(x)- transfer data item x from the local buffer

4, What are the steps followed in Executing Read(x) and Write(x) in transaction

Steps followed in Executing Read(x) in transaction

1. Find the address of the disk block that contains item x.


2. Copy that disk block in to a buffer in main memory.
3. Copy item x from the buffer to the program variable named x.

Steps followed in executing write(x) command in transaction


1. Find the address of disk block that contain item x.
2. Copy that disk block into buffer in main memory.
3. Copy item x from the program variable named x into its correct location in the buffer
4. Store the update block from the buffer back to disk.

5. Define Schedule. Write its types

Schedule is the order in which instructions are executed in the system.

A series of operation from one transaction to another transaction is known as schedule. It is used to
preserve the order of the operation in each of the individual transaction

Types of Schedule:

1. Serial
2. Non-Serial
3. Serializable
 Conflict Serializable
 View Serializable

6.Define Serializable schedule

 Serializability of schedules is used to find non-serial schedules that allow the transaction to execute
concurrently without interfering with one another.
 It identifies which schedules are correct when executions of the transaction have interleaving of
their operations.
 A non-serial schedule will be serializable if its result is equal to the result of its transactions
executed serially.

7. Define serializability. What are the two types of serializability

Any schedule produced by concurrent processing of set of transaction will have an effect equivalent to a
schedule produce when these transaction are rule serially is some order of guarantees this called
seralizability

Types of serializability

The two types of serializability is

 Conflict serializability

 View serializability

8. When two operation in schedule are said to be conflict?


i) Two operation belong to different transaction
ii) Two operation access the same item x
iii) At least one of the operation is write-item(x)

9. How to find the schedule is conflict serialization or non using procedure graph?
The graph has a cycle then schedules not conflictserialization if the graph
contain no cycle thee schedule is conflict serialization.
If a precedence graph contains a single edge Ti → Tj, then all the instructions of Ti are executed before
the first instruction of Tj is executed.

If a precedence graph for schedule S contains a cycle, then S is non-serializable. If the precedence graph
has no cycle, then S is known as serializable.

10. Define Serialization Graph. Write the conditions for drawing the graph.

Serialization Graph is used to test the Serializability of a schedule. For schedule S, we construct a
graph known as precedence graph.

This graph has a pair G = (V, E), where V consists a set of vertices, and E consists a set of edges. The
set of vertices is used to contain all the transactions participating in the schedule. The set of edges is
used to contain all edges Ti ->Tj for which one of the three conditions holds:

1. Create a node Ti → Tj if Ti executes write (Q) before Tj executes read (Q).


2. Create a node Ti → Tj if Ti executes read (Q) before Tj executes write (Q).

3. Create a node Ti → Tj if Ti executes write (Q) before Tj executes write (Q)

11.Define Conflict Serializable Schedule

Conflict Serializable Schedule

A schedule is called conflict serializability if after swapping of non-conflicting operations, it can


transform into a serial schedule.

The schedule will be a conflict serializable if it is conflict equivalent to a serial schedule.

12.Define View Serializability

A schedule will view serializable if it is view equivalent to a serial schedule.

If a schedule is conflict serializable, then it will be view serializable.

13.Define Concurrency control


Concurrency Control is required for controlling and managing the concurrent execution of database
operations and thus avoiding the inconsistencies in the database. Thus, for maintaining the concurrency of
the database, we have the concurrency control protocols.

Serializability of schedules generated by concurrently executing transactions can be ensure through one of
a variety of mechanisms called concurrency control

Need for concurrency:


i) Improved throughput and resource utilization
ii) Reduced waiting time.

14.Define Concurrent Execution. State the Problems with Concurrent Execution

In a multi-user system, multiple users can access and use the same database at one time, which is known as
the concurrent execution of the database. It means that the same database is executed simultaneously on a
multi-user system by different users.
Problems with Concurrent Execution

Problem 1: Lost Update Problems (W - W Conflict)

Problem 2: Dirty Read Problems (W-R Conflict)

Problem 3: Unrepeatable Read Problem (W-R Conflict)

15.Define lock
Lock is variable associated with a data item, used for synchronizing the access by concurrent transaction to
the database item

Different modes of lock

 Shared
 Exclusive

16.Define lock table


System maintain record for the items that are currently locked in lock table that which could be organized
as a hash file.

17.State the Concurrency Control Protocols

The concurrency control protocols ensure the atomicity, consistency, isolation, durability and
serializability of the concurrent execution of the database transactions. Therefore, these protocols are
categorized as:

Lock Based Concurrency Control Protocol

Time Stamp Concurrency Control Protocol

Validation Based Concurrency Control Protocol

18.Define Lock-Based Protocol. Give its types.

In this type of protocol, any transaction cannot read or write data until it acquires an appropriate lock
on it. There are two types of lock:

1. Shared lock:

It is also known as a Read-only lock. In a shared lock, Data item can only read by transaction.
It can be shared between the transactions because when the transaction holds a lock, then it can't
update the data on the data item.

2. Exclusive lock:

In the exclusive lock, the data item can be both reads as well as written by transaction.

This lock is exclusive, and in this lock, multiple transactions do not modify the same data
simultaneously.

There are four types of lock protocols available:

1. Two-phase locking (2PL)

2. Strict Two-phase locking (Strict-2PL)

3. Simplistic lock protocol

4. Pre-claiming Lock Protocol

19. Define Two-phase locking (2PL)

Two-phase locking protocol divides the execution phase of transaction into three parts.

In the first part, it seeks permission for the lock it requires.

In the second part, the transaction acquires all the locks.

In third phase, Transaction cannot demand any new locks. It only releases acquired locks.

20.Define the phases of two phase locking protocol

Growing phase: a transaction may obtain newlocks but not release any lock.

Shrinking phase: a transaction may release locks but may not obtain any new locks.
Part-B

1. Define Schedule. Explain various types of schedule with example.


2. Describe the concept of serializability with suitable example.
3. How concurrency is performed? Explain the protocol that is used to maintain the concurrency concept
or Explain Concurrency Control in detail.
4. Explain in detail about the Two-phase locking techniques.
UNIT-5

Part-A

1. Define Object Query Language

 Object Query Language (OQL) is a version of the Structured Query Language. Like SQL, OQL is a
declarative (not procedural) language

 Object Query Language is a query language standard for accessing data in object-oriented databases

 OQL is developed by the Object Data Management Group.

Features:

 OQL is a powerful and easy-to-use

 SQL-like query language with special features objects, values and methods.

2. Define NOSQL Databases. Write the types.

A NoSQL is non SQL or non relational database that provides a mechanism for storage and retrieval of data

NoSQL databases ("not only SQL") are non-tabular databases and store data differently than relational tables.

Features:

They provide flexible schemas and scalability

Types of NoSQL database:

1. Document based NoSQL database: MongoDB, , CouchDB, Cloudant

2. Key value store: Memcached, Redis, Coherence

3. Column based or Tabular: Hbase, Big Table, Cassandra

4. Graph-based NOSQL systems

5. Object databases:

6. XML databases

3.Write the Characteristics of NOSQL Systems

Scalability

Availability, Replication and Eventual Consistency:

Replication Models
Master-slave replication

master-master replication

Sharding of Files or horizontal partitioning

High-Performance Data Access:

4. State the CAP THEOREM

CAP theorem states that it is not possible to guarantee all three of desirable properties—consistency,
availability & partition tolerance—at same time in a distributed system with data replication.

Three letters in CAP refer to 3 desirable properties of distributed systems with replicated data:

Consistency (among replicated copies),

Availability (of the system for read and write operations) and

Partition tolerance (in face of the nodes in system being partitioned by a network fault).

5. Define Document-Based Nosql. Give an Example.

Document-Based Nosql is a document based systems store data in the form of documents using well-
known formats, such as JSON (JavaScript Object Notation). Documents are accessible via their document
id, but can also be accessed rapidly using other indexes.

MongoDB documents are stored in BSON (Binary JSON) format, which is a variation of JSON with some
additional data types and is more efficient for storage than JSON. Individual documents are stored in a
collection

Example: MongoDB, CouchDB, Cloudant

6. List out the MongoDB CRUD Operations

MongoDb has several CRUD operations, where CRUD stands for

Create,

Read,

Update,

Delete.

db.<collection_name>.insert(<document(s)>)

db.<collection_name>.remove(<condition>)

db.<collection_name>.find(<condition>)
7. Define Column-Based Nosql Systems

Column-Based Nosql Systems partition a table by column into column families (a form of vertical
partitioning;), A category of NOSQL systems is known as column-based systems.

Example: Hbase, Big Table, Cassandra

The Google distributed storage system for big data, known as BigTable, is a well-known example of this class
of NOSQL systems

Big- Table uses the Google File System (GFS) for data storage and distribution.

An open source system known as Apache Hbase is similar to Google Big-Table

Another well-known example of column-based NOSQL systems is Cassandra

8.Define Hbase Data Model

An open source system known as Apache Hbase is similar to Google Big-Table, but it typically uses HDFS
(Hadoop Distributed File System) for data storage.

HDFS is used in many cloud computing applications, Hbase can also use Amazon’s Simple Storage System
(known as S3) for data storage.

The data model in Hbase organizes data using the concepts of namespaces, tables, column families, column
qualifiers, columns, rows, and data cells.

9. List the Hbase CRUD Operations

Hbase has low-level CRUD create, read, update, delete operations

 create,

 read,

 update,

 delete

10. Define Row Types

A row type is used to allow a column of a table to contain row values.

A row type is a sequence of field name/data type pairs that provides a data type to represent the types of rows in
tables

EXAMPLE - Use of row type

Create a Branch table consisting of branch number and address, insert a record into new table:

CREATE TABLE Branch (

branchNo CHAR(4),
address ROW(street VARCHAR(25),

city VARCHAR(15),

postcode ROW(cityIdentifier VARCHAR(4),

subPart VARCHAR(4))));

INSERT INTO Branch VALUES (‘B005’, ROW(‘23 Deer Rd’, ‘London’, ROW(‘SW1’, ‘4EH’)));

11. Define User-Defined Types

User-defined types (UDTs) are referred to as abstract data types (ADTs) subdivide into two categories:

Distinct Types and

Structured types.

Simpler type of UDT is distinct type, which allows differentiation between same base types.

For example, we could create the following two distinct types:

CREATE TYPE OwnerNumberType AS VARCHAR(5) FINAL;

CREATE TYPE StaffNumberType AS VARCHAR(5) FINAL;

UDT definition consists of one or more attribute definitions, zero or more routine declarations (methods) and,
in a subsequent release, operator declarations

12. Define the term CAP:

Consistency means that nodes will have same copies of a replicated data item visible for various transactions.

Availability means that each read or write request for a data item will either be processed successfully or the
operation cannot be completed.

Partition tolerance means that the system can continue operating if the network has a fault that results in two
or more partitions, where the nodes can only communicate among each other.

PART-B

1. Discuss in detail about OQL concepts


2. Write short notes on No-SQL Databases
3. State CAP theorem
4. Explain about the following:
i. Document-based MongoDB data model and CRUD operations
ii. Column-based Hbase data model and CRUD operations.
5. Explain about the following:
i. UDTs ii. Subtypes and Supertypes

You might also like