0% found this document useful (0 votes)
3 views12 pages

Inbound 1539866311090508568

Uploaded by

sudeepimag
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)
3 views12 pages

Inbound 1539866311090508568

Uploaded by

sudeepimag
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/ 12

Lesson – 11 DATABASE CONCEPTS

Part - II
Answer the following questions: (2 Marks)

1. Mention few examples of a database.


Database is a repository collection of related data organized in a way that data can be
easily accessed, managed and updated. Generally stored and accessed electronically from
a computer system. A school class register is a database where names are arranged
alphabetically. Ex: FoxPro, dbase, student database.

2. List some examples of RDBMS.


SQL servers, Oracle, mysql, MariaDB, SQLite are some of the examples for
Relational Database Management System (RDBMS).

3. What is data consistency?


Data Consistency means that data values are the same at all instances of a database. On
live data, it is being continuously updated and added, maintaining the consistency of data
can become a challenge. But DBMS handles it by itself.

4. What is the difference between Hierarchical and Network data model?


Hierarchical data model Network data model
In Hierarchical model, data is Network database model is an extended
represented as a simple tree like form of hierarchical data model.
structure form.
It represents the data in one-to-many It represents the data in
relationships (i.e) parent-child many-to-many relationships.
relationship.
One child can have only one parent but One child may have many parent nodes.
one parent can have many children.

5. What is normalization?
Normalization reduces data redundancy and improves data integrity. It is an integral part
of RDBMS. It was first proposed by Dr. Edgar F Codd , Therefore these rules are known as
E F Codd Rules.
Part - III
Answer the following questions: (3 Marks)

1. What is the difference between Select and Project command?


Select command – ( symbol : σ ) Project command - (symbol : Π)
The SELECT operation is used for selecting The projection eliminates all attributes of the
a subset with tuples according to a given input relation but those mentioned in the
condition. (i.e) It filters out all tuples that projection list. The projection method defines
do not satisfy Condition. a relation that contains a vertical subset of
Relation.
General form: General form:
σc ( R ) with a relation R and a condition C Π ( R ) with a relation R and a condition C
c
on the attributes of R. on the attributes of R.
STUDENT

Studno Name Course


cs1 Bala Bigdata
cs2 Sundar Python
cs3 Veeru R Language
cs4 Ganesh Bigdata
Example: Example:

σcourse = “Big Data” (STUDENT ) Πcourse (STUDENT)


OUTPUT: OUTPUT:
Course
Studno Name Course Bigdata
cs1 Bala Bigdata Python
cs4 Ganesh Bigdata R Language

2. What is the role of DBA?


Database Administrator or DBA is the one who manages the complete database
management system. DBA takes care of the security of the DBMS, managing the license
keys, managing user accounts and access etc.
3. Explain Cartesian Product with a suitable example.
Cross product is a way of combining two relations. The resulting relation contains, both
relations being combined. A x B means A times B, where the relation A and B have
different attributes. This type of operation is helpful to merge columns from two relations.
Table A Table B
Studno Name Subid Subject
cs1 Bala S1 Bigdata
cs2 Ganesh S2 Python
Cartesian Product : Table A X Table B
Studno Name Subid Subject
cs1 Bala S1 Bigdata
cs1 Bala S2 Python
cs2 Ganesh S1 Bigdata
cs2 Ganesh S2 Python

4. Explain Object Model with example.


Object model stores the data in the form of objects, attributes and methods, classes and
Inheritance. This model handles more complex applications, such as Geographic
information System (GIS), scientific experiments, engineering design and manufacturing.
It is used in file Management System. It represents real world objects, attributes and
behaviors. It provides a clear modular structure. It is easy to maintain and modify the
existing code.

An example of the Object model is Shape, Circle, Rectangle and Triangle are all objects in
this model.
Circle has the attribute radius.
Rectangle has the attributes length and breadth.
Triangle has the attributes base and height.
The objects Circle, Rectangle and Triangle inherit from the object Shape.

5. Write a note on different types of DBMS users.


Types of DBMS Users
Database Administrators
Database Administrator or DBA is the one who manages the complete database
management system. DBA takes care of the security of the DBMS, managing the license
keys, managing user accounts and access etc.
Application Programmers or Software Developers
This user group is involved in developing and designing the parts of DBMS.
End User
All modern applications, web or mobile, store user data. Applications are programmed in
such a way that they collect user data and store the data on DBMS systems running on
their server. End users are the one who store, retrieve, update and delete data.
Database designers: are responsible for identifying the data to be stored in the database
for choosing appropriate structures to represent and store the data.
Part – IV
Answer the following questions: (5 Marks)
1. Explain the different types of data model.
Data Model
A data model describes how the data can be represented and accessed from software after
complete implementation. The main purpose of data model is to give an idea as how the
final system or software will look like after development is completed.
Types of Data Model
 Hierarchical Model
 Relational Model
 Network Database Model
 Entity Relationship Model
 Object Model
