SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page1
Pondicherry University Community College
Department of Computer Science
Course : B.Voc [Software Development]
Year : II
Semester : III
Subject : Relational DataBase Management System
Unit I Study Materials and Model Questions
Prepared by
D.GAYA
Assistant Professor,
Department of Computer Science,
Pondicherry University Community College,
Lawspet, Puducherry-08.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page2
Unit I
Unit - I
Introduction to Database System – Objectives – Entities and Attributes – Data Models.
Introduction to DataBase System
Introduction
A database is an organized collection of data, generally stored and accessed
electronically from a computer system. The term "database" is also used to refer to any of the
DBMS, the database system or an application associated with the database.
Because of the close relationship between them, the term "database" is often used
casually to refer to both a database and the DBMS used to manipulate it.
A school class register is a database where names are arranged alphabetically.
Databases have been around since people started recording things. Here we tend to focus on
electronic ones.
Data
Data are raw facts stored in a computer. A data may contain any character, text, word
or a number.
Example : 600006, DPI Campus, SCERT, Chennai, College Road
Information
Information is formatted data, which allows to be utilized in a significant way.
DataBase
Database is a repository collection of related data organized in a way that data can be
easily accessed, managed and updated. Database can be a software or hardware based, with
one sole purpose of storing data.
DataBase Management System
A DBMS is software that allows us to create, define and manipulate database,
allowing users to store, process and analyze data easily.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page3
DBMS provides us with an interface or a tool, to perform various operations to create
a database, storing of data and for updating data, etc.
DBMS also provides protection and security to the databases. It also maintains data
consistency in case of multiple users.
Characteristics of Database Management System
Data Stored into Table
Data is never directly stored into the database. Data is stored into tables, created
inside the database. DBMS also allows to have relationship between tables which makes the
data more meaningful and connected.
Reduced Redundancy
In the modern world hard drives are very cheap, but earlier when hard drives were too
expensive, unnecessary repetition of data in database was a big problem But DBMS follows
Normalisation which divides the data in such a way that repetition is minimum.
Data Consistency
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.
Support multiple user and concurrent Access
DBMS allows multiple users to work on it(update, insert, delete data) at the same time
and still manages to maintain the data consistency.
Query Lanaguage
DBMS provides users with a simple query language, using which data can be easily
fetched, inserted, deleted and updated in a database
Security
The DBMS also takes care of the security of data, protecting the data from
unauthorized access. In a typical DBMS, we can create user accounts with different access
permissions, using which we can easily secure our data by restricting user access.
DBMS Support Transaction
It allows us to better handle and manage data integrity in real world applications
where multi-threading is extensively used.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page4
Advantages of DBMS
• Segregation of application program
• Minimal data duplication or Data Redundancy
• Easy retrieval of data using the Query Language
• Reduced development time and maintenance
Data Structure
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.
Each row in a table represents a record, which is a set of data for each database entry.
Each table column represents a Field, which groups each piece or item of data among
the records into specific categories or types of data. Eg. StuNo., StuName, StuAge, StuClass,
StuSec.
• A Table is known as a RELATION
• A Row is known as a TUPLE
• A column is known as an ATTRIBUTE
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page5
Entities and Attributes
An Entity–relationship model (ER model) describes the structure of a database with
the help of a diagram, which is known as Entity Relationship Diagram (ER Diagram).
An ER model is a design or blueprint of a database that can later be implemented as a
database. The main components of E-R model are: entity set and relationship set.
What is an ER DIAGRAM?
An ER diagram shows the relationship among entity sets. An entity set is a group of
similar entities and these entities can have attributes. In terms of DBMS, an entity is a table
or attribute of a table in database, so by showing relationship among tables and their
attributes, ER diagram shows the complete logical structure of a database. Let’s have a look
at a simple ER diagram to understand this concept.
A simple ER Diagram:
In the following diagram we have two entities Student and College and their
relationship. The relationship between Student and College is many to one as a college can
have many students however a student cannot study in multiple colleges at the same time.
Student entity has attributes such as Stu_Id, Stu_Name & Stu_Addr and College entity has
attributes such as Col_ID & Col_Name.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page6
Components of a ER
As shown in the above diagram, an ER diagram has three main components as
follows
1. Entity
2. Attribute
3. Relationship
1. Entity
An entity is a “thing” or “object” in the real world that is distinguishable from all other
objects. For example, each person in an enterprise is an entity. An entity has a set of properties, and
the values for some set of properties may uniquely identify an entity.
An entity set is a set entity set of entities of the same type that share the some properties,
or attributes. The set of all persons who are customers at a given bank, for example, can be defined
as the entity set customer.
An entity can be a person, place, event, or object that is relevant to a given system.
• Weak Entity: The entity set which does not have sufficient attributes to form a Weak Entity
Primary key is called as Weak entity. Member of weak entity set is called as
Subordinate entity.
• Strong Entity: An entity set that has a primary key is called as Strong entity. A
Member of a strong entity set is called dominant entity.
An entity is an object or component of data. An entity is represented as rectangle in an
ER diagram. For example: In the following ER diagram we have two entities Student and
College and these two entities have many to one relationship as many students study in a
single college. We will read more about relationships later, for now focus on entities.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page7
Weak Entity:
An entity that cannot be uniquely identified by its own attributes and relies on the
relationship with other entity is called weak entity. The weak entity is represented by a
double rectangle.
For example – a bank account cannot be uniquely identified without knowing the
bank to which the account belongs, so bank account is a weak entity.
2. Attribute
An attribute describes the property of an entity. An attribute is represented as Oval in
an ER diagram. There are four types of attributes:
1. Key attribute
2. Composite attribute
3. Multivalued attribute
4. Derived attribute
1. Key attributes:
A key attribute can uniquely identify an entity from an entity set. For example,
student roll number can uniquely identify a student from a set of students. Key attribute is
represented by oval same as other attributes however the text of key attribute is underlined.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page8
2. Composite attribute:
An attribute that is a combination of other attributes is known as composite attribute.
For example, In student entity, the student address is a composite attribute as an address is
composed of other attributes such as pin code, state, country.
3. Multivalued attribute:
An attribute that can hold multiple values is known as multivalued attribute. It is
represented with double ovals in an ER Diagram. For example – A person can have more
than one phone numbers so the phone number attribute is multivalued.
4. Derived attribute:
A derived attribute is one whose value is dynamic and derived from another attribute.
It is represented by dashed oval in an ER Diagram. For example – Person age is a derived
attribute as it changes over time and can be derived from another attribute (Date of birth).
E-R diagram with multivalued and derived attributes:
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page9
3. Relationship
A relationship is represented by diamond shape in ER diagram; it shows the
relationship among entities. There are four types of relationships:
1. One to One
2. One to Many
3. Many to One
4. Many to Many
1. One to One Relationship
When a single instance of an entity is associated with a single instance of another
entity then it is called one to one relationship. For example, a person has only one passport
and a passport is given to one person.
2. One to Many Relationship
When a single instance of an entity is associated with more than one instances of
another entity then it is called one to many relationship. For example – a customer can place
many orders but a order cannot be placed by many customers.
3. Many to One Relationship
When more than one instances of an entity is associated with a single instance of
another entity then it is called many to one relationship. For example – many students can
study in a single college but a student cannot study in many colleges at the same time.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page10
4. Many to Many Relationship
When more than one instances of an entity is associated with more than one instances
of another entity then it is called many to many relationship. For example, a can be assigned
to many projects and a project can be assigned to many students.
Data Model
Data models define how the logical structure of a database is modified. Data models
are fundamental entities to introduce abstraction in DBMS.
Data models define how data is connected to each other and how they are processed
and stored inside the system.
Within the database environment, a data model represents data structures and their
characteristics, relations, constraints, transformations, and other constructs with the purpose
of supporting a specific problem domain.
Data models can facilitate interaction among the designer, the applications
programmer, and the end user.
A well-developed data model can even foster improved understanding of the
organization for which the database design is developed. In short, data models are a
communication tool.
Types of Data Model
Following are the different types of a Data Model
• Hierarchical Model
• Relational Model
• Network Database Model
• Entity Relationship Model
• Object Model
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page11
Hierarchical Model
Hierarchical model was developed by
IBM as Information Management System. In
Hierarchical model, data is represented as a
simple tree like structure form.
This model represents a one-to-many
relationship i.e. parent-child relationship. One
child can have only one parent but one parent can
have many children. This model is mainly used in
IBM Main Frame computers.
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.
The basic structure of data 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)).
Network Model
Network database model is an
extended form of hierarchical data model.
The difference between hierarchical and
Network data model is :
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page12
In hierarchical model, a child record has only one parent node,
In a Network model, a child may have many parent nodes. It represents the data in
many-to-many relationships. This model is easier and faster to access the data. School
represents the parent node Library, Office and Staff room is a child to school (parent node)
Student is a child to library, office and staff room (one to many relationship)
Entity Relationship Model. (ER model)
In this database model,
relationship is created by dividing the
object into entity and its
characteristics into attributes.
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. Rectangle
represents the entities.
E.g. Doctor and Patient Ellipse represent 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
Object Model
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 behaviours. 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.
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page13
• 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.
Unit I Important Questions
Two Mark Question
1. What is mean by DataBase?
2. Define data and Information?
3. What are the Characteristics available in DBMS?
4. What is mean by Reduced Redundancy
5. What is mean by Data Consistency
6. Advantages of DBMS?
7. Define Data Structure?
8. Define Entity Relationship?
9. What are the Components available in ER ?
10. Define Entity set?
11. Types of Entity?
12. Define Strong and Week Entity?
13. What is mean by Attributes?
14. What is mean by Relationship?
15. Types of Attributes?
16. Types of Relationship?
17. Define Data Model?
18. Define ER Diagram?
19. Types of data Model?
20. Define ER model?
Five Marks
21. Describe DBMS?
22. Describe Attributes Types?
Describe types of Relationship?
23. Describe Data structures?
24. Describe ER model and Network Model?
Ten Marks
25. Explain Characteristics of DBMS?
26. Explain Entity and Attributes?
27. Explain Data Model?
D.GAYA, Assistant Professor, Department of Computer Science, PUCC.
Page14

