Assignment OF Dbms
Assignment OF Dbms
Assignment OF Dbms
OF
DBMS
MBA-IT
Part A
Q 1: Discuss the differences between database management system and file
system? which one is better and why?
a way to store and retrieve database information that is both convenient and
the system has a number of application programes that manipulates the files and
programs to:
System programmers wrote these programs to meet the needs of the bank.
New application programs are added to the system as the need rises.For
example suppose that a savings bank decides to offer checking accounts.
As a result the bank creates new permanent files that contain information
about all the checking accounts maintained in the bank ,and it may have
to write new application programs to deal with situations that donot arise
in savings account such as overdrafts.Thus as time goes by the system
acquires more files and more application programs.
This typical file processing system is supported by a
conventional operating system.This system stores permanent records in
various files and it needs different application programs to extract records
from ,and add records to the appropriate files.Before database
management systems came along organizations usually stored
information in such systems.
File processing system has a lot of major disadvantages:
Data redundancy and inconsistency.
Difficulty in accessing data.
Data isolation.
Integrity problem.
Atomicity problem.
Concurrent access anomalities.
Security problems.
Advantages of DBMS over file system:
Answer:
The values of attribute values of a tuple must be such that they can uniquely
identify the tuple.In other words no two tuples in a relation are allowed to have
exactly the same value for all attributes.
DEFINATION: : A candidate key is a combination of attributes that can be
uniquely used to identify a database record without any extraneous data. Each
table may have one or more candidate keys. One of these candidate keys is
selected as the table primary key.
Imagine we have a STUDENTS table that contains a record for each student at a
university. The student's unique student ID number would be a good choice for
a primary key in the STUDENTS table. The student's first and last name would
not be a good choice, as there is always the chance that more than one student
might have the same name.
PROPERTIES:
1.Stable.
2.Minimal.
3.Accessible.
Column definition: [column name] [data type] {NULL | NOT NULL} {column
options}
PART - B
Q1: Write the purpose of GRANT and REVOKE and explain syntax and example of
GRANT and REVOKE?
- Grant privilege is assigned not only on table object, but also views, synonyms,
indexes, sequences,etc.
Syntax:GRANT PRIVILEGES ON
TO :Example
emp to endusers;
- here emp is the table_name whose access right is being allocated to the user who
logged on as endusers.
emp to operators;
- here user who logged on as operators are granted access, insertion and deletion
right on the database.
- In some case, we require to hide the information to particular users, this can be
achieved by grant as in the above command we want to hide the detail of employee
salary to endusers, so by executing above command we can hide the information
regarding emp salary to the endusers.
- Revoke privilege is assigned not only on table object, but also views, synonyms,
indexes, sequences,etc.
Syntax
REVOKE PRIVILEGES ON
FROM :example
AVERAGE – avg.
MINIMUM – min.
MAXIMUM- max.
TOTAL – sum.
COUNT – count.
The SQL SUM function is used to select the sum of values from numeric column.
Using the Sales table, we can get the sum of all orders with the following SQL SUM
statement:
The SQL AVG function retrieves the average value for a numeric column. If we need
the average number of items per order, we can retrieve it like this:
The SQL MAX function retrieves the maximum numeric value from a numeric
column. The MAX SQL statement below returns the highest OrderPrice from the
Sales table:
Q3: Explain Relational database management system and also explain three
components?
The leading RDBMS products are Oracle, IBM's DB2 and Microsoft's SQL Server.
Despite repeated challenges by competing technologies, as well as the claim by some
experts that no current RDBMS has fully implemented relational principles, the
majority of new corporate databases are still being created and managed with an
RDBMS.
COMPONENTS
SQL Engine : This is in charge for interpreting and executing the SQL query. It
consists of three major components.
Storage Engine : This component stores and retrieves data records. It as well
provides a method to store metadata and control information such as undo logs, redo
logs, lock tables, etc.