Makindo Medical Notes"One small step for man, one large step for Makindo" |
|
---|---|
Download all this content in the Apps now Android App and Apple iPhone/Pad App | |
MEDICAL DISCLAIMER: The contents are under continuing development and improvements and despite all efforts may contain errors of omission or fact. This is not to be used for the assessment, diagnosis, or management of patients. It should not be regarded as medical advice by healthcare workers or laypeople. It is for educational purposes only. Please adhere to your local protocols. Use the BNF for drug information. If you are unwell please seek urgent healthcare advice. If you do not accept this then please do not use the website. Makindo Ltd. |
Databases are organized collections of data that are stored and accessed electronically. They are fundamental to modern computing and are used in a variety of applications, from small personal projects to large enterprise systems. Databases are managed by Database Management Systems (DBMS) that provide tools for data storage, retrieval, and manipulation.
CREATE TABLE employees ( id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), department VARCHAR(50) ); ALTER TABLE employees ADD COLUMN salary DECIMAL(10, 2); DROP TABLE employees;
SELECT * FROM employees; INSERT INTO employees (id, first_name, last_name, department) VALUES (1, 'John', 'Doe', 'Sales'); UPDATE employees SET department = 'Marketing' WHERE id = 1; DELETE FROM employees WHERE id = 1;
GRANT SELECT ON employees TO user_name; REVOKE SELECT ON employees FROM user_name;
START TRANSACTION; UPDATE employees SET salary = salary * 1.1 WHERE department = 'Sales'; COMMIT; ROLLBACK;
CREATE INDEX idx_last_name ON employees (last_name);
EXPLAIN SELECT * FROM employees WHERE last_name = 'Doe';
mysqldump -u username -p database_name > backup.sql
mysql -u username -p database_name < backup.sql
Databases are integral to computer science, enabling the efficient storage, retrieval, and manipulation of data. Understanding the types of databases, their management through DBMS, database design principles, SQL for data handling, indexing, query optimization, and backup and recovery processes are essential for building and maintaining robust and efficient database systems.