Contenu connexe

Tendances

Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureKunal Anand
 
Fundamentals of Database system
Fundamentals of Database systemFundamentals of Database system
Fundamentals of Database systemphilipsinter
 
L7 data model and dbms architecture
L7  data model and dbms architectureL7  data model and dbms architecture
L7 data model and dbms architectureRushdi Shams
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
What is data model? And types.
What is data model? And types.What is data model? And types.
What is data model? And types.774477
 
DBMS topics for BCA
DBMS topics for BCADBMS topics for BCA
DBMS topics for BCAAdbay
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbmsAnjaan Gajendra
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databasePradnya Saval
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMSKr Shrishant
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management SystemAjay Jha
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersAbdul Rahman Sherzad
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER DiagramsAdri Jovin
 
Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Sahan Walpitagamage
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management SystemAmiya9439793168
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and DevelopmentEr. Nawaraj Bhandari
 

Tendances (20)

Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
 
Fundamentals of Database system
Fundamentals of Database systemFundamentals of Database system
Fundamentals of Database system
 
L7 data model and dbms architecture
L7  data model and dbms architectureL7  data model and dbms architecture
L7 data model and dbms architecture
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
What is data model? And types.
What is data model? And types.What is data model? And types.
What is data model? And types.
 
DBMS topics for BCA
DBMS topics for BCADBMS topics for BCA
DBMS topics for BCA
 
