[go: up one dir, main page]

0% found this document useful (0 votes)
29 views10 pages

8 Database Management System

The document provides an overview of Database Management Systems (DBMS), explaining what databases are, the advantages of using DBMS, and its components including hardware, software, data, users, and procedures. It also covers concepts such as data independence, database abstraction, relational data models, and various operations in relational algebra. Additionally, it describes different types of users and their roles, as well as key concepts like keys in relations and relational operations.
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)
29 views10 pages

8 Database Management System

The document provides an overview of Database Management Systems (DBMS), explaining what databases are, the advantages of using DBMS, and its components including hardware, software, data, users, and procedures. It also covers concepts such as data independence, database abstraction, relational data models, and various operations in relational algebra. Additionally, it describes different types of users and their roles, as well as key concepts like keys in relations and relational operations.
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/ 10

1

8. DATABASE MANAGEMENT SYSTEM


1. What is a database?
Data base is an organized collection of data related to a particular enterprise. It may contain
different types files each one containing many records.
2. What is DBMS?
Database Management System is a collection of inter related data and a set of programs to
store, modify and access those data.
3. What are the advantages of DBMS ?

a). Controlling Data redundancy:-Duplication of data is known as data redundancy. It causes


higher cost for data storage and data access. In DBMS data is kept in one place in centralized
manner and the users can access this centrally maintained date for their purpose. So data
redundancy can control.
b). Data consistency :- Data redundancy leads data inconsistency ( different copies of same data
hold different values because the updation of data may not occur in all the copies. In DBMS it
avoided by eliminating redundancy.

c). Efficient data access: DBMS utilizes a variety of techniques to store and retrieve data
efficiently.

d). Data can be shared:- The data stored in the Database can be shared among many users and
new programs can be developed to share the existing data.

e). Data Integrity: Integrity refers to the overall completeness, accuracy and consistency of data in
the database. It can be achieved by use of error checking , validation, avoiding duplication etc.

f). Security :- Information inside a Database is very valuable for a company. Security refers to
accidental or intentional disclosure or unauthorized access, modification or destruction. Through
the use of passwords, information in the database is made available only to authorized person.
Access to specific information can be limited to selected users by using access rights.

g). Sharing of data : The data stored in the database can be shared among several users or
programs even simultaneously and each may use it for different purposes.

h). Enforcement of Standards:- The database Administrator defines standards like display
formats, report structure, update procedures, access rules etc.. for the DBMS. It is helpful when
data transfer occurs between systems.

i). Crash recovery : If the system crashes data in the database may become unusable. DBMS
provides some mechanism to recover data from the crashes.

4. What are the components of a database?


The components of a database are,

a). Hardware : It include actual computer system used for storage and retrieval of Database. It
include computers, storage devices, network devices, and other supporting devices.

Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
2

b). Software : It consists of DBMS, application programs and utilities. DBMS consists of different
components that handles tasks like data definition, data manipulation,

c). Data : It is the most important component of DBMS. The data base should contain all the data
needed by the organization. For effective storage and retrieval of information , data is
organized as fields, records and files.

1) Field : A field is a smallest unit of stored data. Each field has a specific type.(eg. Name,-

Char, Mark,-num etc).

2) Record : A record is a collection of related fields. A record store an instant of the

relation or the table.

3) File : A file is a collection of all occurrence of one type of record.

d). Users : The users of database can be classified depending on the mode of their interactions
with DBMS. The different categories of users are Database Administrator, Application
Programmer, Sophisticated users, and naïve users.

e). Procedures : Procedures refers to the instructions and rules that govern the design and use of
the database.

5. Data about data is called ….. …

Meta-data

6. What is database abstraction?

Designers of DBMS use complex data structures to represent data for getting better
efficiency. But the users may not be computer trained. So the developers in a database
system hide the complexity from users through different levels of abstraction.

There are three types of abstraction

a). Physical Level Abstraction-It is the lowest level of abstraction. Physical level describes
how data is actually stored in the storage medium like disk, tape etc.. The DBMS hide its
details from the programmers.

b). Logical ( conceptual ) Level Abstraction- It is the next high level of abstraction. Logical
level describes what data are stored in the data base and what relationship among them. In
this level the records and its types are defined. The logical level abstraction is done by the
Data Base Administrator(DBA).

c). View Level Abstraction- This is the highest level of abstraction. It concerned with the
way in which the individual users view the data. Most of the users may not need all the data
stored in the database. They need only a part of it. So all other data are hide from the user

7. What is schema?

The description or structure of a database is called database schema.


Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
3

8. What is mean by data independence?.What are different types of data independence?

