Database Concepts-Chapter1 PDF
Database Concepts-Chapter1 PDF
In the early days, database applications were built Drawbacks of using file systems (cont.)
directly on top of file systems ◦ Atomicity of updates
Failures may leave database in an inconsistent state with
Drawbacks of using file systems to store data: partial updates carried out
◦ Data redundancy and inconsistency Example: Transfer of funds from one account to another
Multiple file formats, duplication of information in should either complete or not happen at all
different files ◦ Concurrent access by multiple users
◦ Difficulty in accessing data Concurrent accessed needed for performance
Uncontrolled concurrent accesses can lead to inconsistencies
Need to write a new program to carry out each new
Example: Two people reading a balance and updating it at
task the same time
◦ Data isolation — multiple files and formats ◦ Security problems
◦ Integrity problems Hard to provide user access to some, but not all, data
Integrity constraints (e.g. account balance > 0) Database systems offer solutions to all the above problems
become “buried” in program code rather than being
stated explicitly
Hard to add new constraints or change existing ones
1
11/11/2014
Similar to types and variables in programming languages A collection of tools for describing
Schema – the logical structure of the database ◦ Data
◦ Example: The database consists of information about a set of customers ◦ Data relationships
and accounts and the relationship between them) ◦ Data semantics
◦ Analogous to type information of a variable in a program ◦ Data constraints
◦ Physical schema: database design at the physical level Relational model
◦ Logical schema: database design at the logical level Entity-Relationship data model (mainly for database design)
Instance – the actual content of the database at a particular point in time Object-based data models (Object-oriented and Object-
◦ Analogous to the value of a variable relational)
Physical Data Independence – the ability to modify the physical schema
Semistructured data model (XML)
without changing the logical schema
◦ Applications depend on the logical schema Other older models:
◦ Network model
◦ In general, the interfaces between the various levels and components ◦ Hierarchical model
should be well defined so that changes in some parts do not seriously
influence others.
Attributes
Example of tabular data in the relational model
2
11/11/2014
SQL: widely used non-procedural language The process of designing the general structure of the database:
◦ Example: Find the name of the customer with customer-id 192-83-
7465 Logical Design – Deciding on the database schema. Database
select customer.customer_name design requires that we find a “good” collection of relation
from customer schemas.
where customer.customer_id = ‘192-83-7465’ ◦ Business decision – What attributes should we record in the
◦ Example: Find the balances of all accounts held by the customer database?
with customer-id 192-83-7465 ◦ Computer Science decision – What relation schemas should we
select account.balance have and how should the attributes be distributed among the
from depositor, account various relation schemas?
where depositor.customer_id = ‘192-83-7465’ and
depositor.account_number = account.account_number
Physical Design – Deciding on the physical layout of the database
Application programs generally access databases through one of
◦ Language extensions to allow embedded SQL
◦ Application program interface (e.g., ODBC/JDBC) which allow SQL
queries to be sent to a database
Storage management
Query processing
Transaction processing
(web browser)
Old Modern
3
11/11/2014
Alternative ways of evaluating a given query A transaction is a collection of operations that performs a
◦ Equivalent expressions single logical function in a database application
◦ Different algorithms for each operation Transaction-management component ensures that the
Cost difference between a good and a bad way of evaluating a database remains in a consistent (correct) state despite system
query can be enormous failures (e.g., power failures and operating system crashes) and
transaction failures.
Need to estimate the cost of operations
◦ Depends critically on statistical information about relations Concurrency-control manager controls the interaction among
which the database must maintain the concurrent transactions, to ensure the consistency of the
database.
◦ Need to estimate statistics for intermediate results to compute
cost of complex expressions
4
11/11/2014
1980s: Users are differentiated by the way they expect to interact with
◦ Research relational prototypes evolve into commercial systems the system
SQL becomes industry standard Application programmers – interact with system through DML calls
◦ Parallel and distributed database systems
Sophisticated users – form requests in a database query language
◦ Object-oriented database systems
Specialized users – write specialized database applications that do
1990s:
not fit into the traditional data processing framework
◦ Large decision support and data-mining applications
Naïve users – invoke one of the permanent application programs
◦ Large multi-terabyte data warehouses
◦ Emergence of Web commerce that have been written previously
2000s: ◦ Examples, people accessing database over the web, bank tellers,
◦ XML and XQuery standards clerical staff
◦ Automated database administration
◦ Increasing use of highly parallel database systems
◦ Web-scale distributed data storage systems
Coordinates all the activities of the database system The architecture of a database systems is greatly influenced by
◦ has a good understanding of the enterprise’s information the underlying computer system on which the database is
resources and needs. running:
Database administrator's duties include: Centralized
◦ Storage structure and access method definition Client-server
◦ Schema and physical organization modification Parallel (multiple processors and disks)
◦ Granting users authority to access the database Distributed
◦ Backing up data
◦ Monitoring performance and responding to changes
Database tuning
Extend the relational data model by including object orientation Defined by the WWW Consortium (W3C)
and constructs to deal with added data types. Originally intended as a document markup language not a
Allow attributes of tuples to have complex types, including database language
non-atomic values such as nested relations. The ability to specify new tags, and to create nested tag
Preserve relational foundations, in particular the declarative structures made XML a great way to exchange data, not just
access to data, while extending modeling power. documents
Provide upward compatibility with existing relational XML has become the basis for all new generation data
languages. interchange formats.
A wide variety of tools is available for parsing, browsing and
querying XML documents/data
5
11/11/2014
Prepared By Uthayakumar 33