You are on page 1of 8

Question 1

I.
a) Database
Database is an organized collection of structured information or data set that stored in a
computer system. There are different types of databases.
I. Relational Database
A collection of related data set with pre - defined relationships between them. The
most effective and flexible way to access structured information. These are
organized as a set of tables with columns and rows.
II. Object-Oriented Database
Object oriented database Is a database system that can work with complex data
objects such as those found in the object-oriented programming language
III. NoSQL Database
Is a non-relational database, that enables unstructured and semi-structured data to
be stored to handle.
IV. Graph Database
Data stored by a graph data is stored in keeping with the relationships between
organizations and institutions
V. OLTP Database
A fact, an analytical database built to handle a high volume of multi-user
transactions
VI. Open Source Database
An Open Source Database system is one in which source code is accessible to the
public, such database can be SQL or NoSQL database

VII. Cloud Database


A collection of structure or non-structure data available on private, public, or
hybrid cloud computing platforms.

b) Database Management System


Database Management System is software that’s wont to manage the database. An
example is MYSQL, Oracle. Database Management System provides an interface for
creating a database storing, updating and clearing. It provides security for the database.
Advantages of Database Management System
I. Control data redundancy
II. Data sharing
III. easy maintain
IV. Reduce time
V. Backup
Disadvantages of Database Management System
I. High cost for hardware
II. High Cost for software
III. Large space of memory
IV. Complexity
c) RDBMS
A relational database is a type of database that stores and provides access to data points
that are associated with each other. Relational databases are based on the relational
model, an intuitive, straightforward way of representing data in tables. In a relational
database, each row within the table may be a record with a singular ID called the key.
The columns of the table hold attributes of the data, and every record usually contains a
value for every attribute, making it easy to determine the relationships among data points.
d) Data vs Information

DATA INFORMATION

Raw data Meaningful data


Text and numeric values A refined form of actual data
Doesn’t rely on the information The information relies on data
Low-level knowledge Second-level knowledge
Represent data as a graph, a data tree, Represent data as a languages, thoughts
tabular data on the basis of the given data.
 doesn’t have any significance. It is significant
Data is a single unit that is unprocessed Information is a product and a collection
of data
doesn’t have any meaning have a logical meaning.
Doesn’t directly helps in decision making Directly helps in decision making

e) Flat File Database


Flat File Database is type of database that stores data in a single table.. The Flat File
Database was first developed by IBM in the early 1970s.
Advantages
 Records are stored in one place
 great option for a small database
 requires less hardware, software
Disadvantages
 It is difficult to update
 It is difficult to change the data
 Poor data store
II.
File Processing System Database Approach.

Data residency No Data residency

Each department in an organization has its Database Approach system uses the
own files in the file processing system. organizer database access. Therefore, the
Therefore, it is stored in multiple files of organization will be able to share database
the same magnitude. If you need to update data with all users. This will not result in
any data, you will need to update all the data overload
locations where that data is stored.
Therefore, it will take some extra time to
perform this task.
Isolated data No Isolated data

There are data stores related to different Because data stores are shared with
departments. Therefore, it is difficult to others. The possibility of data being
access that data. Therefore, the data is isolated is very low
more likely to be isolated

No data integrity Data integrity

When updating data you have to update When updating data, it is possible to
the data in several files, not just one file, change the data to only one file instead of
so there are a lot of inconsistencies several. Therefore, there are very few
between the data. inconsistencies in the data file. Therefore
Therefore data integrity can be maintained data integrity can be maintained.
low percentage.

No share data Share data

Due to having a database relevant to the The database shared by the organization
department. access, add, update delete is can be accessed updated or deleted
a function of the relevant department
Slow access time Faster access time

The data file takes time to access as it is The file is shared between users so access
relevant to each department is faster
Inconsistent data Minimized data inconsistency

There are more inconsistencies between Inconsistencies are minimal because only
the files as the data has to be changed in one file is used when updating data
several files during the data update
Difficult Essay

It is very difficult to access data as it is Because data is shared between users, it is


not shared between users very easy for users to have detect access

III. Data Redundancy is a database or database technology, a single piece of data is stored in
two separate locations. In a multi-software environment or platform, this can be two
separate fields in a single database or two different places. Any time data is repeated, it
results in a data surplus.
Disadvantages of Data Redundancy
 Unnecessarily increasing the size of the database
 Creates efficiency
 Corrupts data
 High data processing complexity

