Database System
Database System
Database System
DATA B A S E S Y S T E M C O N C E P T S
A N D A RC H I T E C T U R E
• Basic client/server architecture is used to deal with many PCs, web servers, database servers and other
components that are connected with networks.
• DBMS architecture depends upon how users are connected to the database to get their request done.
• Database architecture can be seen as a single tier or multi-tier.
• Multi-tier database architecture is of two types like: 2-tier architecture and 3-tier architecture.
1-Tier Architecture
2-Tier Architecture
• Basic client-server.
• Applications on client end can directly communicate with database at server side.
• For this interaction, API's like: ODBC, JDBC are used.
• User interfaces and application programs are run on client-side.
• Server side is responsible to provide functionalities like: query processing
and transaction management.
• To communicate with DBMS, client-side application establishes connection
with server side.
• Advantage: maintenance and understanding are easier, compatible with
existing systems.
• Challenge: poor performance when there are a large number of users.
3-Tier Architecture
Advantages:
• Enhanced scalability due to distributed deployment of application servers. Now, individual connections
need not be made between client and server.
• Data Integrity is maintained. Since there is a middle layer between client and server, data corruption can be
avoided/removed.
• Security is improved. This type of model prevents direct interaction of the client with the server thereby
reducing access to unauthorized data.
Disadvantages:
• Increased complexity of implementation and communication. becomes difficult for this sort of interaction to
take place due to the presence of middle layers.
• DBMS is collection of interrelated data and set of programs that allow users to access and modify
these data.
• DBMS provides users with an abstract view of data. (Data Abstraction)
o System hides certain details of how data are stored and maintained; rather showing only
required info.
• Three level/schema architecture: Since many DBMS users are not computer trained, complexity
are hidden through several levels of abstraction, to simplify users’ interactions with system:
o Physical level (Internal View/Schema)
o Logical level (Conceptual View/Schema)
o View level (External View/Schema)
• Physical level: Lowest level of abstraction describes how & where data are actually stored.
o Describes complex low-level data structures in detail.
• Logical level: Next-higher level of abstraction describes what data are stored in database, and what
relationships exist among those data.
o Describes the structure of the whole database.
o Describes what data to be stored in database and also what relationship exists among those data.
o Programmers and database administrators work at this level.
• View level: Highest level of abstraction describes only part of entire database.
o Though logical level uses simpler structures, complexity remains because of variety of information
stored in large database (all this information not needed by many users; instead, they need to access
only a part of database).
o View level of abstraction exists to simplify their interaction with system.
o System may provide many views/schemas for same database.
o Example, FACULTY of a university is interested in looking course details of students, STUDENTS are interested
in looking at all details related to academics, accounts, courses and hostel details as well.
o Different views can be generated for different users.
Conceptual-Internal Mapping
• Between conceptual level and internal level.
• Its role is to define correspondence between records and fields of conceptual level and files/data structures of
internal level.
External-Conceptual Mapping
• Between external level and Conceptual level.
• Its role is to define correspondence between a particular external and conceptual view.
Data Independence
• Relational Model uses a collection of tables to represent both data and relationships among those data.
o Each table has multiple columns, and each column has a unique name.
o Tables are also known as relations.
o Relational model is an example of a record-based model.
o Each table contains records of a particular type.
• Entity-Relationship Model uses collection of basic objects/entities & relationships among these objects.
• Object-Based Data Model Object oriented programming (java, C++, C#) has led to development of
object-oriented data model that can be seen as extending E-R model with notions of encapsulation, methods
(functions), and object identity.
o Combines features of object-oriented data model and relational data model.
• Semi-structured Data Model permits specification of data where individual data items of the same type
may have different sets of attributes.
o Extensible Markup Language (XML) is widely used to represent semi-structured data
Database Language
• DBMS has appropriate languages and interfaces to express database queries and updates.
• Database languages can be used to read, store and update data in database.
DDL tasks:
• Create: used to create objects in database.
• Alter: used to alter the structure of database.
• Drop: used to delete objects from database.
• Truncate: used to remove all records from a table.
• Rename: used to rename an object.
• Comment: used to comment on the data dictionary.
• Language that enables users to access/manipulate data as organized by appropriate data model.
• Handles user requests.
• Types of access can be:
o Retrieval of information stored in database
o Insertion of new information into database
o Deletion of information from database
o Modification of information stored in database
• Database environment is a collective system of components that comprise and regulates group of data,
management, and use of data.
• Consist of software, hardware, people, techniques of handling database, and data.
• Hardware component of database system environment includes all physical devices that comprise database
system (includes storage devices, processors, input and output devices, printers, network devices, etc).
• Software component includes all software required to access, store and regulate database (operating
systems, DBMS and application programs and utilities).
• People component includes all the people who are related to database creation, management and usage.
Procedures component of database environment is nothing but function that regulates and controls use of
database.
• Data component include collection of related data which are known fact that can be recorded and it has an
implicit meaning in databsae.