What is consistency in DBMS
As an introduction to the problem of processing large amounts of data, the necessary terms for the electronic processing of data with database systems should first be developed in this teaching unit. Following this, the MySQL database management system (DBMS) is presented using a small example.
Comparison file system vs. database: Files and databases represent two different approaches to describing, storing and processing large amounts of data. Compare files and databases! Work out the advantages of a database over the file system![Top of page]
Application areas of database systems: Name and explain two examples of databases in the private sector, in the state or in the corporate sector![Top of page]
Terms: Download the document Database Systems.zip! Unzip the file and open the document! Work out the specified terms with the help of the "Duden Informatik Gymnasiale Oberstufe" p. 153 ff. Or with the help of the Internet (e.g. Wikipedia)![Top of page]
- Areas of responsibility of the database management system:
[Top of page]
- system support tasks: Creation and management of files and data sets, regulation of user access to multi-user systems, providing interfaces to other application programs
- property care tasks: Providing tools for the analysis, evaluation, processing and presentation of the data, ensuring data integrity
- Requirements for the database:
[Top of page]
- Homogeneity: The data must all be available in a similar structure. (homogeneous: similar, consistent, uniform; Knaur's dictionary of foreign words, Lexicographical Institute, Munich 1982)
- Redundancy: Redundancy is understood as the (superfluous) multiple storage of the same information (data duplication). As a rule, this should be avoided, as problems, so-called anomalies, can occur when inserting or changing data records.
- Consistency: Consistency is understood to mean the absence of contradictions in a database. If the database is without contradictions, then it is consistent, if it contains inconsistencies, then it is inconsistent.
Example: In the case of multiple-user operation of a database, several users can work on one database at the same time. If you make changes to the database at the same time, these may not be visible to other users (dirty read). There is a consistency problem here. One solution, for example, is to assign exclusive write and read locks (concurrency control).
- Integrity: The integrity of a database is guaranteed if the database describes the data completely and without errors. A database is always a model that describes the resulting data, e.g. in a very specific company. If the processes within the company are not correctly and completely reproduced by the database, the integrity of the data is violated. (integrity: without blemishes, clean; Knaur's dictionary of foreign words, Lexicographical Institute, Munich 1982)
- Key: A key is used to uniquely identify a data record within the entire database. The key is usually a single data field.
- Introduction to the MySQL database management system:
The DBMS MySQL is to be operated using the phpMyAdmin program. "phpMyAdmin is a free PHP application for the administration of MySQL databases. Administration takes place via HTTP with a browser. Therefore, databases on other computers can also be administered via a network connection or over the Internet. No knowledge of SQL necessary because the application works according to the WYSIWYG method. " (Source: Wikipedia)
As a first example, let's create a library database. It should have the following structure:
Field name Field content Field data type LID 15123 Integer Surname Bowl varchar (255) First name Karl varchar (255) address Bauernallee 49 varchar (255) Postcode 99561 varchar (255) place Pegnitz varchar (255) Date of Birth 1958-03-05 date title The oven is turned off varchar (255) ISBN 3-451 varchar (255) Authors ball varchar (255) LoanDat 2001-02-17 date ReturnDat 2001-03-20 date
- Now create the database under the name Library1 using phpMyAdmin!
Name the table library!
Create the structure of the table! For the Standard attribute, select the value NULL. This means something like "not known". By default, the value NULL is initially entered in each data field.
Also activate the property NULL. This means that a "NULL value" is allowed for this data field.
The data field L_ID represents the primary key attribute of our table. This must be entered separately when creating the table structure. Danger! A "NULL value" is not permitted for a primary key attribute!
Enter the sample data set from the table above and then check your entries by displaying the structure of the table and the data set! [Top of page]
Import more records! To make the monotonous work of entering the data easier, you should not enter the data by hand. phpMyAdmin offers the possibility to import data from external files. The data are in the following CSV file (library.csv). First download the file before importing it! After the import, check by displaying the data records whether the import was successful![Top of page]
We want to continue working on the library database in the next lesson. But for this we need a broader database. You should therefore then add 4 more data sets with fantasy data![Top of page]
- So that one database can also be used on another computer, phpMyAdmin offers the convenient option of creating a so-called dump (see e.g. Wikipedia keyword: database dump). Export the database by creating an SQL dump!
HA: Install the XAMPP environment on your home computer and import the library1 database from the SQL dump you created!
- Now create the database under the name Library1 using phpMyAdmin!
Exercise 1: Importing a database
- Create a new database with the name Menagerie!
- Download the associated SQL dump menagerie_dump.sql!
- Import the data from the dump!
- Check whether the import was successful!
Exercise 2: Creating and editing a database with MySQL and phpMyAdmin
- Create a new database with the name personal_db and a table personal according to the given structure view (see figure)! Define the data field personal number as the primary key!
- An Excel table personal.xls is specified. Save this table as a CSV file under the name personal_import.csv! Convert dates and German special characters beforehand!
- Import these data records into the personal_db database! Make sure (by viewing the records) that the records have been imported!
- Mr. Adalbert Zweistein was awarded the title of professor for his outstanding research work. In this regard, change Mr. Zweistein's qualification data field!
- Mr. Robert Bunsen has left the company. Delete his record from the database!
- Ms. Susi Schnell was hired as the new secretary: complete your data record!
- Export the database to a SQL dump!
Protecting data - aspects of data security
The protection of the data stored in a database is very important for a company. If this data is lost or certain data falls into the wrong hands, this can lead to major problems. It is therefore necessary that every professional DBMS provides ways to protect the stored data.
In addition, not all users of the DB should be able to read all the data and certainly not be able to change them. For data protection and business reasons, this is not desired.
- Work out the difference between data protection and data security with the help of the small guide to informatics p. 83! Give a practical example of this!
- Give examples for the search for information (so-called queries) that illustrate this problem using DB Personal!
- With the help of the small guide for computer science, p. 188 f., Indicate which basic options a DBMS offers for data protection!
- Find out about the options for protecting the data stored in a DB that the DBMS phpMyAdmin offers!
A page by Mirko Hans
- Is betting allowed in Christianity
- How do elections work in Singapore
- Which PC games would you recommend
- What is 6 square 4 square 5
- What do Russians eat on Diaet
- Will a divorce make unhappily married people happier
- Who is the greatest coward in history and why
- Are these symptoms of ADD
- Why do I like black men
- Which SEO tools offer these features
- Are you sad about life?
- Why is Liza Koshy so popular
- Drinking barley water will cleanse your kidneys
- Occitan is still used today
- How lucrative can dropshipping be
- What is SEO niche
- John Burgess was a CIA officer
- What is the difference between rationalism and empiricism
- Where can I buy turtles in Mumbai
- What can you just not understand
- How can I decrypt the RC4 encryption
- How could a zombie apocalypse be possible
- Which is Dota 2's underrated carry hero
- What is the salary of bloggers