Hierarchical model:
 In Hierarchical model, data is represented as a simple tree like structure form.
 It represents the data in one-to-many relationships (i.e) parent-child relationship.
 One child can have only one parent but one parent can have many children.

Relational Model
 The Relational Database model was first proposed by E.F. Codd in 1970 . Nowadays, it is
the most widespread data model used for database applications around the world.
 It represents the data in the form of in relational model is tables (relations).
 All the information’s related to a particular type is stored in rows of that table. Hence
tables are also known as relations in a relational model. A relation key is an attribute
which uniquely identifies a particular tuple (row in a relation (table)).
Table A Table B
Studno Name Subid Subject
cs1 Bala S1 Bigdata
cs2 Ganesh S2 Python

Studno Name Subject


cs1 Bala Bigdata
cs2 Ganesh Python
Network data model
 Network database model is an extended form of hierarchical data model.
 It represents the data in many-to-many relationships.
 One child may have many parent nodes.

Entity Relationship Model. (ER model)


 In this database model, relationships are created by dividing the object into entity and
its characteristics into attributes.
 Rectangle represents the entities. E.g. Doctor and Patient
 Ellipse represents the attributes E.g. D-id, D-name, P-id, P-name. Attributes describes
the characteristics and each entity becomes a major part of the data stored in the
database.
 Diamond represents the relationship in ER diagrams

 It was developed by Chen in 1976. This model is useful in developing a conceptual


design for the database. It is very simple and easy to design logical view of data. The
developer can easily understand the system by looking at ER model constructed.

E.g. Doctor diagnosis the Patient

Object model:
 Object model stores the data in the form of objects, attributes and methods, classes
and Inheritance.
 It handles more complex applications, such as Geographic information System (GIS),
scientific experiments, engineering design and manufacturing. It is used in file
Management System.
 It represents real world objects, attributes and behaviors. It provides a clear modular
structure. It is easy to maintain and modify the existing code.
An example of the Object model is Shape, Circle, Rectangle and Triangle are all objects in
this model.
Circle has the attribute radius.
Rectangle has the attributes length and breadth.
Triangle has the attributes base and height.
The objects Circle, Rectangle and Triangle inherit from the object Shape.

2. Explain the different types of relationship mapping.


Types of Relationships
1. One-to-One Relationship
2. One-to-Many Relationship
3. Many-to-One Relationship
4. Many-to-Many Relationship

One-to-One Relationship
In One-to-One Relationship, one entity is related with only one other entity. One row in a
table is linked with only one row in another table and vice versa.
Example: A student can have only one exam number

One-to-Many Relationship
In One-to-Many Relationship, one entity is related to many other entities.
One row in a table is linked to many rows in another table.
Example: One Department has many staff members.
Many-to-One Relationship
In Many-to-One Relationship, many entities can be related with only one in the other
entity. Many row in a table is linked to only one row in another table.
Example: A number of staff members working in one Department.

Many-to-Many Relationship
In many-to-many relationship, many entities can be related to many other entities.
Multiple records in a table are associated with multiple records in another table.
Example: Many Books in a Library are issued to many students.
3. Differentiate DBMS and RDBMS.
Basis of Comparison DBMS RDBMS

Expansion Database Management Relational Database Management System


System

Data storage Navigational model Relational model

Data redundancy Present Not Present

Normalization Not performed RDBMS uses normalization to reduce


redundancy

Data access Consumes more time Faster, compared to DBMS.

Keys and indexes Does not use keys and Used to establish relationship. Keys are used
indexes. in RDBMS.

Transaction Inefficient, Efficient and secure.


management Error prone and insecure.

Distributed Databases Not supported Supported by RDBMS.

Example Dbase, FoxPro. SQL server, Oracle, mysql, MariaDB,


SQLite.

4. Explain the different operators in Relational algebra with suitable examples.


 Relational Algebra, was first created by Edgar F Codd while at IBM. It was used for
modelling the data stored in relational databases and defining queries on it.
 It is a procedural query language used to query the database tables using SQL.
 Relational algebra operations are performed recursively on a relation (table) to yield an
output. The output of these operations is a new relation, which might be
Relational Algebra is divided into various groups
Unary Relational Operations
 SELECT ( symbol : σ)
 PROJECT ( symbol : Π)
Relational Algebra Operations from Set Theory
 UNION (∪)
 INTERSECTION (∩)
 DIFFERENCE (−)
 CARTESIAN PRODUCT (X)
Example : STUDENT
Studno Name Course
cs1 Bala Bigdata
cs2 Sundar Python
cs3 Veeru R Language
cs4 Ganesh Bigdata

Unary Relational Operations


 Select command – ( symbol : σ )
The SELECT operation is used for selecting a subset with tuples according to a given
condition. (i.e) It filters out all tuples that do not satisfy C.
General form:
σc ( R ) with a relation R and a condition C on the attributes of R.
Example:

σcourse = “Big Data” (STUDENT )