The ability to modify a schema definition at one level (Physical, Logical, View levels)
without affecting the schema definition at the next higher level is called data independence.
The two types of data independence are ,

a). Physical data independence: It is the ability to modify the physical schema without
affecting the conceptual(logical) schema. So the application programs remain same even though
the physical schema get modified

b). Logical data independence: It is the ability to modify the logical schema without affecting
the view level. So the application programs remains same.. It is more difficult to achieve because
the application programs are heavily depend on logical structure.

9. Who are the users of database?

Users of the database can be classified in to the following groups,


a) Database administrator (DBA): The person has control over the centralized and
shared data in a DBMS. He is the in charge of creating, modifying and maintaining
3 levels of DBMS.
b) Application Programmer: They are computer professionals and interacts the DBMS
through application programs. Application programs are programs written in any host
languages like Java, C++ etc.. and interact with DBMS through Data Manipulation
Language (DML).
c). Sophisticated Users : The users are familiar with DBMS like scientist, business analyst
etc. The interact with DBMS by their own Query or request
d). Naive Users/ End users: The uses don't know about the physical and logical structures
of DBMS like clerical staff in an office.

10. What are the duties of a DBA?

The person has control over the centralized and shared data in a DBMS. He is responsible
for,
a). Design of the physical and conceptual Schemas.
b). Security and authorization.
c). Data availability and recovery from failures.

11. What is Relational Data Model ?

The relational data model represents database as a collection of tables called relations
with unique name

12. Expansion of RDBMS is ….. ..?


Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
4

Relational Data Base Management System.

13. The person who interacts with database through query language is called … …. …

Sophisticated user

14. The billing clerk in a super market is a .. …. …… .. user

Naïve User

15. Who provide data security in a database?

Data Base Administrator

16. Who changes the structure of a database ?

Data Base Administrator

17. … … … interacts with the database through the prewritten application program.

Naïve User

18. Categorize the following components of DBMS environment .


a). Hard Disk b). Switch c). DBA d). Payroll System e). End User f). Railway
reservation System
Hard Disk, Switch :- Hardware
Pay Roll System, Railway Reservation System :- Software
End User, DBA :- Users

19. What are the advantages of RDBMS over other data models?

a). Simple data representation


b). Complex query can be expressed with easiness

20. Explain the following


a). Entity b). Relation c). Tuple d). Attribute e). Degree f). Cardinality g). Domain
h). Instance

a). Entity : An entity is a person or a thing that can be distinguishable from others.
Eg. Student, Book etc..
b). Relation : Relation is a collection of data elements organized in rows and columns. It is
also called a table.
c). Tuple : A row in a relation is called a tuple. It consists of a complete set of values used to
represent a particular entity. Values of each attribute are taken from its domain.
d). Attribute : The columns of a relation are called attributes.
Eg. Ad.no, name, age etc are the attributes of the relation Student.
e). Degree : The no of attributes(columns) in a relation is called degree of that relation.
f). Cardinality : The no of rows (tuples) in a relation is called cardinality of that relation
Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
5

g). Domain :Domain is a range of values from which a particular value of an attribute for a
can be drawn.
Eg. 0 to 100 may be domain of values for the attribute mark in student relation.
h). Instance : An instance of a relation is a set of tuples has the same number of fields as the
relational scheme.

21. What are the different Keys in a relation?

Tuples in a relation must be distinct. That means no two tuples in a relation have same
combination of values for all the attributes. So there should be a way to identify each tuples
in a relation. Keys allow us to make such distinctions.
a). Candidate Key:-Candidate key for a relation is the minimal set of attributes that
uniquely identifies each tuple (row) of the relation. There may more than one candidate key
in a relation.
Eg. Student(adno,name,cl_no,batch,year,mark). Here adno and (Cl-no,batch,year) are
candidate keys.
b). Primary Key:-It is one of the candidate keys chosen to be unique identifier of the
relation by the database designer. If there is more than one candidate key, then key with
least no. of attributes is chosen as Primary key
Eg. Student(adno,name,cl_no,batch,year,mark). Here adno and (Cl-no,batch,year) are
candidate keys.
Then adno can be chosen as the Primary key.
c). Alternate Key:-The candidate keys that are not chosen as primary key is known as
alternate keys.
In the above eg. (Cl-no,batch,year) is the alternate key.
d). Foreign key:-An attribute or set of attributes in a table which is a primary key in another
table is called a foreign key. It helps to link two or more tables. So it is also called Reference
key.
Eg. Student(adno,name,cl_no,batch,year,mark) and Library(Mem_id,adno, book_no)
If the ad_no in the Library relation is primary key in school table then, it is a foreign key
based on student table.

