What Is a DBMS? A Database is a collection of records and data in structured format so that data can be easily retrieved for analysis and calculations.
What Is a DBMS?
A Database Management System is a system that creates, manages, and controls a database used by managers for analysis and decision making.
To understand :The importance of storing data. The roles of data models. Views of business users and database designers. The concept of sharing data.
Data independence and efficient access. Reduced application development time. Data integrity and security. Uniform data administration. Concurrent access, recovery from crashes.
Applications of DBMS
Sales Reporting
Marketing application
Marketing application
Performance Appraisal
The information from a database can be presented in a variety of formats: Most DBMSs include a report writer program that enables you to output data in the form of a report. Many DBMSs also include a graphics component that enables you to output information in the form of graphs and charts.
Formats
Report writer
Graphics
Diagram of DBMS
Components of DBMS
data
user
components
Hard-ware
Soft-ware
Advantages of a DBMS
Provides the way for storage Centralized control and an easy access Provides the way for doing simple and complex queries Arranging data in various ways
Disadvantages of DBMS
Costly due to requirements of expensive hardware Higher operating costs Greater complexity of backup and recovery in multiuser environment High risk of data loss due to centralized of database
STRUCTURE OF A DBMS
DATA DEFINITION LANGUAGE (DDL)
DATA MANAGER
FILE MANAGER
DISK MANAGER
QUERY MANAGER
DATA DICTIONARY
DBMS are very popular packages for microcomputers Examples of leading DBMS It provides user friendly interface
Data Models
A data model is a collection of concepts for describing data. A schema is a description of a particular collection of data, using the given data model. The relational model of data is the most widely used model today.
Main
concept: relation, basically a table with rows and columns. Every relation has a schema, which describes the columns, or fields.
1.
Conceptual schema:
This schema is concerned with the overall logical model of the database. It is mainly concerned with representation of information in the abstract from as compared to the way in which data is actually stored. Example:in a payroll system , the information about employee no.(4 characters), employeename(20) and basic salary (8 digits) is the conceptual view of the database.
2.
3.
External schema:1. It is concerned with the user-oriented way of viewing the data. 2. This schema is also termed as subschema. 3. Example:in a payroll system , the employee name and his basic salary as viewed by the user is the external view of the database.
Contt..
Internal schema:1. It is concerned with the actual storage design of data. 2. It reflects how the data is stored in and accessed from the physical storage. 3. Example:in a payroll system , the information about how the employee no., employee name and basic salary are stored is the internal view of the database.
1.
To Modify the Structure of the Table: In order to add new fields or delete existing fields we have to modify the structure of the table. To do this, Select the table name. Right-click on the selected name for the short-cut menu. Click on design. The table structure window is displayed where changes can be made
SQL developed by IBM , is a standard data definition and data manipulation language of relational databases. It is designed to define , access , querry , organise and update the data and information in relational databases.
Contt
To create a table of supplier database in SQL : CREATE TABLE SUPPLIER (SUPPNO CHAR (3) NOT NULL. SUPPNAME CHAR(20), CITYCODE NUMBER(2), CITYNAME CHAR(3)); To query the database , the following statement is used:
Contd...
2.
To modify/delete the data in the table: In order to edit data, or delete existing records or add new records to the table, Select the table name. Right-click on the selected name for the short-cut menu Click on Open. The data window is displayed where data can be edited, deleted or added.
3.
To Rename a table: In order to change the name of a table, Select the table name. Right-click on the selected name for the short-cut menu. Click on Rename.
4.
To Delete a table: In order to delete a table from the database, Select the table name. Right-click on the selected name for the short-cut menu. Click on delete.
5.
To Return to VB: Select File > Exit to exit from Visual Data Manager and return to VB.
Database locking
Database locking is a mechanism by which two users will be prevented from updating the same record at the same time. The Microsoft Jet database engine provides 3 levels of locking. Database locking: Only one user can access the database. Table locking: Only one user can access the table. Page locking: The Microsoft jet database engine automatically performs page locking which is to lock one page of data (normally about 2KB) in which the record is present.
1.
2.
3.
What is Normalisation ?
Normalization is the basis of designing relational databases Process of simplifying the data structure by replacing it with smaller and multiple data structure Study of relations between tables and attributes
Goals of normalisation
Minimizing the redundant data Reducing inconsistent data Designing data structures for easier maintainance
No duplicated rows in the table Each cell is single valued Entries in the column is of same kind
All non key attributes are dependent on key All column depends on the primary key only Each record in a table should be uniquely identifieable trough a single column
Contt
Third normal form A relation is said to be in third normal form if no non keyfield depends on another non-key field
Denormalisation:
Denormalisation is a processs of attempting to optimize the read performance of a database by adding redundant data or by grouping data
Limitations: Requires duplicating records (e.g. many-to-many relationship) Problems when updated Retrieval requires knowing the structure (limited data independence): traversing the tree from top to bottom using a procedural language
Contt.
Network structure: similar to the hierarchical database with the implementation of many-to-many relationships Relational structure Object-Oriented structure Objects (collection of data items and procedures) and interactions between them. Is this really a new paradigm, or a special case of network structure? Separate implementation vs. implementation on top of a RDBMS
Relational structure
Relations, attributes, tuples Primary key (unique combination of attributes for each tuple) Foreign keys: relationships between tuples (many-to-many).
Conclusion:
As we have seen DBMS is a collection of records and data in structured format so that data can be easily retrieved for analysis and calculations. Hence DBMS is very important for any organization.
Reference:
DBMS book of Bsc(I.T) by Himalaya prakashan. Introduction to Computers By A. Leon & M Leon.