Database Lecture Notes
Database Lecture NotesDatabase Lecture Notes
Database Lecture Notes
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMS
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management System
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
Dbms 2: Data Model
Dbms 2: Data ModelDbms 2: Data Model
Dbms 2: Data Model
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
 
Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and Development
 

Similaire à Unit1 rdbms study_materials

Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxnirajsharmapuneiat
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML نبيله نواز
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)SURBHI SAROHA
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)SURBHI SAROHA
 
DBMS-7.pptx
DBMS-7.pptxDBMS-7.pptx
DBMS-7.pptxkingVox
 
chapter-13-database-concepts.pdf
chapter-13-database-concepts.pdfchapter-13-database-concepts.pdf
chapter-13-database-concepts.pdfstudy material
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMSAbhishekRajpoot8
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptxkingVox
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship ModellingBhandari Nawaraj
 
Geographic Information systems
Geographic Information systemsGeographic Information systems
Geographic Information systemsRajalakshmiS34
 
Geographic Information System unit 2
Geographic Information System unit 2Geographic Information System unit 2
Geographic Information System unit 2sridevi5983
 
Database System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxDatabase System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxKoteswari Kasireddy
 

Similaire à Unit1 rdbms study_materials (20)

Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptx
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)
 
database
databasedatabase
database
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
 
