2. Hello!
I am Vaishnavi
I am here because
presentation and seminar in
curriculum .
You can find me at
@vaishnavi.in
2
3. Disclaimer
.
.
Presentations are intended for educational purposes only and do not replace independent professional
judgment. Statements of fact and opinions expressed are those of Vaishnavi individually and, unless
expressly stated to the contrary, are not the opinion or position of the Society of Actuaries, its cosponsors,
or its committees. The Society of Actuaries does not endorse or approve, and assumes no responsibility for,
the content, accuracy or completeness of the information presented. Attendees should note that sessions
are audio-recorded and may be published in various media, including print, audio and video formats without
further notice.
3
4. Place your screenshot here
â˘1.Introduction
â˘2.History
â˘3.Relation Terminologies
â˘4.Objectives
â˘5.Advantages
â˘6.Disadvantages
â˘7.Keys
4
5. The most important motivation for the
research work that resulted in the relational
model was the objective of providing a
sharp and clear boundary between the
logical and physical aspects of database
management.
-- E. F . Codd (1982)
5
Submitted to-Anamika Sharma
(Lecturer)
6. Introduction
⢠Relational Database: A Practical Foundation for Productivity (1982)
⢠Relational Model represents how data is stored in Relational Databases.
⢠The relational model represents the database as a collection of relations.
⢠A relation is nothing but a table of values. Every row in the table
represents a collection of related data values.
⢠These rows in the table denote a real-world entity or relationship.
⢠Some popular Relational Database management systems are:
⢠DB2 and Informix Dynamic Server - IBM
⢠Oracle and RDB â Oracle
⢠SQL Server and Access - Microsoft
6
7. History
⪠The relational model was first proposed by E. F. Codd in his seminal paper âA relational
model of data for large shared data banksâ in 1970.
⪠The above paper caused a major revolution in the field of database management and earned
Dr. Codd the coveted ACM Turing Award
⪠The model uses the concept of a mathematical relation which looks somewhat like a table
of values âas its basic building block ,and has its theoretical basis in set theory and first
ordered predicate logic.
⪠The first commercial implementation of the relational model became available in the early
1980s,such as SQL/DS system on the MVS operating system by IBM and the Oracle
DBMS.
⪠Current popular relational DBMS (RDBMSs)include DB2 and Informix Dynamic Server(from
IBM),Oracle and Rdb (from Oracle) and SQL server and Access(from Microsoft).
7
8. Relation Terminologies
8
⢠Attribute: Each column in a Table. Attributes are the properties which define a relation.
⢠Tables â In the Relational model the, relations are saved in the table format. It is stored along with its entities. A
table has two properties rows and columns. Rows represent records and columns represent attributes.
⢠Tuple â It is nothing but a single row of a table, which contains a single record.
⢠Relation Schema: A relation schema represents the name of the relation with its attributes.
⢠Degree: The total number of attributes which in the relation is called the degree of the relation.
⢠Cardinality: Total number of rows present in the Table.
⢠Column: The column represents the set of values for a specific attribute.
⢠Relation instance â Relation instance is a finite set of tuples in the RDBMS system. Relation instances never have
duplicate tuples.
⢠Relation key - Every row has one, two or multiple attributes, which is called relation key.
⢠Attribute domain â Every attribute has some pre-defined value and scope which is known as attribute domain
10. Objectives
⢠To allow a high degree of data independence.
⢠To provide considerable grounds for dealing with data semantics, reliability, and
redundancy problems. Codd's theory for the relational model introduced the
concept of normalized relations, where relations that have no repeating groups and
the process is called normalization.
⢠To allow the expansion of set-oriented data manipulation languages.
10
11. Advantages
⪠Simplicity: A relational data model is simpler than the hierarchical and network
model.
⪠Structural Independence: The relational database is only concerned with data
and not with a structure. This can improve the performance of the model.
⪠Easy to use: The relational model is easy as tables consisting of rows and
columns is quite natural and simple to understand
⪠Query capability: It makes possible for a high-level query language like SQL to
avoid complex database navigation.
⪠Data independence: The structure of a database can be changed without having
to change any application.
⪠Scalable: Regarding a number of records, or rows, and the number of fields, a
database should be enlarged to enhance its usability.
11
12. Disadvantages
⪠Few relational databases have limits on field lengths which can't
be exceeded.
⪠Relational databases can sometimes become complex as the
amount of data grows, and the relations between pieces of data
become more complicated.
⪠Complex relational database systems may lead to isolated
databases where the information cannot be shared from one
system to another.
12
13. Keys
⢠A relation key is an attribute which can uniquely identify a particular
tuple(row) in a relation(table).
⢠It allow you to find the relation between two tables. Keys help you uniquely
identify a row in a table by a combination of one or more columns in that table.
Why we need a key?
⪠Keys help you to identify any row of data in a table. In a real-world application, a
table could contain thousands of records. Moreover, the records could be
duplicated. Keys ensure that you can uniquely identify a table record despite
these challenges.
⪠Allows you to establish a relationship between and identify the relation between
tables
⪠Help you to enforce identity and integrity in the relationship
13
14. Various keys
⢠DBMS has following types of Keys each have their different
functionality:
⢠Super Key
⢠Primary Key
⢠Natural /Domain/ Business Key
⢠Candidate Key
⢠Alternate Key(secondary Key)
⢠Foreign Key
⢠Compound Key
⢠Composite Key
⢠Surrogate Key(Artificial Key)
⢠Simple key
⢠Non -key Attribute
⢠Non-prime Attribute 14
15. Super key
⢠A super key is a group of single or multiple keys which identifies rows
in a table.
⢠A Super key may have additional attributes that are not needed for
unique identification.
15
16. Primary Key
⪠A column or group of columns in a table which helps us to uniquely identifies
every row in that table is called a primary key. This DBMS can't be a duplicate.
The same value can't appear more than once in the table.
Rules for defining Primary key:
⪠Two rows can't have the same primary key value
⪠It must for every row to have a primary key value.
⪠The primary key field cannot be null.
⪠The value in a primary key column can never be modified or updated if any
foreign key refers to that primary key.
16
17. Candidate Key
⢠A super key with no repeated attribute is called candidate key.
⢠The Primary key should be selected from the candidate keys. Every table must
have at least a single candidate key.
Properties of Candidate key:
⢠It must contain unique values
⢠Candidate key may have multiple attributes
⢠Must not contain null values
⢠It should contain minimum fields to ensure uniqueness
⢠Uniquely identify each record in a table
17
18. Alternate key
⢠All the keys which are not primary key are called an alternate key.
⢠It is a candidate key which is currently not the primary key. However, A table
may have single or multiple choices for the primary key.
18
19. Foreign Key
⢠A foreign key is a column which is added to create a relationship with another table.
⢠Foreign keys help us to maintain data integrity and also allows navigation between
two different instances of an entity. Every relationship in the model needs to be
supported by a foreign key.
19
20. Compound key
⪠Compound key has many fields which allow you to uniquely recognize a specific record.
⪠It is possible that each column may be not unique by itself within the database. However, when
combined with the other column or columns the combination of composite keys become unique.
⪠In this example, Order No and Product ID can't be a primary key as it does not uniquely identify a
record. However, a compound key of Order ID and Product ID could be used as it uniquely
identified each record
20
Order No. PorductID Product
Name
Quantity
B005 JAP102459 Mouse 5
B005 DKT321573 USB 10
B005 OMG446789 LCD Monitor 20
B004 DKT321573 USB 15
B002 OMG446789 Laser Printer 3
21. Surrogate Key
⢠An artificial key which aims to uniquely identify each record is called a surrogate key.
⢠These kind of key are unique because they are created when you don't have any natural primary
key.
⢠They do not lend any meaning to the data in the table. Surrogate key is usually an integer.
⢠Surrogate keys are allowed when
⢠No property has the parameter of the primary key.
⢠In the table when the primary key is too big or complicated
21
Fname Lastname Start Time End Time
Anne Smith 09:00 18:00
Jack Francis 08:00 17:00
Anna McLean 11:00 20:00
Shown Willam 14:00 23:00
(Artificial key)
22. Composite key
⢠Key that consists of two or more attributes that uniquely identify any record in a
table is called Composite key.
⢠But the attributes which together form the Composite key are not a key
independently or individually.
⢠The composite key may or may not a part of the foreign key
22
23. Some more keysâŚ
⢠Non-key attribute
The attribute excluding the candidate key.
⢠Non-prime attribute
Excluding primary attributes in a table .
⢠Simple Key
⢠Simple key is a single cell to specially identify a record
⢠The single cell cannot be divided into more cells.
⢠Primary key is a super set of simple key.
e.g.-student id is a single field because no other
Student will have same id. Therefore , it is a simple
key.
23
24. Some Questions
1.Statement 1: A tuple is a row in a relation
Statement 2: Existence of multiple foreign keys in a same relation is possible
a) Both the statements are true
b) Statement 1 is correct but Statement 2 is false
c) Statement 1 is false but Statement 2 is correct
d) Both the statements are false
2.What is an Instance of a Database?
a) The logical design of the database system
b) The entire set of attributes of the Database put together in a single relation
c) The state of the database system at any given point of time
d) The initial values inserted into the Database immediately after its creation
24
25. Answers
1.Explanation: A tuple is a row is a relation. There can exist multiple
foreign keys in the same relation because there can exist multiple
attributes in the relation that are primary keys in two or more other
relations.
2.Explanation: The state of the database system at any given point of
time is called as an Instance of the database.
25
26. 26
RRReferences
â˘Database System Concepts, -Silberschatz-Korth-Sudarshan
⢠Fourth Edition
â˘Fundamentals of Database System, -Elmasri-Navathe
⢠Sixth Edition
â˘www.tutorialpoint.com Accessed on 14th Aprilâ19
â˘