In our daily life, we may not be aware of the database systems that we use frequently. Before formally learning the database, let’s take a look at the common database system applications around you.
When reading the following content, readers can first:
- A database is viewed as a set of related data
- A database management system (DBMS) is seen as software that manages and controls this set of data
- A database system includes everything that interacts with the database, including applications, DBMSs, and databases
More precise definitions of these terms are given later in this chapter.
The following are some common database applications in life.
When we buy goods in the supermarket, we are accessing a database.
At checkout, the cashier scans every item a customer buys with a barcode reader. This barcode reader is connected to an application that accesses the commodity database, the program finds the commodity price from the commodity database according to the barcode, then subtracts the quantity of this commodity for this sale from the inventory, and displays the corresponding price on the screen .
If the inventory is lower than the set threshold, the database system will prompt to purchase to replenish the inventory. If a customer calls the supermarket to order an item, the salesperson can run the application to see if there is enough stock for the item in the database.
credit card spending
When purchasing goods with a credit card, the salesperson checks to see if the customer has sufficient credit. This check can be done by telephone or automatically through a credit card reader connected to a computer system. Either way, there must be some database with all the information about the customer’s credit card purchases.
In order to check the customer’s credit status, a database application is required. Using the credit card number, the total price of the goods purchased by the customer this month can be inquired, and the price of the goods that the customer wants to buy with the credit card this time can be added to determine whether it is still within the credit limit. Inside. And, if the user confirms the purchase, the details of the purchased product will be recorded in the database.
The app also has access to a database to check that the credit card is not stolen or lost before agreeing to a purchase. In addition, there are generally other applications responsible for sending credit card usage records to credit card holders on a monthly basis, and sending information to credit card holders after payment is received.
Travel agency booking holiday itinerary
When a traveler asks a travel agency about their holiday itinerary, the travel agency accesses multiple databases containing holiday and flight details.
If a client book a trip, the database system must make all necessary booking arrangements. In this case, the system must ensure that a seat is not reserved by two different travel agencies and that the reserved seats for the flight do not exceed the fixed seats for the flight.
For example, suppose there is only one last seat left on the flight from Qinghai to Beijing, but two travel agencies request to reserve the seat at the same time, the system must be able to distinguish and handle this situation, that is, allow one reservation to continue, notify the other travel agency that There are no seats left. A travel agency may often have another database for billing.
There may be a database in the library to store the details of all the books in the library and the details of the readers, etc.
The database system can also provide a reservation service, that is, allowing readers to reserve books, and when the books can be borrowed, they will be notified by mail or other means. The system can also send reminders to readers who have borrowed books, informing them that they have not returned the borrowed books within the specified time limit.
In addition, all libraries are now equipped with a computer indexing system, which realizes the automatic query of books. Using this system, readers can find out the location of the book they want to borrow, and whether they have been borrowed by querying information such as the title, author, or publication year.
Whenever an insurance broker wants to take out an insurance policy, such as life insurance, homeowners insurance, or auto insurance, an insurance broker has access to the databases of multiple insurance agencies.
The database system determines the amount of insurance based on the personal details of the customer provided, such as name, home address, age, etc. Insurance brokers can search through multiple databases to find the one that offers the most benefit to their clients.
The shopping websites we usually use are driven by database applications, such as Taobao, Jingdong, Dangdang, etc.
While there are many online bookstores, it allows customers to browse and buy books in different categories (eg computer or management). You can also browse books by author’s name. In all cases, a database exists on the organization’s web server with all book details (title, author, price, sales records, publisher, synopsis and detailed description, etc.), as well as availability, book delivery, etc. Condition, availability and ordering information.
Books can be cross-referenced in the database. For example, a book might be listed under multiple categories, such as Computers, Programming Languages, Bestsellers, and Recommended Books at the same time.
We can buy one or more books online. Dangdang.com will save the records of previous transactions (historical orders) through the database, including details such as the title of the book purchased, the delivery address and the price paid, to provide personalized services to the users of the website.
If you are studying at a university, the school will have a database system (student management system) that stores all information about students, including courses registered, various scholarships received, courses selected in previous years and courses currently selected for this year, and test scores information, etc. There may also be a database used to store details of employees working at the university.
The above are common database applications in life, and you will definitely encounter other database systems. Although we are familiar with these applications today, database systems are actually quite complex technologies that have been developed for more than sixty years.