Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction to Databases
Database Management System (DBMS) is a collection of interrelated data and a set of programs to access those data. Database
contains information related to the enterprise. Databases are designed to manage large bodies of information. Management of data
involves both defining structures for storage of information and providing mechanism for the manipulation of information.
The program then reduces the stock of that product. If reorder level falls beyond a particular value system automatically place
order for more stock of that item.
A checking is done by comparing the prices of items purchased against sum of all the purchases you have already done this month.
Find Out:
Application of database in library
Application of database in University
Database Approach
-A shared collection of logically related data designed to meet the information needs of an organization. Instead of using
disconnected files with redundant data all data is integrated with minimum amount of duplication. The data is no longer used by
one department. A database is a self describing collection of integrated records and its called system catalog, metadata or data
dictionary.
One major advantage of a Database approach is that users see only the external definition and is unaware of how object is defined
and how it functions. This approach is called data abstraction, which means we can change the internal definition of object
without affecting the users of the object.
Components of DBMS
There are 5 major components of a Database Environment
• Hardware
• Software
• Data
• Procedure
• People
Hardware-The DBMS and applications require hardware to run. The hardware can range from single personal computer to a
network of computers. The particular hardware depends on organizations requirements and the DBMS used.
Software-The software component comprises the DBMS software itself and the application programs together with the operating
system including network software if DBMS is used over a network.
Data-The database has operational data and metadata (data about data).The structure of database is called schema.
Procedures-It refers to the instructions and rules that govern the design and use of database.
Database Administrator
-One of the main reasons for using database is to have central control of both the data and the programs that access those data. A
person who has such a central control over the system is called a DBA.
Database Designers
-Logical database designers: They identify the data, relationship between data, constraints on the data.
-Physical database designer-He takes the logical data model and decides how it is physically realized. Mapping logical data to a
set of tables & enforce security measures.
Application Programmers
-Once the database has been implemented, application programmer provides the required functionality for the end user. They write
the statements to manipulate the data from the database.
Database Users
There are two different types of database system users, differentiated by the way they are expected to interact with the system.
1. Naive Users: totally unaware of the database. They access the database through the application program
2. Sophisticated Users: They know the structure of database and the facilities offered by the database.
COMP08/COMP12-PRELIMS 3/5
Advantages of DBMS
1. Control of data redundancy: Data is just stored at one place and is accessed from there
2. Data consistency: As the data is stored only at place an updating is performed only once and new value is available for all
the users.
3. Sharing of data
4. Improved data integrity: refers to validity and consistency of stored data.
5. Improved security: Protection of database from unauthorized access.
6. Improved backup
Disadvantages of DBMS
1. Complexity: All the users and developers should understand the functionality to take full advantage of it.
2. Size: It takes lots of memory.
3. Cost: High impact on failure.
Database Environment
Views of data
A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details
of how data are stored and maintained.
Data Abstraction
• Physical level or Internal Level
• Logical level or Conceptual Level
• View level or External Level
Physical level or Internal Level--This is lowest level of abstraction describes how the data are actually stored. It describes the
complex level data structures. It is concerned with things like
• storage space allocation for data and indexes
• record description for storage
• record placement
• data compression
Logical level or Conceptual level--This describes what data is stored in the database and the relationships among data.
• It represents all entities, attributes and their relationship
• The constraints on the data
• Security information
External Level or View Level--The user's view of database. This level describes the part that is relevant to each user. This is the
highest level of abstraction. This describes different views of the database.
The physical schema describes the database design at the physical level, logical schema defines database at the logical level.
Different views of database described in subschema. The physical schema is hidden beneath the logical schema and can be easily
changed without affecting the application program.
The data in the database at any point of time is called database instance.
COMP08/COMP12-PRELIMS 4/5
Data model
-Data model is a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints.
Physical Data Model - describes how data is stored in a computer, representing information such as record structures, record
orderings and access path.
Record data model - In this model data is organized in the form of records with a fixed number of fields.
3 types of record-based models:
• Hierarchical model
• Relational model
• Object-based Model
Hierarchical model - Data is represented as a collection of records and relationships as sets. Represented as a tree structure each
node is allowed to have only one parent.
Relationship model - The E-R model based on the perception that the real world consists of basic objects called entities, and
relationship among these entities. Entities are described in the database by a set of attributes. A relationship is an association
among various entities.
An E-R diagram that is built of following components can express the overall logical structure of a database graphically:
• Rectangles, which represent entity sets
• Ellipses, which represent attributes
• Diamonds, which represent relationships among entity sets
• Lines, which link attributes to entity sets and entity sets to relationships
• Each component is labeled with entity or relationship it represents.
The Relational model -uses collection of tables to represent both data and the relationships among these data. Each table has
multiple columns and each column has unique name. It is based on mathematical relations.
Object-relational data model combines the features of the object-oriented model and relational model.
Database Languages
A database system provides a data definition language and a data manipulation language.
The database schema is specified by a set of definitions expressed by a special language called a DDL.
When a table is defined in DDL, a data dictionary or data directory is created. A data dictionary contains metadata-data about data.
A database consults data dictionary before adding or modifying actual data called system catalog.
A special type of DDL called data storage and definition language specifies storage structures and access methods used by
database system. The data values stored in the database must satisfy certain consistency constraints.
The result of compilation of the DDL statements is a set of tables stored in a specific file collectively.
COMP08/COMP12-PRELIMS 5/5
A DML is the language that enables users to access or manipulate data as organized by the appropriate data model.
Query is a statement requesting the retrieval of information. The portion of a DML that involves information retrieval is called a
query language.
4GL
-It stands for 4th generation Languages. This is a non-procedural language. Some features of 4GL are presentation languages like
query language and report generators specialty languages like spreadsheets and database languages.
Form Generators: It allows the user to define what the screen looks like, what information is to be displayed and where on the
screen it should be displayed.
Report Generators: It provides the facility to create reports from data stored in the database.
Graphics Generators: It helps to retrieve data from the database and display the data as a graph.
Views: Another feature provided by most databases is View Mechanism, which allows users to have their own view of the
database.