Top Banner

of 35

Concept of Dbms

May 30, 2018

Download

Documents

midhungbabu88
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/9/2019 Concept of Dbms

    1/35

    CONCEPT OF DBMS

    Edumate Questions

    1. Give an example of

    RDBMS package

    Ans: Oracle, SQL Server,MS

    Access,Foxpro, Dbase etc2. Select the property which

    is desirable for a database

    (a) Redundancy (b)

    Inconsistency

  • 8/9/2019 Concept of Dbms

    2/35

    Integrity (d) Complexity

    Ans: Integrity

    Redundancy means

    duplication of same data in

    different places of the

    database.

    Inconsistency:

    Redundancy may cause

    inconsistency.

    3. Pick the odd man out

  • 8/9/2019 Concept of Dbms

    3/35

    (a) Create(b) Select (c)

    Update (d) Insert

    Ans: Create. It is a DDL

    command. All others are

    DML commands

    4. Name the key that acts as a

    candidate key but not a

    primary key

    Ans: Alternate key

  • 8/9/2019 Concept of Dbms

    4/35

    5. ..is the ability to

    modify a scheme definition in

    ijne level without affecting

    the scheme definition in the

    next higher level

    Ans: Data Independence

    6. For accessing data from a

    database

    provides an interface with

    programming languages

  • 8/9/2019 Concept of Dbms

    5/35

    Ans: SQL or DML

    7. Consider the table with the

    following fields Name, Roll

    Number and Mark for a set of

    students. A field among

    them, which is suitable for

    primary key, Justify answer

    Ans: Roll Number

    Roll Number can be used to

    identify a student uniquely.

  • 8/9/2019 Concept of Dbms

    6/35

    Roll No cannot be repeated

    ie. No two students have

    same Roll Number

    8. For catering to the need of

    users, a database is

    implemented through three

    general levels. Name the

    three levels and discuss them

    Ans: The three levels are

    1. Physical Level

  • 8/9/2019 Concept of Dbms

    7/35

    Physical level describes

    how the data stored in storage

    medium. This is the

    lowest level. At this level

    records will be stored in an

    actual storage location

    2. Logical Level

    This level describes what

    data are stored in the

    database. It describes the

  • 8/9/2019 Concept of Dbms

    8/35

    relationship exist among

    data. Here records are

    defined, the type of data is

    determined, relationships

    are specified

    3. View Level

    This is the highest level. It

    is closest to users, this level

    concerned with the way

  • 8/9/2019 Concept of Dbms

    9/35

    in which the users view the

    data

    9. You have to present a

    seminar on the topic Keys in

    RDBMS prepare a seminar

    report

    View Level

    Logical Level

    Physical Level

  • 8/9/2019 Concept of Dbms

    10/35

    Ans: Keys are used to

    identify the tuples in a

    relation. The important keys

    are

    1) Primary key: Primary key

    is a set of one or more

    attributes used to identify a

    tuple uniquely in a

    relation. Primary key can

    not be repeated

  • 8/9/2019 Concept of Dbms

    11/35

    Eg: Reg No. in student

    relation

    2) Candidate key: Keys that

    can act as a primary key is

    called candidate key. They

    are the candidate key. It is

    used to identify a tuple

    uniquely

    Eg: SI. No., Adm. No. etc

    in student relation

  • 8/9/2019 Concept of Dbms

    12/35

    3) Super key: A

    combination of primary

    key with any other

    attribute or group of

    attribute is called super key

    Eg: Reg. No. + Name in

    student relation

    4) Foreign key: When a

    primary key of one

    relationis also available as

  • 8/9/2019 Concept of Dbms

    13/35

    an attribute in aother

    relation, that attribute is

    called foreign key of the

    relation. Foreign key helps

    to attain data integrity

    5) Alternate key: A

    candidate key that is not a

    primary key is known as

    alternate key

  • 8/9/2019 Concept of Dbms

    14/35

    10. There are different data

    models of which one is

    currently used in all business

    transaction. Specify it and

    discuss details

    OR

    Remesh doing relational

    operation in which he used

    different tables for

    manipulation.

  • 8/9/2019 Concept of Dbms

    15/35

    Which data model he is

    using? Discuss in detail

    Ans: Relational Data Model

    Relational data model uses

    a collection of tables to

    represent data and its

    relationship.

    Important features are:

    Represent data in form of

    rows and column

  • 8/9/2019 Concept of Dbms

    16/35

    Rows represents records

    and column represents

    attributes or fields

    A row is known as tuple

    and column is known as

    attributes

    A relation can be

    represented using a named

    tableIt is developed by J.F. Code

  • 8/9/2019 Concept of Dbms

    17/35

    Eg. N

    ame

    Reg

    No.

    Mark

    Ra

    him

    R

    oy

    Jo

    sy

    138

    0

    138

    1

    132

    48

    55

    58

  • 8/9/2019 Concept of Dbms

    18/35

    11. Consider the following

    table and write the relational

    algebra operations for the

    following.

    DEPOSIT

    Acc

    No

    Name Branch Amoun

    100

    1

    100

    2

    Kumar

    Salim

    Fida

    John

    Calicut

    Trivandru

    m

    Kottayam

    10,000

    25,000

    18,000

    30,000

  • 8/9/2019 Concept of Dbms

    19/35

    100

    3

    100

    4

    100

    5

    Raju Kannur

    Thrissur

    5,000

    (a) To display those tuples

    fr

  • 8/9/2019 Concept of Dbms

    20/35

    om DEPOSIT relation

    where amount is greater

    than

    25,000

    (b) To display only Acc No.

    and amount of all

    depositors

    Ans: (a) s amount> 25,000

    (DEPOSIT)

  • 8/9/2019 Concept of Dbms

    21/35

    (b) Acc No, Amount

    (DEPOSIT)

    12.

    STUDENT

    GRADE

    Reg

    No

    Name Scores

    101

    102

    103

    104

    105

    Preethi

    Anupama

    Ruksana

    Nancy

    Anu

    70

    68

    94

    87

    77

  • 8/9/2019 Concept of Dbms

    22/35

    Consider the relations

    STUDENT and Grade

    given above and predictthe output of the following

    Reg

    No

    Scores Grade

    101

    102

    103

    104

    105

    70

    68

    94

    87

    77

    B+

    B

    A+

    A

    B+

  • 8/9/2019 Concept of Dbms

    23/35

  • 8/9/2019 Concept of Dbms

    24/35

    2.Reg No Scores

    101

    102

    103

    104

    105

    70

    68

    94

    87

    77

  • 8/9/2019 Concept of Dbms

    25/35

    3.

    4.

    Reg No Score Grade101

    105

    70

    77

    B+

    B+

    Reg No Name103

    104

    105

    Ruksana

    Nancy

    Anu

  • 8/9/2019 Concept of Dbms

    26/35

    5.

    13. Consider the following

    Relations

    Reg No Scores Grade101

    102

    70

    68

    B+

    B

  • 8/9/2019 Concept of Dbms

    27/35

    R1 R2

    Reg No Name Grade

    1200

    1201

    1202

    Babu

    Lulu

    Sunu

    A

    A+

    B

    Reg No Name Grad

    1203

    1201

    Biju

    Lulu

    D

    A+

  • 8/9/2019 Concept of Dbms

    28/35

    Show the output of the

    following relational

    operations

    (a)R1-R2 (b) R1 R2

    (c) R1 R2

    Ans: (a) R1-R2

    Reg No Name Grade1200

    1202

    Babu

    Sunu

    A

    B

  • 8/9/2019 Concept of Dbms

    29/35

    (b) R1 R2

    (c) R1 R2

    Reg No Name Grade1200

    1201

    1202

    1203

    Babu

    Lulu

    Sunu

    Biju

    A

    A+

    B

    D

    Reg No Name Grade1201 Lulu A+

  • 8/9/2019 Concept of Dbms

    30/35

  • 8/9/2019 Concept of Dbms

    31/35

    Data which is composed

    off more than one single

    valued data is known as multi

    valued attribute eg. Date

    of birth

    15. Consider the following

    table and write relational

    algebra operations for the

    following

  • 8/9/2019 Concept of Dbms

    32/35

    DEPOSIT

    Acc

    No

    Name Branch Amoun

    100

    1

    100

    2

    Kumar

    Salim

    Fida

    John

    Calicut

    Trivandru

    m

    Kottayam

    10,000

    25,000

    18,000

    30,000

  • 8/9/2019 Concept of Dbms

    33/35

    100

    3

    100

    4

    100

    5

    Raju Kannur

    Thrissur

    5,000

    (a) To display those tables

    from DEPOSIT relation

    where amount is greater than

    25,000

  • 8/9/2019 Concept of Dbms

    34/35

    (b) To display only Acc

    No. and amount of all

    deposits

    Ans:

    (a) s Amount> 25,000

    (DEPOSIT)

    (b) Acc No, Amount (DEPOSIT)

  • 8/9/2019 Concept of Dbms

    35/35