0% found this document useful (0 votes)
7 views

DBMS Assignment 1 Bahria University Lahore Campus 2024

The document discusses the relational database model proposed by E.F. Codd in 1970. It explains key concepts like relations, tuples, attributes, keys and how they differ from previous hierarchical and network models. The significance of candidate keys and normalization process involving 1NF, 2NF and 3NF are described. Primary operations for manipulating relational data like select, project, join etc. are also covered.

Uploaded by

Muhammad Hasnain
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)
7 views

DBMS Assignment 1 Bahria University Lahore Campus 2024

The document discusses the relational database model proposed by E.F. Codd in 1970. It explains key concepts like relations, tuples, attributes, keys and how they differ from previous hierarchical and network models. The significance of candidate keys and normalization process involving 1NF, 2NF and 3NF are described. Primary operations for manipulating relational data like select, project, join etc. are also covered.

Uploaded by

Muhammad Hasnain
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/ 4

DBMS

BSCS 4-B
Department of Computer Science
Bahria University, Lahore Campus

Assignment: [1]
Date: Week 3, Feb 2024
Name: Muhammad Hasnain Awan

Roll No: 03 – 134222 - 063


Evaluation of CLO Question Marks Obtained
Number Marks

CLO1: Explain the fundamental concepts of 1 5


databases

Total Marks 5

Q1: Read the paper “A relational model of data for large shared data banks, Codd, E. F. (1970). Answer
the following questions
1: Explain the concept of the relational model as proposed by Codd. How does it differ from earlier
models of data organization?
CONCEPT
The concept involves structuring data into tables, where individual rows represent distinct
records and columns denote specific attributes. Connections between tables are established using
unique identifiers known as keys. This enables efficient linking and querying of data through SQL,
offering a systematic and organized method for storing and retrieving information. Consequently, this
approach is extensively employed in Database Management Systems (DBMS).
DIFFERENCE
Previous models such as hierarchical and network structures employed more intricate data
organization, relying on pointers or links to establish connections, which posed challenges in terms of
retrieval and manipulation. In contrast, the relational model streamlines data organization through the
use of tables, rows, and columns, facilitating simpler querying and data management. Additionally, it
underscores the notion of data independence, allowing modifications to the database structure without
impacting the application programs utilizing the data.
2: What are the primary components of a relation, and how do they relate to traditional data storage
mechanisms?
PRIMARY COMPONENTS

• Tables: It’s made up of rows and columns. Tables is also known as relation in DBMS context.
• Attributes: The properties of data are known as attributes. Each attribute has a name and a data
type. In other words, the column header in a table is known as attribute.
• Tuples: It is also known as rows. Each tuple represents individual records of data and contains a
set of values corresponding to the attributes defined in the table.
• Keys: These are the special attributes that uniquely identify each tuple in a relation. They help in
establishing relationships between different tables.

Table / Relation

ATTRIBUTES
TUPLE

Key

RELATION TO TRADITIONAL DATA STORAGE


• Tables: Tables are similar to spreadsheets or flat files where data is stored in rows and columns.
• Attributes: Attributes correspond to the fields or columns in traditional data storage, where
each field holds a specific characteristic of data.
• Tuples: Tuples are similar to records or rows in traditional data storage, where each rows
represents a single entry or set of data corresponding to the attributes.
• Keys: Keys work similar to primary key or unique identifiers in traditional data storage, ensuring
each record is uniquely identifiable.
3: In the context of relational databases, explain the significance of the "candidate key" and how it
contributes to ensuring data integrity?
CANDIDATE KEY
The attribute or set of attributes that can be used as primary key is known as candidate key. It is
a set of attributes that uniquely identifies each tuple.
CONTRIBUTION TO DATA INTEGRITY
• Uniqueness: A candidate key ensures that no two tuples in a relation can have the same
combination of values for attributes in the key. This uniqueness prevents duplicate records in
the database, maintaining data integrity.

• Identification: Candidate keys help identify individual tuples within a relation, making it easier
to retrieve and manipulate specific data without ambiguity.

• Primary Key Selection: From the set of candidate keys, one is selected as the primary key. The
primary key becomes the main identifier for the tuples in the table and is used to establish
relationships with other tables. This selection is crucial for maintaining consistency and
referential integrity in the database.

4: Describe the process of normalization as outlined by Codd?


Normalization is the process of creating a more straightforward and dependable database structure. The
objective is to organize the database in a manner that reduces redundancy, ensures data integrity, and
facilitates efficient querying and maintenance. This process operates through three normal forms:

• First Normal Form (1NF): A relation achieves 1NF when every intersection of rows and columns
contains only atomic values, eliminating any repeating groups. A repeating group refers to a
collection of one or more data items that may appear a variable number of times in a tuple.

• Second Normal Form (2NF): A relation attains 2NF if it is in 1NF, and every non-key attribute is
fully functionally dependent on the primary key. This involves breaking down tables into smaller
ones to eliminate partial dependencies. Partial Dependency is a form of dependency where one
or more non-key attributes rely on a part of the primary key.

• Third Normal Form (3NF): A relation is in 3NF if it is in 2NF, and there are no transitive
dependencies. Transitive Dependency is a type of functional dependency where a non-key
attribute depends on another non-key attribute.
5: Explore the operations introduced by Codd for manipulating data within the relational model?
Operations introduced by Codd for manipulating data within the relational model are given below:
1. Select: This operation retrieves specific rows from a table based on specified conditions.
2. Project: It selects specific columns from a table while retaining all rows.
3. Union: Combines the results of two queries into a single result set, eliminating duplicates.
4. Intersect: Retrieves rows that are common to the results of two queries.
5. Difference: Retrieves rows that are present in the first query but not in the second query.
6. Cartesian Product: Combines every row of one table with every row of another table, creating a
new table with all possible combinations.
7. Join: Combines related rows from two or more tables based on a related column between them.

You might also like