Professional Documents
Culture Documents
Database Pastpaper Q 1 or 2 Solved
Database Pastpaper Q 1 or 2 Solved
Database Pastpaper Q 1 or 2 Solved
QUESTION NO 1:
(PART A)
What is Database? What is Database Management system (DBMS)? Gives some example of
DBMS
DATABASE: A database is a structured collection of data that is organized for efficient storage,
retrieval, and manipulation.
DATABASE MANAGEMENT SYSTEM: A DBMS is software that allows users to create, manage,
and manipulate databases by providing an interface between the user and the database.
EXAMPLES:
• Oracle
• Microsoft SQL Server
• MySql.
(PART B)
What is the difference between super key, primary key and candidate key.
SUPER KEY: Super key is any set of attributes that can uniquely identify a record within a table.
CANDIDATE KEY: Candidate key is a minimal super key that uniquely identifies a record within a
table.
PRIMARY KEY: Primary key is a candidate key that is chosen to uniquely identify records and
establish relationships between tables.
(PART C)
Define Primary key and Foreign key with example.
PRIMARY KEY: Primary key is a column or a set of columns that uniquely identifies each row
in a table.
Example: Employee ID in an Employee table.
FOREIGN KEY: Foreign key is a column or a set of columns in one table that refers to the primary
key of another table.
Example: Employee ID in a Payroll table referencing the Employee ID in the Employee table.
(PART D)
Define database models and types.
DATABASE MODEL:
(PART E)
Compare the file Management system with DBMS.
ANSWER:
A file management system (FMS) manages data files stored on a computer's file
system, while a database management system (DBMS) manages data stored in a
database. The key differences between the two include data redundancy, data
sharing, data consistency, and data security. DBMS offers advantages over FMS,
including better data management, increased efficiency, and improved data
security.
QUESTION NO 2:
Differentiate the following term with appropriate example.
(PART B)
A multivalued attribute is an attribute that can have multiple values, while a
composite attribute is an attribute made up of smaller attributes.
Example: In an employee database, "skills" is a multivalued attribute, while
"address" is a composite attribute made up of street, city, state, and zip code.
(PART C)
Binary relationships involve two entities, while recursive relationships involve an
entity relating to itself.
Example: In a social network database, a "friend" relationship is binary, while a
"follow" relationship is recursive.
(PART D)
A derived attribute is an attribute that can be calculated based on other
attributes, while a stored attribute is an attribute that is physically stored in the
database.
Example: In a student database, "age" could be a derived attribute based on the
"date of birth" attribute, while "name" would be a stored attribute.
(PART E)
An instance is a specific occurrence of an object in a database, while a schema is
the overall logical structure of a database.
Example: In a library database, an instance would be a specific book, while the
schema would include tables for books, authors, and borrowers.