IV.
Advantages of Database Management System
I. Controls database residency
II. Data sharing
III. Easy to maintain
IV. Reduce time
V. Backup

Disadvantages of Database Management System


I. Cost hardware
II. Cost software
III. Large space of disk and memory
IV. Complexity
Question 02
I. A

a) Relation

b) Attribute
In relational databases, attributes are the describing characteristics or properties that
define all items pertaining to a certain category applied to all cells of a column

c) Domain
A domain is a set of values that can be assigned to an attribute in a database.
d) Tuple
A single row of a table

e) Cardinality
Numbers of tuples of a relation

f) Degree
Numbers of the attribute of a relation.

g) Composite key
A composite key is a database management system key that combines two or more
attributes to uniquely identify a tuple in a table. A compound key is one in which each
attribute that makes up the key is a foreign key in its own right.

h) Foreign key
A composite key is a database management system key that combines two or more
attributes to uniquely identify a tuple in a table. A compound key is one in which each
attribute that makes up the key is a foreign key in its own right.

II. B
III. C
IV.
SUPER KEY(s),
CANDIDATE KEY(s),
PRIMARY KEY
Question 03

Question 04
I. Relational algebra is a procedural query language. It outlines a step-by-step procedure for
obtaining the query's result. It performs queries with the help of operators. Types of the
relational algebra are,
 Selection
 Projection
 Union
 Set intersection
 Set difference
 Cartesian product
 Rename
II.
1 Projection(PI)
2 Selection(sigma)
3 union
4 intersection
5 join
6 different
7 Renaming
8 Cartesian product

III. A
a) S
b) S
c) S
d) S
e) S
f) s

Question 05
I. Normalization is the reduction of redundancy in a relation or group of relations.
Anomalies in insertion, deletion, and update can be caused by relation redundancy. As a
result, it aids in reducing relational redundancy. To minimize or reduce repetition, normal
forms are utilized.
tables in a database.
II.
a. If a relation has a composite or multi-valued attribute, it violates either the first normal
form or the second normal form.If a relation does not contain any composite or multi-
valued elements, it is said to be in first normal form.attribute. If every attribute in a
relation is singled, it is said to be in first normal form.a highly regarded quality
b. A relation must be in first normal form and contain no partial dependencies to be in
second normal form. If a relation has No Partial Dependency, that is, no non-prime
characteristics (attributes that are not part of any candidate), it is in 2NF.key is reliant on
any appropriate subset of any table candidate key.

c. If there is no transitive dependency for non-prime variables, a relation is in third


normal form.It has the same attributes as the second normal form.If at least one of the
following conditions holds in every non-trivial case, a relation is in 3NF.
Question 06
Question 07
I.The number of entity kinds that participate(associate) in a relationship is the degree of the
relationship. We can simply tell the degree of a relationship by looking at an E-R diagram, i.e.
the number of entity types related to a relationship indicates the degree of that relationship.

II. In the context of databases, a connection is a scenario that exists between two relational
tables.when one table has a foreign key that points to the main key of anothertable. Relationships
allow relational databases to partition and store data in different tables, allowing for more
flexibility.tying together separate data sets
III. DDL (Data Definition Language): DDL (Data Definition Language) is a set of SQL
statements for defining the database schema. It is just concerned with database schema
descriptions.used to design and edit the database's structure of database items.DDL is a series of
SQL statements.Database structures can be created, modified, and deleted with these commands,
but not data. These instructionsare typically not utilized by a regular user, who should access the
database through an application

DML (Data Manipulation Language): DML (Data Manipulation Language) refers to SQL
commands that deal with manipulating data in a database, which includes the majority of SQL
queries. It is a part the SQL statement that regulates data and database access. In a nutshell, DCL
assertions are DML statements are grouped together.

VI.. CREATE table User (

Id int(11) NOTNULL,

first_name varchar(50),NOTNULL,

last_name varchar(50),NOTNULL,

username varchar(100),NOTNULL,

password varchar(100),NOTNULL,
is_active TINYINT(1),

is_verify TINYINT(1),

PRIMARY key (ID)

);

V. INSERT table User (

Id int(11) NOTNULL,

first_name varchar(50),NOTNULL,

last_name varchar(50),NOTNULL,

username varchar(100),NOTNULL,

password varchar(100),NOTNULL,

is_active TINYINT(1),

is_verify TINYINT(1),

PRIMARY key (ID)

);

You might also like