Skip to content

PLP-Database-Design/week-1-introduction-to-sql-Amoriodhis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

SQL Assignment Week 1

What You'll Need

  • A computer with internet access.
  • A code editor (e.g., Visual Studio Code).
  • MySQL Workbench or another SQL database environment.

Submission Instructions

  1. Answer every question below and put your responses in a file named answers.md
  2. Push your completed answers.md file to your GitHub repository.
  3. Submit the GitHub link for review.

Assignment Questions

  1. 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).

  1. What is a relational database? Give 4 examples.

.MySQL

.PostgreSQL

.Oracle Database

.Microsoft SQL Server

  1. 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).

  1. 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.

  1. 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.

  2. 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.

  1. 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.

  1. 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

NOTE: You should not fork the repository

About

plp-database-design-safaricom-cohort-introduction-to-sql-week-1-week-1 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published