Dbms 1
Dbms 1
Dbms 1
• Parsing and validating a query: data dictionary - a relation listing all relations and
relations listing the attributes
• Plans for computing the query: list of possible way to execute the query,
estimated cost for each. Example:
SELECT ItemNames, Price
FROM ITEM, SALES
WHERE SALES.Item# = ITEM.Item# AND Salesperson="Mary"
• Index: B-tree index, drawbacks - additional space, updating;
indexing not all relations (e.g. the keys only)
• Estimating the cost for computing a query: size of the relation, existence/size of the indices.
Example: estimating Attribute=value with a given number of tuples and the size of the index.
• Query optimization: finding the best plan (minimizing the computational cost and
the size of the intermediate results), subsets of tuples, projection and join.
Database views
• Creating user defined subsets of the database
• Improving the user interface
• Example:
CREATE VIEW MarySales(ItemName,Price)
AS SELECT ItemName, Price
FROM ITEM, SALES
WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary"
SELECT ItemName
FROM MarySales
WHERE Proce>100
translates to:
SELECT ItemName
FROM ITEM, SALES
WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary" AND Price>100
Data integrity
Primitive Description
a) A nested transaction
b) A distributed transaction
Concurrency Control (1)
.
Popular types of DBMS
Popular database models and their management
systems include:
Relational database management system (RDMS) -
adaptable to most use cases, but RDBMS Tier-1
products can be quite expensive.
NoSQL DBMS - well-suited for loosely defined data
structures that may evolve over time.
In-memory database management system
(IMDBMS) - provides faster response times and
better performance.
Columnar database management system (CDBMS) -
well-suited for data warehouses that have a large
number of similar data items.
USES