0% found this document useful (0 votes)
10 views4 pages

2MARKSS

The document provides an overview of key database concepts, including foreign keys, data definition language (DDL), and the relationship between databases and database management systems (DBMS). It also discusses logical and physical data independence, relational algebra operations, derived attributes, functional dependency, and the Entity-Relationship (ER) model. Additionally, it highlights the preference for Boyce-Codd Normal Form (BCNF) over Third Normal Form (3NF) for better normalization.

Uploaded by

crazymohan4334
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)
10 views4 pages

2MARKSS

The document provides an overview of key database concepts, including foreign keys, data definition language (DDL), and the relationship between databases and database management systems (DBMS). It also discusses logical and physical data independence, relational algebra operations, derived attributes, functional dependency, and the Entity-Relationship (ER) model. Additionally, it highlights the preference for Boyce-Codd Normal Form (BCNF) over Third Normal Form (3NF) for better normalization.

Uploaded by

crazymohan4334
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

1. Define foreign key with an example.

• Foreign key is a single attribute or collection of attributes in one table that refers to the
primary key of another table.
• For example – Consider a Student database as Student (RollNo, Name, Address) and
Course (CourseID, CourseName, RollNo). Here RollNo is a foreign key

2. What is data definition language?


• Data Definition Language (DDL) is a specialized language used to specify a database
schema by a set of definitions.
• It is a language which is used for creating and modifying the structures of tables, views,
indexes and so on.
• Some of the common commands used in DDL are -CREATE, ALTER, DROP.

3. Relate the terms database, database management system.


The terms Database and Database Management System (DBMS) are closely related but distinct
concepts in the field of data storage and management.
1. Database
A database is an organized collection of related data that is stored and managed electronically.
It enables users to efficiently store, retrieve, and manipulate data.
Example: A university database might store information about students, courses, and faculty.
Characteristics:
• Stores large amounts of structured data.
• Ensures data consistency and integrity.
• Can be accessed using queries.
2. Database Management System (DBMS)
A Database Management System (DBMS) is software that allows users to create, manage, and
interact with databases. It provides tools to insert, update, delete, and retrieve data efficiently.
Example: MySQL, PostgreSQL, Oracle DB, and Microsoft SQL Server.
Functions of a DBMS:
• Data Storage and Retrieval – Organizes and provides access to data.
• Data Security – Ensures authorized access to data.
• Concurrency Control – Allows multiple users to access data simultaneously.
• Backup and Recovery – Protects data from failures.

4. What is the difference between logical data independence and physical data
Independence?
Logical data Independence Physical data Independence
• This is a kind of data independence • This is a kind of data independence
which allows the modification of which allows the modification of
conceptual schema without requiring physical schema without requiring
any change to the external schema. any change to the conceptual
schema.
• For example - Any change in the • For example - if there is any change
table structure such as addition or in memory size of database server
deletion of some column does not then it will not affect the logical
affect user views. structure of any data object.
5. List some relational algebra operations.
• Selection (σ)
• Projection (π)
• Cartesian Product (×)
• Rename (ρ)

6. What is the derived attribute? Give example.


• Derived attributes are the attributes that contain values that are calculated from
other attributes.
• To represent derived attribute there is dotted ellipse inside the solid ellipse.
• For example -Age can be derived from attribute DateOfBirth. In this situation,
DateOfBirth might be called Stored Attribute.

7. What is functional dependency? Give example.


Let P and Q be sets of columns, then:
• P functionally determines Q written P - Q and only if any two rows that are equal on
(all the attributes in) P must be equal on (all the
attributes in) Q
• In other words, the functional dependency holds if TI.P = T2.P, then 110-120
Where notation TI.P projects the tuple TI onto the attribute in P.
8. Transform the following ER diagram into a relational schema diagram.

Step 1: Identify Entities and Their Attributes


From the ER diagram, we can see two entities:
Book
Attributes: ISBN (Primary Key), Title, Edition
Chapter
Attributes: Number (Primary Key), Title
Step 2: Identify Relationships
Relationship: "Belongs"
This indicates that a Chapter belongs to a Book.
There is a one-to-many (1:M) relationship (one book has many chapters).
Step 3: Convert to Relational Schema
We create the relational tables as follows:
9. Define Entity, Relational and attributes in ER model.
Entity, Relationship, and Attributes in the ER Model
The Entity-Relationship (ER) Model is a high-level conceptual data model used to define data
structures and relationships in a database.
1. Entity
An entity is a real-world object that can have distinct characteristics and can be identified
uniquely. Entities are represented as rectangles in an ER diagram.
Types of Entities:
• Strong Entity
• Weak Entity

2. Relationship
A relationship represents the association between two or more entities. It is shown as a diamond
in an ER diagram.
Types of Relationships:
One-to-One (1:1)
One-to-Many (1:M)
Many-to-One (M:1)

Many-to-Many (M:M)
3. Attributes
Attributes define the properties or characteristics of an entity. They are represented as ovals in
an ER diagram.
Types of Attributes:
• Simple Attribute
• Composite Attribute
• Derived Attribute
• Multivalued Attribute
• Key Attribute

10. Why BCNF is preferred over3NF?


Boyce-Codd Normal Form (BCNF) is an advanced version of Third Normal Form (3NF) that
addresses certain anomalies not eliminated by 3NF. It ensures a higher level of normalization,
making it a preferred choice in many cases.

You might also like