Database Systems Lec 1
Database Systems Lec 1
For example, o Let’s say we have a single table student in the database, today the
table has 100 records, so today the instance of the database has 100 records.
Let’s say we are going to add another 100 records in this table by tomorrow so the
instance of database tomorrow will have 200 records in table. In short, at a
particular moment the data stored in database is called the instance, that changes
over time when we add or delete data from the database.
Views of Data Schema
Overall design of the database is called as Schema. Description of a database is
called as the database schema, which is specified during database design and is
not expected to change frequently. Database systems have several schema,
partitioned according to the levels of data abstraction.
o Physical Schema
o Logical Schema
A schema is the complete design of database it is also known as intension. It is the
collection of named objects. The names of tables, columns of each table, datatype,
triggers, functions views packages and other objects are included in the schema.
The changes in a schema are not applied so frequently, but occasionally changes
need to be applied as the requirements of application changes. The schema
modification or alteration is known as schema revolution.
The database system has various
schemata separated according to the levels
Views of Data of abstraction such as physical, logical and
external/subschema. Generally, DBMS
Example of Schema assist one physical one logical and several
sub-schemata.
Views of Data
The physical schema is the lowest level of a schema which describes how
the data stored on the disk or the physical storage.
2.Data Storage and Retrieval: Efficient mechanisms for storing data and
executing queries to retrieve it quickly.
5.Backup and Recovery: Protects data with regular backups and enables
recovery in case of system failures.
Types of DBMS
There are several types of Database Management Systems (DBMS),
each tailored to different data structures, scalability requirements, and
application needs. The most common types are as follows:
2. NoSQL DBMS
• Data Integrity & Consistency: Data integrity refers to the quality of the
information stored in our database and consistency refers to the
correctness of the data stored.
Primary Terminologies Used in
Database Design
• Data Models: Data models provide us with visual modeling techniques
to visualize the data & the relationship that exists among those data. Ex:
model, Network Model, Object Oriented Model, Hierarchical model, etc.
The user directly interacts with the application, performs operations like
calculations or data entry and stores data locally on the same machine.
1-Tier Architecture
This architecture is simple and works well for personal, standalone
applications where no external server or network connection is needed.
Advantages of 1-Tier Architecture
Below mentioned are the advantages of 1-Tier Architecture.
Simple Architecture: 1-Tier Architecture is the most simple architecture
to set up, as only a single machine is required to maintain it.
Cost-Effective: No additional hardware is required for implementing 1-
Tier Architecture, which makes it cost-effective.
Easy to Implement: 1-Tier Architecture can be easily deployed, and
hence it is mostly used in small projects.
2-Tier Architecture
The 2-tier architecture is similar to a basic client-server model . The application at the
client end directly communicates with the database on the server side. APIs like ODBC
and JDBC are used for this interaction. The server side is responsible for providing
query processing and transaction management functionalities. On the client side, the
user interfaces and application programs are run. The application on the client side
establishes a connection with the server side to communicate with the DBMS.
For Example: A Library Management System used in schools or small organizations is
a classic example of two-tier architecture.
2-Tier Architecture
Client Layer (Tier 1): This is the user interface that library staff or users
interact with. For example they might use a desktop application to search for
books, issue them, or check due dates.
Database Layer (Tier 2): The database server stores all the library records
such as book details, user information, and transaction logs.
2-Tier Architecture
The client layer sends a request (like searching for a book) to the database layer
which processes it and sends back the result. This separation allows the client to
focus on the user interface, while the server handles data storage and retrieval.
Advantages of 2-Tier
Architecture
Easy to Access: 2-Tier Architecture makes easy access to the database, which
makes fast retrieval.
Scalable: We can scale the database easily, by adding clients or upgrading
hardware.
Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture and Multi-Tier
Architecture .
Easy Deployment: 2-Tier Architecture is easier to deploy than 3-Tier
Architecture.
Simple: 2-Tier Architecture is easily understandable as well as simple because
of only two components.
3-Tier Architecture
In 3-Tier Architecture , there is another layer between the client and the
server. The client does not directly communicate with the server. Instead, it
interacts with an application server which further communicates with the
database system and then the query processing and transaction
management takes place. This intermediate layer acts as a medium for the
exchange of partially processed data between the server and the client.
3-Tier Architecture
This type of architecture is used in the case of large web applications.
For Example: E-commerce Store
User: You visit an online store, search for a product and add it to your cart.
Processing: The system checks if the product is in stock, calculates the total
price and applies any discounts.
Database: The product details, your cart and order history are stored in the
database for future reference.
Advantages of 3-Tier Architecture
Enhanced scalability: Scalability is enhanced due to the distributed deployment
of application servers. Now, individual connections need not be made between
the client and server.
Parametric End Users are the unsophisticated who don’t have any DBMS
knowledge but they frequently use the database applications in their daily life to
get the desired results. For example, Railway’s ticket booking users are naive
users. Clerks in any bank is a naive user because they don’t have any DBMS
knowledge but they still use the database and perform their given task.
Different Types of Database Users
3. A System Analyst
A system Analyst is a user who analyzes the requirements of parametric end
users. They check whether all the requirements of end users are satisfied.
4. Sophisticated Users
Sophisticated users can be engineers, scientists, business analyst, who are
familiar with the database. They can develop their own database applications
according to their requirement. They don’t write the program code but they
interact the database by writing SQL queries directly through the query
processor.
Different Types of Database Users
5. Database Designers
Data Base Designers are the users who design the structure of database which
includes tables, indexes, views, triggers, stored procedures and constraints
which are usually enforced before the database is created or populated with
data. He/she controls what data must be stored and how the data items to be
related. It is the responsibility of Database Designers to understand the
requirements of different user groups and then create a design which satisfies
the need of all the user groups.
Different Types of Database Users
6. Application Programmers
8. Specialized users
Specialized users are sophisticated users who write specialized database
application that does not fit into the traditional data-processing framework.
Among these applications are computer aided-design systems, knowledge-
base and expert systems etc.
Any Question?
Lecture 1 End