Dbms-1 (1)
Dbms-1 (1)
SYSTEM
Database -
-
8. Crash recovery: DBMS provides some mechanism to recover data
from the crashes.
Components of the DBMS environment
-
a. Physical level -
The lowest level of abstraction describes how data is actually stored
on secondary storage devices .
b. Logical level -
The next-higher level of abstraction describes what data is stored in
the database, and what relationships exist among those data.
c. View level -
View level is the highest level of database abstraction and is the
closest to the users.
Data independence -
Application programmers
Sophisticated Users
a. Entity -
-
b. Relation
Relation is a collection of data elements organized in terms
of rows and columns. A relation is also called Table .
-
c. Tuple -
The rows (records) of a relation are generally referred to as
-
tuples.
-
d. Attribute
f. Cardinality -
The number of rows or tuples in a relation is called cardinality
-
of the relation.
g. Domain -
A domain is a pool of values from which actual values
appearing in a given column are drawn .
-
O
h. Schema -
-
-
S
&
E
key
Pomacy
-
-
-
ladmuy Roll Batch
-
C
mno
Keys -
A key is an attribute or a collection of attributes in a
relation that uniquely distinguishes each tuples from other
tuples in a given relation . -
-
Types of keys -
-
a. Candidate key:
A candidate key is the minimal set of attributes that
uniquely identifies a row in a relation. There may be more
than one candidate key in a relation.
b. primary key :
d. Foreign key:
T
A key in a table can be called foreign key if it is a primary
- -
key in another table. -
-
Relational Algebra
The collection of operations that is used to manipulate the
entire relations of a database is known as relational
algebra .
Operations of Relational Algebra
1. SELECT operation -
D
Eg: To select all the students who are eligible for higher
studies
- "Ensistentat
result
-
-
To select all the students in the Commerce batch who are failed.
2. PROJECT Operation: -
2-
and forms a new relation.
Eg: Select Name, Result and Marks attributes in STUDENT relation.
---relation]
Twome Result Mos ,
, ,
To select admission number and name of students who are Eligible
~
key
Candidate
Write short note about following terminologies in
RDBMS :
-
-
(a) Relation -
in
appear
~ Actuall values
(b) Domain column
(c) Foreign key -
Write short note about any two operations on relational
--
algebra.
-
If a table STUDENT has 5 columns and another table
-
- = =
-- - & &
M
- -
-
S
Degree
-
cardnality-10
Consider the following relations :
-
SPORTS -ARTS -
Nams Batch
Admno -
Arsun B1
3015 -
3005 Fithma (2
Y
>
-
- -
-
Find the result of following relational algebra operation.
-
-
U SPORTS
ARTS
no Name Batch
Adm
Manin Al
3001
4010 Earl B1
3090 Heun k2
so 15 Arun B1
3005 Fathima C2
-
-
&
- -
-
T
↑
& -
-
-
M
~
-
- ↑ - -
& -
-
- -
- -
-
-
-
- - -
- - -
a) Name Age
55
Harsof
Seikahtu 43
(*)
b) city count
2
Delhi
2
Mumbai
Kolkata I
B
C City
Delhi
mumbai
Kolkata
-
-
- =
-
- *
- -
-
-
---
- -
-
-
- -
4)
Pe ANGALURU
T ID
-
101
TDATE
2021-12-25
1035500
D
FARE
3)
I
TID
-
DELHI 4000
MUMBAI 5000
The essential features of Object Oriented Data Model are;
(a) Object identity
(b) Encapsulation
(c) DataAbstraction
(d) All of the above
Which statement is false in context to the term Relation?
(a) Relation is a table storing logically related data.
(b) Data must be atomic in cell
(c) All rows of relation are distinct.
(d) Ordering of rows & columns is relevant.
Tune
A row of relation generally referred to as.............and column of a
S
afterbute
relation is ………… - -
(b) Degree45,Cardinality5
(c) Degree50,Cardinality45
(d) Degree50,Cardinality2250
A Candidate key that is not a primary key, is called ……………
--
(a) Alternate key
(b) Foreign key
(c) Primary key
(d) Super Key
A non-key attribute, whose values are derived from primary key of
-
-
some other table.
-
(a) Commit
(b) Rollback
(c) Exit
(d) Savepoint
Which is not a function of DML?
-
O
(d) Making changes permanent to the database.
-
[
The default date format in MySQL is:
(a) DD/MM/YYYY
(b) YYYY/MM/DD -
(c) MM-DD-YYYY
(d) YYYY-MM-DD
How can you insert a new row into the “STORE” table.
-
-
Branch Name Varchar (25)
-
ACC-type
varchar (10)
C
Amount Decimal (10,
2)
1. Display the account details account in Kodungallur Branch
"Kodungallur
-
2. Change the branch name Trivandrum to Thiruvananthapuram
-
AND Amount
<500
:
"Trisor"
Distinguish between CHAR and VARCHAR datatypes of
-
SQL.
-
CHAR VARCHR
- -
Size
> Fixed
-
, > size
-
changable
CHARLX) VARCHR(X)
What is the difference between PRIMARY KEY and
UNIQUE Constraints ?
The SQL operator ________
Like is used with pattern
matching.
Pick the odd one out and give reason:
a. CREATE b. SELECT c. UPDATE d. INSERT
m
Distinguish between DISTINCT and UNIQUE in SQL.
Name the keyword used with SELECT command to
-
Distinct