0% found this document useful (0 votes)
6 views21 pages

Understanding Database Systems and DBMS

CƠ sở dữ liệu

Uploaded by

aquakiraa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views21 pages

Understanding Database Systems and DBMS

CƠ sở dữ liệu

Uploaded by

aquakiraa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Database

DATABASE SYSTEM
• Faculty of Computer Science

1
Database

•Chapter 1
Introduction

2
Database

Outline

Database

DBMS

Data Model

View of Data

3
Database

Database Systems
• What is Database?
• What is Database Management System (DBMS) ?

4
Database

What is a database?
• A database is a collection of data, contains information relevant to an
enterprise.
• A database is an organized collection of data.
• A database is a collection of information that is organized so that it can
easily be accessed, managed, and updated.

5
Database

What is a DBMS?
• Database management system (DBMS) is a special software application
that interacts with the user, other applications, and the database itself to
capture and analyze data.
• E.g: Some popular DBMS

6
Database

DBMS purpose
• To store data properly
• To provide simultaneous access to the data for many users
• To delimit the access to the data for different users
• To prevent data from loss
• To provide a way to store and retrieve database information that is both
convenient and efficient.

7
Database

Database systems
• Database systems are used to manage collections of data that are:
• Highly valuable
• Relatively large
• Accessed by multiple users and applications, often at the same time.
• A modern database system is a complex software system whose
task is to manage a large, complex collection of data.
• Databases touch all aspects of our lives

8
Database

Database Applications Examples