22. What is a Predicate?

Predicate is a user defined condition to select rows of user’s choice.

23. What is mean by relational algebra?

Relational algebra operations take one or two relations as input and produces a new
relation as a result. If it operates on only one relation it is known as a unary operation . If it
operates on two relations it is known as a binary operation.

24. Explain different relational operations?

1) Select operation: Select operation is a unary operation used to select tuples in a relation

Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
6

those satisfy a selection predicate (condition). It is denoted by the symbol σ

Eg.

Student

Roll_No Name Year Batch


1 Biju 2014 Commerce
1 Manu 2015 Humanities
2 Raju 2015 Commerce
2 Mini 2014 Humanities
3 Sindhu 2015 Commerce
3 Jinu 2014 Humanities

σ Year=”2015” and Batch=”Commerce” (Student)

Roll_No Name Year Batch


2 Raju 2015 Commerce
3 Sindhu 2015 Commerce

2) Project operation: Project operation is a unary operation used to select of the columns

from a table to form a new relation. It is denoted by the symbol ∏.

Eg.

Student

Roll_No Name Year Batch


1 Biju 2014 Commerce
1 Manu 2015 Humanities
2 Raju 2015 Commerce
2 Mini 2014 Humanities
3 Sindhu 2015 Commerce
3 Jinu 2014 Humanities

∏ Roll_No, Name,Batch (Employee)

Roll_No Name Batch


1 Biju Commerce
1 Manu Humanities
2 Raju Commerce
2 Mini Humanities

Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
7

3 Sindhu Commerce
3 Jinu Humanities

3) Union Operation: It is the concatenation operation between compactable (same type)

where all the tuples appearing in either or both the relations.. It is denoted by U.

Duplication of tuples are eliminated.

Eg.

School A

School code School name subject


111 Abc hss Commerce
112 Pqr hss Humanities

School B

School code School name subject


211 xyz hss Commerce
212 Cdf hss Humanities

School A U School B

School code School name subject


111 Abc hss Commerce
112 Pqr hss Humanities
211 xyz hss Commerce
212 Cdf hss Humanities

4). Intersection Operation: This binary operation done between compactable relations. It
returns a relation consisting of all tuples appearing I both of the two specified relations. It is
denoted by the symbol ∩ .
Eg.

Foot Ball

Name Age
Biju 16
Siju 15
Riju 17
Liju 16
Aji 15
Biji 16

Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
8

Cricket

Name Age
Saji 16
Siju 15
Raju 16
Liju 16
Binu 17
Biji 16

Foot Ball ∩ Cricket

Name Age
Siju 15
Liju 16
Biji 16

5) Set Difference Operation: This binary operation done between compactable relations.
It returns a relation consisting of all tuples appearing in the first relation and not in the
second relation. It is denoted by the symbol ─ .
Eg.

Foot Ball

Name Age
Biju 16
Siju 15
Riju 17
Liju 16
Aji 15
Biji 16

Cricket

Name Age
Saji 16
Siju 15
Raju 16
Liju 16
Binu 17
Biji 16

Foot Ball ─ Cricket

Name Age
Biju 16
Riju 17
Aji 15
Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
9

6)Cartesian Product(Cross Product): This operation returns a relation consisting of all possible
combinations of tuples from two relations. It is a binary operation on two relations which has
degree equal to the sum of the degrees of the two relations and cardinality is the product of
the cardinalities of the two relations. It is denoted by X.

Eg.

Student

Roll Name
No
1 Biju
2 Riju
3 Siju

School

School code School name subject


111 Abc hss Commerce
112 Pqr hss Humanities

Student X School

Roll No Name School code School name subject


1 Biju 111 Abc hss Commerce
1 Biju 112 Pqr hss Humanities
2 Riju 111 Abc hss Commerce
2 Riju 112 Pqr hss Humanities
3 Siju 111 Abc hss Commerce
3 Siju 112 Pqr hss Humanities

25. How many primary keys possible in a relation?

One

26. If a key contains more than one attribute is known as …… ….. …?

Composite Key>

Previous Questions:
1...................... level describes only a part of a database .

Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]
10

(a) View (b) Physical (c) Logical (d) None of these

2. What is relational algebra ?Explain any three relational algebra operations.

3. The number of attributes in a relation is called …………

(a) tuple (b) degree 9(c) cardinality (d) domain

4. Explain the components of DBMS.

Second Year Computer Application (Commerce) Study Notes by Anil Kumar [HSSLiVE.IN]

You might also like