+ All Categories
Home > Education > Data Hierarchy & Keys (Database Management System)

Data Hierarchy & Keys (Database Management System)

Date post: 13-Feb-2017
Category:
Upload: university-of-education-lower-mall-lahore
View: 293 times
Download: 2 times
Share this document with a friend
10
Organization of Data DATABASE MANAGEMENT SYSTEM
Transcript
Page 1: Data Hierarchy & Keys (Database Management System)

Organization of DataDATABASE MANAGEMENT SYSTEM

Page 2: Data Hierarchy & Keys (Database Management System)

Data Hierarchy• Data is organized in a hierarchy that begins with the

smallest to the largest unit of data, as it progresses up the hierarchy.

Database

File

Record

Field

Byte

Bit

Page 3: Data Hierarchy & Keys (Database Management System)

Data Hierarchy• Bit (Either 0 or 1, Smallest unit of data)• Byte (Combination of 8 bits, Each byte makes 1

letter)• Field (Combination of bytes, Category)• Record (Combination of fields, Related to one

person, employee, student, member or organization)• File (Combination of records, Related to different

persons, employees, students, members or organizations)• Database (Combination of files, Largest unit of data)

Page 4: Data Hierarchy & Keys (Database Management System)
Page 5: Data Hierarchy & Keys (Database Management System)

Key (Database)• A value that is uniquely identified each record in a table.Examples• Roll No.• Student’s Name• Father’s Name• Course • Session• Date of Admission Etc.

Page 6: Data Hierarchy & Keys (Database Management System)

Types of Key• Candidate key is a column, or set of columns, in a table that can

uniquely identify any database record without referring to any other data. • Primary key (Each table may have one or more candidate keys, but

one candidate key is special, and it is called the primary key)• Alternative key is a key associated with one or more columns

whose values uniquely identify every row in the table, but which is not the primary key.• Super key is a combination of columns that uniquely identifies any

row. May be 2 or 3 or more, as according (Direct proportional) to data.• Foreign Key is a column (or columns) that references a column

(most often the primary key) of another table. The purpose of the foreign key is to ensure referential integrity of the data.

Page 7: Data Hierarchy & Keys (Database Management System)

Candidate keys

Primary key Alternati

ve keys

Page 8: Data Hierarchy & Keys (Database Management System)

Super keys

Page 9: Data Hierarchy & Keys (Database Management System)

Foreign keys

Foreign keys

Page 10: Data Hierarchy & Keys (Database Management System)

Recommended