• Enterprise Information
• Sales: customers, products, purchases
• Accounting: payments, receipts, assets
• Human Resources: Information about employees, salaries, payroll taxes.
• Manufacturing: management of production, inventory, orders, supply
chain.
• Banking and finance
• customer information, accounts, loans, and banking transactions.
• Credit card transactions
• Finance: sales and purchases of financial instruments (e.g., stocks and bonds; storing
real-time market data
• Universities: registration, grades

9
Database

Database Applications Examples


• Airlines: reservations, schedules
• Telecommunication: records of calls, texts, and data usage, generating
monthly bills, maintaining balances on prepaid calling cards
• Web-based services
• Online retailers: order tracking, customized recommendations
• Online advertisements
• Document databases
• Navigation systems: For maintaining the locations of varies places of
interest along with the exact routes of roads, train systems, buses, etc.

10
Database

Purpose of Database Systems


In the early days, database applications were built directly on top of file systems, which
leads to:
• Data redundancy and inconsistency: data is stored in multiple file formats resulting
induplication of information in different files
• Difficulty in accessing data
• Need to write a new program to carry out each new task
• Data isolation
• Multiple files and formats
• Integrity problems
• Integrity constraints (e.g., account balance > 0) become “buried” in program code
rather than being stated explicitly
• Hard to add new constraints or change existing ones

11
Database

Purpose of Database Systems (Cont.)


• Atomicity of updates
• Failures may leave database in an inconsistent state with partial updates carried out
• Example: Transfer of funds from one account to another should either complete or not
happen at all
• Concurrent access by multiple users
• Concurrent access needed for performance
• Uncontrolled concurrent accesses can lead to inconsistencies
• Ex: Two people reading a balance (say 100) and updating it by withdrawing money (say 50 each)
at the same time
• Security problems
• Hard to provide user access to some, but not all, data
Database systems offer solutions to all
the above problems
12
Database

Example: University Database


• Data consists of information about:
• Students
• Instructors
• Classes
• Application program examples:
• Add new students, instructors, and courses
• Register students for courses, and generate class rosters
• Assign grades to students, compute grade point averages (GPA) and generate
transcripts

13
Database

Data Models
• Underlying the structure of a database is the data model: a collection of
conceptual tools for describing
• Data
• Data relationships
• Data semantics
• Consistency constraints

14
Database

Data Models
• There are a number of different data models:
• Relational model
• Entity-Relationship data model (mainly for database design)
• Object-based data models (Object-oriented and Object-relational)
• Semi-structured data model (XML)
• Other older models:
• Network model
• Hierarchical model

15
Database

Relational Model
• Example of tabular data in the relational model:

Columns

Rows

✓ The relational model uses a collection of tables


to represent both data and the relationships
among those data.
✓ Each table has multiple columns, and each
column has a unique name.
✓ Tables are also known as relations.

16
Database

View of Data
• Levels of data abstraction, to simplify users’ interactions with the system:
• The three levels of data abstraction:

17
Database

Data Abstraction
• View level: The highest level of abstraction describes only part of the entire
database. The system may provide many views for the same database. Views can
also hide information (such as an employee’s salary) for security purposes.
• Logical level: describes what data are stored in the database, and what
relationships exist among those data. E.g: Describe the type of a record instructor
with 4 fields:
type instructor = record
ID : char(5);
name : char(20);
dept_name : char(20);
salary : numeric(8,2);
end;
• Physical level: the lowest level of abstraction describes how the data are actually
stored.
18
Database

RDBMS
• RDBMS which stands for relational database management system, is a
program that lets users create, update, and administer a relational
database.
• Are used in most commercial projects

19
Database

RDBMS installation (Lab 7)


• Install RDBMS Server
• Microsoft SQL Server 2014 Express/2019
• Install client application for querying data
• Microsoft SQL Server Management studio

20
Database

Common questions

Powered by AI

The main purposes of a DBMS are to store data properly, provide simultaneous access to the data for many users, delimit the access to the data for different users, prevent data loss, and provide a way to store and retrieve database information that is both convenient and efficient .

Concurrent access in database systems can lead to inconsistencies, such as the situation where two users read and update a balance simultaneously without the changes being reflected correctly. DBMSs address this problem through mechanisms like locking and transaction management to ensure that transactions are atomic and isolated, preventing partial updates and maintaining consistency .

Challenges related to the atomicity of updates in database systems include the risk of partial updates leaving the database in an inconsistent state, especially during failures. Ensuring atomicity requires that transactions be fully completed or not done at all, which involves complex error handling and rollback mechanisms .

The relational data model organizes data into tables, also known as relations, where each table has multiple columns, and each column has a unique name. These tables represent both data and the relationships among data. The model efficiently handles data abstraction and manipulation, supporting various operations such as querying and updating .

DBMSs are essential for managing large and complex collections of data because they provide an organized structure for data storage, retrieval, and management. They facilitate access by multiple users and applications simultaneously, maintain data integrity and security, and offer tools for handling data consistency and concurrency, which file-based systems lack .

Data abstraction simplifies user interaction with database systems by allowing users to interact with data at different levels of abstraction. The view level provides users with customized views, the logical level defines what data is stored and its relationships, and the physical level details how data is physically stored. This separation ensures that users interact with data in a simplified manner, hiding unnecessary complexity .

Different data models describe data and its relationships using various structures. The relational model uses tables to represent data and relationships, the entity-relationship model focuses on diagramming entities and relationships, object-based models incorporate object-oriented principles, and semi-structured models like XML allow flexibility in data structure .

Database systems face security challenges such as unauthorized data access and data breaches. These challenges are mitigated through user authentication, encryption, access controls, and audit logs. The use of views can also restrict user access to sensitive data, ensuring that only authorized users can view or modify certain parts of the database .

RDBMS enhance commercial project implementation by providing a structured method for data creation, updating, and administration, which ensures data integrity and consistency. Their ability to handle complex queries efficiently outperforms traditional file-based systems. Additionally, RDBMSs support scalability and security, which are critical for commercial applications .

Database applications address data redundancy and inconsistency by centralizing data storage and enforcing consistency through integrity constraints. These applications use a DBMS to ensure that data is not duplicated across multiple file formats, which was a common problem when applications were built directly on top of file systems .

You might also like