- A computer with internet access.
- A code editor (e.g., Visual Studio Code).
- MySQL Workbench or another SQL database environment.
- Answer every question below and put your responses in a file named
answers.md - Push your completed
answers.mdfile to your GitHub repository. - Submit the GitHub link for review.
- State and Explain the components of a DBMS(Database Management System)
.Database Engine: Responsible for data storage, retrieval, and updating. It handles the actual data management.
.Database Schema: Defines the structure of the database, including tables, relationships, and constraints.
.Query Processor: Interprets and executes database queries.
.Transaction Manager: Ensures data integrity and manages concurrent access by multiple users.
.DBMS Interface: Provides a user interface to interact with the database, often through SQL (Structured Query Language).
- What is a relational database? Give 4 examples.
.MySQL
.PostgreSQL
.Oracle Database
.Microsoft SQL Server
- State and Explain three classifications of SQL?
. DML (Data Manipulation Language): Commands that manipulate the data stored in the database (e.g., SELECT, INSERT, UPDATE, DELETE).
.DDL (Data Definition Language): Commands that define and modify the database structure (e.g., CREATE, ALTER, DROP).
.DCL (Data Control Language): Commands that control access to the data (e.g., GRANT, REVOKE).
- What is the difference between a Primary Key and a Foreign Key?
.Primary Key: A unique identifier for each record in a table. It ensures that no two rows have the same key value.
.Foreign Key: A field (or collection of fields) in one table that uniquely identifies a row in another table. It creates a link between the two tables and enforces referential integrity.
-
What is an Entity-Relationship Diagram? .An Entity-Relationship Diagram (ERD) is a graphical representation of entities and their relationships within a database. It helps in designing the database by showing how entities are connected and how data flows between them. ERDs use symbols like rectangles (entities), diamonds (relationships), and ovals (attributes) to represent the various components.
-
What are the advantages of relational databases? .Data Integrity: Ensures accuracy and consistency of data.
.Flexibility: Easily accommodates changes in the database structure.
.Scalability: Supports large volumes of data and numerous users.
.Security: Offers robust security features to protect data.
.Simplified Querying: Allows complex queries through SQL.
- State four types of data type used to store data in tables?
.INTEGER: Stores whole numbers.
.VARCHAR: Stores variable-length strings.
.DATE: Stores dates.
.BOOLEAN: Stores true/false values.
- What is the purpose of a database management system (DBMS)?
.The purpose of a Database Management System (DBMS) is to provide a systematic way of creating, managing, and manipulating databases. It ensures data consistency, integrity, security, and accessibility while simplifying the process of database administration and data handling.
How to edit a markdownfile