Data Manipulation: Q1. What Is A Database?

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Data Manipulation

Q1. What is a database?


The database is an organized collection of structured data to make it
easily accessible, manageable and update. In simple words, you can say,
a database in a place where the data is stored.
Q2. What is a flat-file database?
A flat file is one that stores a representation of a simple database, which
is known as a flat file database. A flat file database is a type of database
that stores data in a single table.
Q3. What is a relational database?
A relational database uses multiple tables In a relational database the
tables are linked In a relational database must have a primary key and a
foreign key in the linked tables. Relational Databases use two or more
tables linked together (to form a relationship). Relational Databases do
not store all the data in the same table.
Q4. What is a relationship?
A relationship is formed when our two tables are joined together.
Relationships make use of key fields and primary keys to allow the two
tables to communicate with each other and share their data.
Q5. What is a primary key?
A primary key is a column or a set of columns in a table whose values
uniquely identify a row in the table. A table cannot have more than one
primary key. A primary key’s main features are: • It must contain a unique
value for each row of data. • It cannot contain null values. • Every row
must have a primary key value.
Q6. What is a foreign key?
Foreign key is a regular field in one table which is being used as the key
field in another table. Foreign keys are used to provide the link
(relationship) between the tables.
Q7. Discuss the advantages and disadvantages of using a relational
database rather than a flat file database.
Advantages of relational databases: Less data entry / data is stored only
once / avoids duplication of data Less inconsistency of data Easier to
edit data / records Easier to edit data / record format Easier to add /
delete data / records More complex queries can be carried out better
security.

Advantages of flat file databases: All records are stored in one place
Easier to understand / use Sorting is simpler Filtering is simpler Can be
used with a spreadsheet / single table.
Disadvantages of a flat file database: Data is more likely to be duplicated
/ difficult to stop duplication Records can be duplicated and the flat file
will not stop this Harder to update Every record in the database has to
have the same fields, even though many are not used Harder to change
data format Harder to produce complex queries Almost no security.

You might also like