DBMS-7.pptx
DBMS-7.pptxDBMS-7.pptx
DBMS-7.pptx
 
chapter-13-database-concepts.pdf
chapter-13-database-concepts.pdfchapter-13-database-concepts.pdf
chapter-13-database-concepts.pdf
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMS
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptx
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Geographic Information systems
Geographic Information systemsGeographic Information systems
Geographic Information systems
 
Geographic Information System unit 2
Geographic Information System unit 2Geographic Information System unit 2
Geographic Information System unit 2
 
Spatial Data Models
Spatial Data Models Spatial Data Models
Spatial Data Models
 
UNIT II DBMS.pptx
UNIT II DBMS.pptxUNIT II DBMS.pptx
UNIT II DBMS.pptx
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
Database System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxDatabase System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptx
 
Data Models
Data ModelsData Models
Data Models
 
Data Abstraction
Data AbstractionData Abstraction
Data Abstraction
 
DBMS Part 1.pptx
DBMS Part 1.pptxDBMS Part 1.pptx
DBMS Part 1.pptx
 

Dernier

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Dernier (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

Unit1 rdbms study_materials

  • 1. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page1 Pondicherry University Community College Department of Computer Science Course : B.Voc [Software Development] Year : II Semester : III Subject : Relational DataBase Management System Unit I Study Materials and Model Questions Prepared by D.GAYA Assistant Professor, Department of Computer Science, Pondicherry University Community College, Lawspet, Puducherry-08.
  • 2. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page2 Unit I Unit - I Introduction to Database System – Objectives – Entities and Attributes – Data Models. Introduction to DataBase System Introduction A database is an organized collection of data, generally stored and accessed electronically from a computer system. The term "database" is also used to refer to any of the DBMS, the database system or an application associated with the database. Because of the close relationship between them, the term "database" is often used casually to refer to both a database and the DBMS used to manipulate it. A school class register is a database where names are arranged alphabetically. Databases have been around since people started recording things. Here we tend to focus on electronic ones. Data Data are raw facts stored in a computer. A data may contain any character, text, word or a number. Example : 600006, DPI Campus, SCERT, Chennai, College Road Information Information is formatted data, which allows to be utilized in a significant way. DataBase Database is a repository collection of related data organized in a way that data can be easily accessed, managed and updated. Database can be a software or hardware based, with one sole purpose of storing data. DataBase Management System A DBMS is software that allows us to create, define and manipulate database, allowing users to store, process and analyze data easily.
  • 3. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page3 DBMS provides us with an interface or a tool, to perform various operations to create a database, storing of data and for updating data, etc. DBMS also provides protection and security to the databases. It also maintains data consistency in case of multiple users. Characteristics of Database Management System Data Stored into Table Data is never directly stored into the database. Data is stored into tables, created inside the database. DBMS also allows to have relationship between tables which makes the data more meaningful and connected. Reduced Redundancy In the modern world hard drives are very cheap, but earlier when hard drives were too expensive, unnecessary repetition of data in database was a big problem But DBMS follows Normalisation which divides the data in such a way that repetition is minimum. Data Consistency 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. Support multiple user and concurrent Access DBMS allows multiple users to work on it(update, insert, delete data) at the same time and still manages to maintain the data consistency. Query Lanaguage DBMS provides users with a simple query language, using which data can be easily fetched, inserted, deleted and updated in a database Security The DBMS also takes care of the security of data, protecting the data from unauthorized access. In a typical DBMS, we can create user accounts with different access permissions, using which we can easily secure our data by restricting user access. DBMS Support Transaction It allows us to better handle and manage data integrity in real world applications where multi-threading is extensively used.
  • 4. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page4 Advantages of DBMS • Segregation of application program • Minimal data duplication or Data Redundancy • Easy retrieval of data using the Query Language • Reduced development time and maintenance Data Structure 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. Each row in a table represents a record, which is a set of data for each database entry. Each table column represents a Field, which groups each piece or item of data among the records into specific categories or types of data. Eg. StuNo., StuName, StuAge, StuClass, StuSec. • A Table is known as a RELATION • A Row is known as a TUPLE • A column is known as an ATTRIBUTE
  • 5. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page5 Entities and Attributes An Entity–relationship model (ER model) describes the structure of a database with the help of a diagram, which is known as Entity Relationship Diagram (ER Diagram). An ER model is a design or blueprint of a database that can later be implemented as a database. The main components of E-R model are: entity set and relationship set. What is an ER DIAGRAM? An ER diagram shows the relationship among entity sets. An entity set is a group of similar entities and these entities can have attributes. In terms of DBMS, an entity is a table or attribute of a table in database, so by showing relationship among tables and their attributes, ER diagram shows the complete logical structure of a database. Let’s have a look at a simple ER diagram to understand this concept. A simple ER Diagram: In the following diagram we have two entities Student and College and their relationship. The relationship between Student and College is many to one as a college can have many students however a student cannot study in multiple colleges at the same time. Student entity has attributes such as Stu_Id, Stu_Name & Stu_Addr and College entity has attributes such as Col_ID & Col_Name.
  • 6. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page6 Components of a ER As shown in the above diagram, an ER diagram has three main components as follows 1. Entity 2. Attribute 3. Relationship 1. Entity An entity is a “thing” or “object” in the real world that is distinguishable from all other objects. For example, each person in an enterprise is an entity. An entity has a set of properties, and the values for some set of properties may uniquely identify an entity. An entity set is a set entity set of entities of the same type that share the some properties, or attributes. The set of all persons who are customers at a given bank, for example, can be defined as the entity set customer. An entity can be a person, place, event, or object that is relevant to a given system. • Weak Entity: The entity set which does not have sufficient attributes to form a Weak Entity Primary key is called as Weak entity. Member of weak entity set is called as Subordinate entity. • Strong Entity: An entity set that has a primary key is called as Strong entity. A Member of a strong entity set is called dominant entity. An entity is an object or component of data. An entity is represented as rectangle in an ER diagram. For example: In the following ER diagram we have two entities Student and College and these two entities have many to one relationship as many students study in a single college. We will read more about relationships later, for now focus on entities.
  • 7. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page7 Weak Entity: An entity that cannot be uniquely identified by its own attributes and relies on the relationship with other entity is called weak entity. The weak entity is represented by a double rectangle. For example – a bank account cannot be uniquely identified without knowing the bank to which the account belongs, so bank account is a weak entity. 2. Attribute An attribute describes the property of an entity. An attribute is represented as Oval in an ER diagram. There are four types of attributes: 1. Key attribute 2. Composite attribute 3. Multivalued attribute 4. Derived attribute 1. Key attributes: A key attribute can uniquely identify an entity from an entity set. For example, student roll number can uniquely identify a student from a set of students. Key attribute is represented by oval same as other attributes however the text of key attribute is underlined.
  • 8. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page8 2. Composite attribute: An attribute that is a combination of other attributes is known as composite attribute. For example, In student entity, the student address is a composite attribute as an address is composed of other attributes such as pin code, state, country. 3. Multivalued attribute: An attribute that can hold multiple values is known as multivalued attribute. It is represented with double ovals in an ER Diagram. For example – A person can have more than one phone numbers so the phone number attribute is multivalued. 4. Derived attribute: A derived attribute is one whose value is dynamic and derived from another attribute. It is represented by dashed oval in an ER Diagram. For example – Person age is a derived attribute as it changes over time and can be derived from another attribute (Date of birth). E-R diagram with multivalued and derived attributes:
  • 9. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page9 3. Relationship A relationship is represented by diamond shape in ER diagram; it shows the relationship among entities. There are four types of relationships: 1. One to One 2. One to Many 3. Many to One 4. Many to Many 1. One to One Relationship When a single instance of an entity is associated with a single instance of another entity then it is called one to one relationship. For example, a person has only one passport and a passport is given to one person. 2. One to Many Relationship When a single instance of an entity is associated with more than one instances of another entity then it is called one to many relationship. For example – a customer can place many orders but a order cannot be placed by many customers. 3. Many to One Relationship When more than one instances of an entity is associated with a single instance of another entity then it is called many to one relationship. For example – many students can study in a single college but a student cannot study in many colleges at the same time.
  • 10. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page10 4. Many to Many Relationship When more than one instances of an entity is associated with more than one instances of another entity then it is called many to many relationship. For example, a can be assigned to many projects and a project can be assigned to many students. Data Model Data models define how the logical structure of a database is modified. Data models are fundamental entities to introduce abstraction in DBMS. Data models define how data is connected to each other and how they are processed and stored inside the system. Within the database environment, a data model represents data structures and their characteristics, relations, constraints, transformations, and other constructs with the purpose of supporting a specific problem domain. Data models can facilitate interaction among the designer, the applications programmer, and the end user. A well-developed data model can even foster improved understanding of the organization for which the database design is developed. In short, data models are a communication tool. Types of Data Model Following are the different types of a Data Model • Hierarchical Model • Relational Model • Network Database Model • Entity Relationship Model • Object Model
  • 11. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page11 Hierarchical Model Hierarchical model was developed by IBM as Information Management System. In Hierarchical model, data is represented as a simple tree like structure form. This model represents a one-to-many relationship i.e. parent-child relationship. One child can have only one parent but one parent can have many children. This model is mainly used in IBM Main Frame computers. 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. The basic structure of data 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)). Network Model Network database model is an extended form of hierarchical data model. The difference between hierarchical and Network data model is :
  • 12. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page12 In hierarchical model, a child record has only one parent node, In a Network model, a child may have many parent nodes. It represents the data in many-to-many relationships. This model is easier and faster to access the data. School represents the parent node Library, Office and Staff room is a child to school (parent node) Student is a child to library, office and staff room (one to many relationship) Entity Relationship Model. (ER model) In this database model, relationship is created by dividing the object into entity and its characteristics into attributes. 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. Rectangle represents the entities. E.g. Doctor and Patient Ellipse represent 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 Object Model 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 behaviours. 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.
  • 13. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page13 • 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. Unit I Important Questions Two Mark Question 1. What is mean by DataBase? 2. Define data and Information? 3. What are the Characteristics available in DBMS? 4. What is mean by Reduced Redundancy 5. What is mean by Data Consistency 6. Advantages of DBMS? 7. Define Data Structure? 8. Define Entity Relationship? 9. What are the Components available in ER ? 10. Define Entity set? 11. Types of Entity? 12. Define Strong and Week Entity? 13. What is mean by Attributes? 14. What is mean by Relationship? 15. Types of Attributes? 16. Types of Relationship? 17. Define Data Model? 18. Define ER Diagram? 19. Types of data Model? 20. Define ER model? Five Marks 21. Describe DBMS? 22. Describe Attributes Types? Describe types of Relationship? 23. Describe Data structures? 24. Describe ER model and Network Model? Ten Marks 25. Explain Characteristics of DBMS? 26. Explain Entity and Attributes? 27. Explain Data Model?
  • 14. D.GAYA, Assistant Professor, Department of Computer Science, PUCC. Page14