Basics of Database L4sod
Basics of Database L4sod
SOFTWARE DEVELOPMENT
Question 2:5marks
(A)Briefly explain why do we need to use databases such as relational
database to store information instead of using our computer’s file system?
/3marks
(B) Give four (4) types of databases models. /2marks
Question 3:15marks
(A)Differentiate non-relationalandRelational databases /3marks
(B)State and briefly explain four (4) properties of relational database. /12marks
Question 4:15marks
(A) What is data integrity? /3marks
(B) State and briefly explain any three (3) types of relationships. /12marks
Question 5:5marks
(A) What does ER-model stands for?/2marks
(B) Why do we need ER-model when dealing with database? /3marks
Question 6: 5marks
What do the following acronyms stand for:
Question 7: 5marks
(A)What is database constraints./3marks
(B) Give 5 examples of databaseconstraints./2marks
Question 8:5marks
(A)What is the difference between DROP and TRUNCATE a table in a
database?/4marks
(B) What does the command ALTER does in database? /1mark
Section II:Attempt any Two(2) questions40 Marks.
Question 9: 20marks
We normally know that a database model shows the logical structure of a
database, including the relationships and constraints that determine how
data can be stored and accessed.
GOOD LUCK!!!
MARKING SCHEME
(BASICS OF DATABASE L4SOD)
Question 1: 5marks
(A)Database: is an organized collection of related data, so that it can be easily
accessed and managed.
(B) Entity: A single unique object in the real world that is being considered.
(C) Attribute: A characteristic of an entity type that describes the entity.
(D) Record:The storage representation of a row of data.
(E) Constraints:Rules enforced on the data columns of a table.
Question 2:5marks
Question 3:15marks
(A)In relational databasesmodel data is organized in two-dimensional tables and
the relationship is maintained by storing a common field while non-relational
modeldatabases are used for storing a wide range of data sets not only in tabular
form but in several different ways./3marks
(B)properties of relational database:
/12marks
Question 4: /15marks
(A) Data integrity: accuracy and consistency of data stored in
a database/3marks
(B) 3 types of database relationships: /12marks
One-to-One:
A row in table A can have only one matching row in table B, and vice versa.
One-to-Many:
Many-to-many:
Question 5:5marks
(A) ER-model: Entity relationship Model /2marks
(B) To define the data elements and relationship for a specified system/3marks
Question 7: 5marks
(A) Database constraints are the rules enforces on its(database) data within
the table(s) for the sake of many different purposes such as security, easy
access, relationship maintenance, integrity etc…
(B) Databaseconstraints: /2marks
1. CHECK
2. NOT NULL
3. PRIMARY KEY
4. FOREIGN KEY
5. INDEX
6. DEFAULT
Question 8:5marks
(A)The DROP command is used to remove table definition and its contents
Whereas the TRUNCATE command is used to delete all the rows from the
table. /4marks
Question 9: 20marks
(B)Yes. Constraints are the rules enforced on the data columns of a table.
These are used to limit the type of data that can go into a table. This
ensures the accuracy and reliability of the data in the database. Constraints
could be either on a column level or a table level./6marks
(C) Database models:/8marks
Relational model:
END!!!