OUTPUT:
Studno Name Course
cs1 Bala Bigdata
cs4 Ganesh Bigdata

 Project command - (symbol : Π)


The projection eliminates all attributes of the input relation but those mentioned in
the projection list. The projection method defines a relation that contains a vertical
subset of Relation.
General form:
Π ( R ) with a relation R and a condition C on the attributes of R.
c
Example:

Πcourse (STUDENT)
OUTPUT:
Course
Bigdata
Python
R Language
Relational Algebra Operations from Set Theory
Example:
Table A Table B
Studno Name Studno Name
cs1 Bala cs1 Bala
cs2 Ganesh cs2 Ganesh
cs4 Veeru cs3 Rishi

UNION (Symbol :∪)


It includes all tuples that are in tables A or in B. It also eliminates duplicates. Set A Union
Set B would be expressed as A ∪ B.
Table A U B
Studno Name
cs1 Bala
cs2 Ganesh
cs3 Rishi
cs4 Veeru

SET DIFFERENCE ( Symbol : - )


The result of A – B, is a relation which includes all tuples that are in A but not in B.

Table A - B
Studno Name
cs4 Veeru

INTERSECTION (symbol : ∩)
The result of A∩B, is a relation which includes all tuples that are common in both A and
B.
Table A ∩ B
Studno Name
cs1 Bala
cs2 Ganesh

PRODUCT OR CARTESIAN PRODUCT (Symbol : X )


Cross product is a way of combining two relations. The resulting relation contains, both
relations being combined. A x B means A times B, where the relation A and B have
different attributes. This type of operation is helpful to merge columns from two relations.
Table A Table B
Studno Name Subid Subject
cs1 Bala S1 Bigdata
cs2 Ganesh S2 Python
Cartesian Product : Table A X Table B
Studno Name Subid Subject
cs1 Bala S1 Bigdata
cs1 Bala S2 Python
cs2 Ganesh S1 Bigdata
cs2 Ganesh S2 Python

5. Explain the characteristics of RDBMS.


Characteristics of Relational Database Management System
1. Ability to manipulate data RDBMS provides the facility to manipulate
data (store, modify and delete)in a data
base.

2. Reduced Redundancy Unnecessary repetition of data in database


was a big problem But RDBMS follows
Normalization to reduce data redundancy
and improves data integrity. It is an
integral part of RDBMS.

3.Data Consistency Data Consistency means that data values


are the same at all instances of a database.
On live data, it is being continuously
updated and added, maintaining the
consistency of data can become a
challenge. But RDBMS handles it by itself.
4. Support Multiple user and Concurrent RDBMS allows multiple users to work on it
Access at the same time and still manages to
maintain the data consistency.

5.Query Language RDBMS provides users with a simple query


language, using which data can be easily
fetched, inserted, deleted and updated in a
database.

6. Security RDBMS also provides protection and


security to the databases. In RDBMS, we
can create user accounts with different
access permissions, using which we can
easily secure our data by restricting user
access.
7. DBMS Supports Transactions It allows us to better handle and manage
data integrity in real world applications
where multi-threading is extensively used.
6. Components of DBMS:
The Database Management System can be divided into five major components as follows:
1.Hardware
2.Software
3.Data
4 . Procedures / Methods
5.Database Access Languages

1. Hardware: The computer, hard disk, I/O channels and any other physical component
involved in storage of data
2. Software: It is a program that controls everything. It is capable of understanding the
Database Access Languages and interprets into database commands for execution.
3. Data: It is that resource for which DBMS is designed. DBMS creation is to store and utilize
data.
4. Procedures/Methods: They are general instructions to use a DBMS such as installation,
manage databases to take backups, report generation, etc.
5. Data Base Access Languages: They are the languages used to write commands to access,
insert, update and delete data stored in any database. Examples of popular DBMS: Dbase,
FoxPro

Data:
Data are raw facts stored in a computer. A data may contain any character, text, word or a
number. Ex: Name: Bala Age: 20
Information:
Information is formatted data, Here data appears as a set of words and numbers. However,
when the data is processed, organized and formatted, it gives meaningful information.
Ex: Bala is 20 years old.
Data Base Management System (DBMS):
A DBMS is a soft ware that allows us to create, define and manipulate database, allowing users
to store, process and analyze data easily. DBMS also provides protection and security to the
databases. Examples of DBMS software’s are: FoxPro, dbase.
Advantages of RDBMS
• Segregation of application program
• Minimal data duplication or Data Redundancy
• Easy retrieval of data using the Query Language
• Reduced development time and maintenance
Database Structure:
Data is stored into tables, created inside the database.
Table: (File)
Table is the entire collection of related data in one table, referred to as a File or Table where the
data is organized as row and column. A Table is known as a RELATION.
Row: (Record)
Each row in a table represents a record, which is a set of data for each database entry. A Row is
known as a TUPLE.
Column: (Field)
Each table column represents a Field, which groups each piece or item of data among the
records into specific categories or types of data. A Column is known as an ATTRIBUTE.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy