Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
25 views

Database Managment Notes

1. A database is a collection of related data that represents some aspect of the real world. A database management system (DBMS) is software that allows for storing, retrieving, and manipulating this data. 2. A DBMS provides an interface between users/applications and the database. It ensures security, removes redundancy, and allows for multiple views of the data. 3. Popular DBMS software includes MySQL, Microsoft Access, Oracle, PostgreSQL, and Microsoft SQL Server. DBMS are used across many sectors like banking, healthcare, education and more to manage important information.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Database Managment Notes

1. A database is a collection of related data that represents some aspect of the real world. A database management system (DBMS) is software that allows for storing, retrieving, and manipulating this data. 2. A DBMS provides an interface between users/applications and the database. It ensures security, removes redundancy, and allows for multiple views of the data. 3. Popular DBMS software includes MySQL, Microsoft Access, Oracle, PostgreSQL, and Microsoft SQL Server. DBMS are used across many sectors like banking, healthcare, education and more to manage important information.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Database Management Systems

1. What is a Database?

A database is a collection of related data which represents some aspect of the


real world. A database system is designed to be built and populated with data
for a certain task.

2. What is DBMS?

Database Management System (DBMS) is a software for storing and retrieving


users' data while considering appropriate security measures. It consists of a
group of programs which manipulate the database. The DBMS accepts the
request for data from an application and instructs the operating system to
provide the specific data.

The term “DBMS” includes the user of the database and other application
programs. It provides an interface between the data and the software
application.

Example of a DBMS: Let us take a database maintaining information concerning


students, courses, and grades in a university environment. The database is
organized as five files:

 The STUDENT file stores data of each student


 The COURSE file stores contain data on each course.
 The SECTION stores the information about sections in a particular course.
 The GRADE file stores the grades which students receive
 The TEACHER file contains information about each professor.

3. History of DBMS: Some important landmarks from the history:

 1960 - Charles Bachman designed first DBMS system


 1970 - Codd introduced IBM'S Information Management System (IMS)
 1976- Peter Chen coined and defined the Entity-relationship model ER
model
 1980 - Relational Model becomes a widely accepted database component
 1985- Object-oriented DBMS develops.
 1990s- Incorporation of object-orientation in relational DBMS.
 1991- Microsoft ships MS access, a personal DBMS and that displaces
all other personal DBMS products.
 1995: First Internet database applications
 1997: XML1 applied to database processing. Many vendors begin to
integrate XML into DBMS products.

1
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding
documents in a format that is both human-readable and machine-readable.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 1
http://people.du.ac.in/~pmittal/
An object-oriented database management
system (OODBMS) is a database
management system that supports the
creation and modeling of data as objects.
OODBMS also includes support for classes
of objects and the inheritance of class
properties, and incorporates methods,
subclasses and their objects. Most of the
object databases also offer some kind of
query language, permitting objects to be
found through a declarative programming
approach.

Object is a real world entity such as pen,


laptop, mobile, bed, keyboard, mouse, chair
etc. Class is a group of similar objects.
E.g. Class: Mobile phone Object: iPhone,
Samsung, Moto

Data encapsulation also known as data hiding, is the mechanism whereby the implementation
details of a class are kept hidden from the user. The user can only perform a restricted set of
operations on the hidden members of the class by executing special functions commonly called
methods.
Inheritance is a mechanism in which one class acquires the property of another class. For
example, a child inherits the traits of his/her parents. With inheritance, we can reuse the fields
and methods of the existing class. Hence, inheritance facilitates Reusability and is an important
concept of OOPs.

Polymorphism is the ability of an object to take on many forms. It is the ability of a message to
be displayed in more than one form. E.g., a person at the same time can have different
characteristic. Like a man at the same time is a father, a husband, an employee.

4. Characteristics of Database Management System

 Provides security and removes redundancy


 Self-describing nature of a database system
 Insulation between programs and data abstraction
 Support of multiple views of the data
 Sharing of data and multiuser transaction processing
 DBMS allows entities and relations among them to form tables.
 It follows the ACID concept (Atomicity, Consistency, Isolation, and
Durability). Atomicity guarantees that each transaction is treated as a single "unit", which
either succeeds completely, or fails completely Consistency ensures that a transaction can
only bring the database from one valid state to another. Isolation ensures that concurrent
execution of transactions leaves the database in the same state that would have been
obtained if the transactions were executed sequentially. Durability guarantees that once a
transaction has been committed, it will remain committed even in the case of a system
failure
 DBMS supports multi-user environment that allows users to access and
manipulate data in parallel.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 2
http://people.du.ac.in/~pmittal/
5. DBMS vs. Flat File

DBMS Flat File Management System


Multi-user access It does not support multi-user access
Design to fulfill the need for small and large It is only limited to smaller DBMS system and
businesses stores in plain text. Each line holds one record
separated by delimiters.
Remove redundancy and Integrity Redundancy and Integrity issues
Expensive. But in the long term Total Cost of It's cheaper
Ownership is cheap
Easy to implement complicated transactions No support for complicated transactions

6. Users in a DBMS environment

Component Name Task


Application Programmers The Application programmers write programs in various
programming languages to interact with databases.
Database Administrators Database Admin is responsible for managing the entire DBMS
system. He/She is called Database admin or DBA.
End-Users The end users are the people who interact with the database
management system. They conduct various operations on
database like retrieving, updating, deleting, etc.

7. Popular DBMS Software

 MySQL
 Microsoft Access
 Oracle
 PostgreSQL
 FoxPro
 SQLite
 LibreOffice Base
 Microsoft SQL Server etc.

8. Application of DBMS

Sector Use of DBMS


Banking For customer information, account activities, payments, deposits, loans, etc.
Airlines For reservations and schedule information.
Universities For student information, course registrations, colleges and grades.
Telecommunic It helps to keep call records, monthly bills, maintaining balances, etc.
ation
Finance For storing information about stock, sales, and purchases of financial
instruments like stocks and bonds.
Sales Use for storing customer, product & sales information.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 3
http://people.du.ac.in/~pmittal/
Manufacturing It is used for the management of supply chain and for tracking production of
items. Inventories status in warehouses.
HR For information about employees, salaries, payroll, deduction, generation of
Management paychecks, etc.

9. Types of DBMS

Types of DBMS

Hierarchical DBMS

In a Hierarchical database, model data is organized in a tree-like structure. Data is


Stored Hierarchically (top down or bottom up) format. Data is represented using a
parent-child relationship. In Hierarchical DBMS parent may have many children, but
children have only one parent.

Network Model

The network database model allows each child to have multiple parents. It helps you to
address the need to model more complex relationships like as the orders/parts many-
to-many relationship. In this model, entities are organized in a graph which can be
accessed through several paths.

Relational model

Relational DBMS is the most widely used DBMS model because it is one of the
easiest. This model is based on normalizing data in the rows and columns of the
tables. Relational model stored in fixed structures and manipulated using SQL.

Object-Oriented Model

In Object-oriented Model data stored in the form of objects. The structure which is
called classes which display data within it. It defines a database as a collection of objects
which stores both data members values and operations.

10. Advantages of DBMS

 DBMS offers a variety of techniques to store & retrieve data


 DBMS serves as an efficient handler to balance the needs of multiple
applications using the same data
 Uniform administration procedures for data
 Application programmers never exposed to details of data representation
and storage.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 4
http://people.du.ac.in/~pmittal/
 A DBMS uses various powerful functions to store and retrieve data
efficiently.
 Offers Data Integrity and Security
 The DBMS implies integrity constraints to get a high level of protection
against prohibited access to data.
 A DBMS schedules concurrent access to the data in such a manner that only
one user can access the same data at a time
 Reduced Application Development Time

Limitations of DBMS

 Cost of Hardware and Software of a DBMS is quite high which increases the
budget of your organization.
 Most database management systems are often complex systems, so the
training for users to use the DBMS is required.
 In some organizations, all data is integrated into a single database which can
be damaged because of electric failure or database is corrupted on the
storage media
 Use of the same program at a time by many users sometimes lead to the loss
of some data.
 DBMS can't perform sophisticated calculations
 DBMS is not suited and recommended when you do not have the budget
or the expertise to operate a DBMS. In such cases, Excel/CSV/Flat Files
could do just fine.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 5
http://people.du.ac.in/~pmittal/
DBMS in Business Applications with MS Access

The world of data is constantly changing and evolving every second. This in turn has
created a completely new dimension of growth and challenges for companies around
the globe. By accurately recording data, updating and tracking them on an efficient and
regular basis, companies can address their challenges on one hand and make use of the
immense potential offered by this sector on the other hand.

By collecting minute and updated data, companies are using the said information to
achieve their goals in a systematic way on one hand and empower their business in a
strategic manner on the other hand. Some of the activities conducted after collection
of data includes creating accounting reports, calculating sales estimates and
creating invoices of customers. Important applications of DBMS in Business:

 Data management system is needed for data access within the company.
 It is needed to maintain strong relationships between data. For e.g. Product sales
of one table with sales of an employee of another table
 It helps brand managers to search data in a better manner
 It allows newer and better updates

With so much information available for companies, investing in a database management


systems is of critical importance for brands across all sectors and groups. Today,
virtually all companies and brands run of database systems. These storehouse of
organised information can help brands to store information of all kinds, which they can
not just sort but also make available at the click of a mouse as well. In short, database
management systems helps brands to track every part of their business in a fast,
effective, efficient and successful way than ever before.

What is Microsoft Access?


Microsoft Access is a Database Management System offered by Microsoft. It uses the
Microsoft Jet Database Engine and comes as a part of the Microsoft Office suite of
application.

Important Terms

Database File: It is a file which stores the entire database. The database file is saved to
your hard drive or other storage devices.

Data types: Data types are the properties of each field. Every field has one datatype like
text, number, date, etc.

Table: A Table is an object which stores data in Row & Column format to store data.

 A Table is usually related to other tables in the database file.


 Each column must have Unique name
 We can also define Primary Key in a table. (Note: A foreign key is a column or group
of columns in a relational database table that provides a link between data in two tables. A
single entry in a table is called a Tuple or Record or Row. A table consists of several
records(row), each record can be broken down into several smaller parts of data
known as Attributes.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 6
http://people.du.ac.in/~pmittal/
Query

 Queries answer a question by selecting and sorting and filtering data based on
search criteria.
 Queries show a selection of data based on criteria (limitations) you provide.
 Queries can pull from one or more related Tables and other Queries.
 Types of Query can be SELECT, INSERT, UPDATE, DELETE.

Form

 A form is a database object that you can use to create a user interface for a
database application.
 Forms help you to display live data from the table. It mainly used to ease the
process of data entry or editing.

Report

 A report is an object in desktop databases primarily used for formatting,


calculating, printing, and summarizing selected data.
 You can even customize the report's look and feel.

MS Access Data types

Type of Description Size


Data
Short Text Text, including numbers which does not need Up to 255 characters.
calculation. (e.g., Mobile numbers).
Long Text This data type is used for lengthy text or Maximum 63, 999 characters.
(memo) alphanumeric data.
Number Numeric data type used for storing 1, 2, 4, 8, and 16 bytes.
mathematical calculations.
Date/Time Store Date/time for the years 100 through 8 bytes.
9999.
Currency It allows you to store currency values and 8 bytes.
numeric data with one to four decimal places.
Auto Assign a unique number or assigned by Four bytes (16 bytes if it is set
Number Microsoft Access when any new record is as a Replication ID).
created. Usually used as the primary key
Yes/No It only stores logical values Yes and No. 1 bit
Attachment It stores files, such as digital photos. Multiple Up to 2 GB Data can be stored.
files can be attached per record.
OLE objects OLE objects can store audio, video, other Up to 2 GB data can be stored.
Binary Large Objects.
Hyperlink Text or combinations of text and numbers Each part of a Hyperlink data
stored. That text is used as hyperlink address. type allows you to store a
maximum 2048 characters.
Calculated Helps you to create an expression that uses You can create an expression
data from one or more fields. which uses data from one or
more fields.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 7
http://people.du.ac.in/~pmittal/
Differences between Access and Excel
Microsoft Access and Excel are very similar yet very different. Here, are some important
difference points between both of them-
Access Excel
Deals with text, numbers, files and all kinds of Microsoft Excel generally deals with
data numerical data
All the data is stored one time, in one place. Lots of worksheets or documents are a
store with similar, repeated data.
Helps you to build highly functional data entry Only the primary data entry screen is
forms and report templates. available.
Users will be able to enter the data more Data accuracy and speed is not much
efficiently and accurately. because of the format.

Advantages of MS ACCESS
 Access offers a fully functional, relational database management system in
minutes.
 Easy to import data from multiple sources into Access
 You can easily customize Access according to personal and company needs
 Access works well with many of the development languages that work on
Windows OS
 It is robust and flexible, and it can perform any challenging office or industrial
database tasks.
 MS-Access allows you to link to data in its existing location and use it for viewing,
updating, querying, and reporting.
 Allows you to create tables, queries, forms, and reports, and connect with the
help of Macros
 Macros in Access is a simple programming construct with which you can use to
add functionality to your database.
 It can perform heterogeneous joins between various data sets stored across
different platforms

Limitations of MS-ACCESS
 Microsoft Access is useful for small-to-medium business sectors. However, it is
not useful for large-sized organizations
 Lacks robustness compared to DBMS systems like MS SQL Server or Oracle
 All the information from your database is saved into one file. This can slow down
reports, queries, and forms
 Technical limit is 255 concurrent users. However, the real-world limit is only 10
to 80 (depending on the type of application which you are using)
 It requires a lot more learning and training compares with other Microsoft
programs

Start using Microsoft Access: There are two ways to Start MS Access.

1. From Windows, 'Start' button.


2. From Desktop, Right Click> 'New' option.

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 8
http://people.du.ac.in/~pmittal/
Test Your Self

Q1. Which field type will you select if you need to enter long text in that field?
A. Text B. Memo C. Currency D. Hyperlink

Q2. Which of the following is not a type of MS Access database object?


A. Table B. Form C. Worksheets D. Modules

Q3. The size of yes/no field is always ________


A. 1 Bit B. 1 Byte C. 1 Character D. 1 KB

Q4. What can be the maximum length of a text field?


A. 120 B. 255 C. 265 D. 75

Q5. The columns in a Microsoft access table are also called _______
A. Rows B. Records C. Fields D. Columns

Q6. Which of the following is not a field type in Microsoft Access?


A. Memo B. Hyperlink C. Ole Object D. Lookup Wizard

Q7. A relational database consists of a collection of_________


A. Tables B. Fields C. Records D. Keys

Q8. A relational database developer refers to a record as_________


A. A Criteria B. A relation C. A Tuple D. An attribute

Q9. Key to represent relationship between tables is called_________


A. Primary key B. Secondary key C. Foreign key D. None of these

Q10. DBMS helps achieve_________


A. Data Independence
B. Centralized control of data
C. Control redundancy
D. All of above

Your Score:____________/10

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 9
http://people.du.ac.in/~pmittal/
Preparing Sales Report with MS-Access

Input

A. Employee details
 Employee_Id (Primary key)
 Name
 Phone
 Designation (Lower/Middle/Senior)
 City (Delhi/Mumbai/Chennai/Kolkata)

B. Product details
 Product_Id (Primary key)
 Product_name
 Purchase_price
 Sales_price
 Qty_available
 Perishable (Yes/No)
 Date_of_expiry

B. Customer Details
 Customer_Id (Primary key)
 Cust_name
 Phone

C. Sale details
 Sales_Id (Primary key)
 Date_of_sale
 Product_Id
 Qty_sold
 Emp_id
 Customer_id

Output (Create Query and Report)

A. Create Customer Invoice

Customer Name: Date:


Phone:

Product Id Product Name Qty Purchased Sale Price Amount


................. ...................... ...................... ............... .............

B. Generate Product wise Sales Report (City, Product name, Qty Sold, Net Qty)

Dr. Prabhat Mittal Ph.D.(FMS, DU)


Post-doctoral, University of Minnesota, USA Page 10
http://people.du.ac.in/~pmittal/

You might also like