Databases Flashcards
(111 cards)
Why is a database a better storage technique compared to file systems?
Data duplication is avoided in databases. Data is also consistent in databases.
List a few applications of databases.
Social networking websites, online shopping websites, industrial management, security systems, etc.
How does a database prevent data duplication?
Data duplication is prevented by using a unique primary key field for each record.
State examples of programming languages that are used to customise and interact with databases.
Python, JavaScript, Microsoft Visual Basic and Delphi.
What is the function of a query language?
Query language is used to customise and retrieve information from the database.
State an example for query language.
SQL (Structured query language)
In what form is data stored in a database?
Data is stored in the form of tables.
What is a flat-file database?
A flat-file database is a database with only one table.
What is a column in a table called?
Column
What is a row in a table called?
Record
Information in a database is an example of structured data or unstructured data?
Structured data
What is a relational database?
A relational database is a type of database that is structured and allows users to identify and access data which is in relation to other data.
What is an entity?
An entity is an object in a system for which the information is stored.
What is an attribute?
A characteristic of an entity is called an attribute.
What is a record?
A row in a table that is a collection of fields.
True or false: In a relational database, each table contains information about just one entity.
True
What is a composite primary key?
A primary key that consists of more than one attribute is called a composite primary key.
What is referential integrity?
Referential integrity is a database concept that ensures that all foreign keys represent a valid and existing primary key in its parent table.
What is normalisation?
The process of dividing larger tables into smaller tables such that these smaller tables are related to each other.
What is First Normal Form?
A table is said to be in first Normal Form (1NF) if none of its attributes are repeated and there is no grouping of attributes.
What is Second Normal Form?
A table is said to be in second Normal Form (2NF) if it is in 1NF and there are no partial dependencies on the primary key.
What is Third Normal Form?
A table is said to be in third Normal Form (3NF) if it is in 2NF and there are no non-key dependencies.
What is the main motive of normalisation?
The main motive of normalisation is to reduce data redundancy.
Why is it easy to maintain a normalised table compared to its unnormalised form?
Because there are no data duplications, it is enough to update a data once. In case of data duplications, we must change the data everywhere it appears. Missing updates in a place leads to data inconsistencies.