1 / 29

DBMS Fundamentals:Introduction

DBMS Fundamentals:Introduction. What is a Database System. A Database System is essentially a computerized record-keeping system. A database-management system (DBMS) consists of a collection of interrelated data and a set of programs to access those data.

varner
Download Presentation

DBMS Fundamentals:Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DBMS Fundamentals:Introduction

  2. What is a Database System • A Database System is essentially a computerized record-keeping system. • A database-management system (DBMS) consists of a collection of interrelated data and a set of programs to access those data. • Database systems are designed to manage large volume of information

  3. File Organization : Terms and Concepts • Database: Group of related files • File: Group of records of same type • Record: Group of related fields • Field: Group of words or a complete number • Byte: Group of bits that represents a single character • Bit: Smallest unit of data; binary digit (0,1) Data Hierarchy in a Computer System

  4. Database Concepts: A Relational Approach

  5. Database: Introduction A Database is an electronic store of data. • It is a repository that stores information about different things and also contains relationships among those different things.

  6. Structure of database • A Person, place, event or item is called an entity. • The facts describing an entity are known as data. • Each entity can be described by its characteristics, which are known as attributes. Eg. Student identification number,last name, first name,phonenumber,gender and so on. • All the related entities are collected together to form an entity set. • A database is collection of entity sets. • The entities in a databse are likely to interact with other entities. The interactions between the entity sets are called relationships.

  7. Relationships E2 E1 One-to-One 1:1 E2 One-to-Many E1 1:M Many-to-Many E2 E1 M:N

  8. Realtionships • One-to-one relationship • It is written as 1:1 in short form • Eg. An employee manages one department in a company, and only one employee manages a department. • One-to-many relationship • It is written as 1:M. • Eg. (i)An Employee works in a department, but a department has many employees. • (ii) A faculty teaches for one division in a college, but division has many faculty members.

  9. (cont..) • Many-many relationship: • It is written as M:N or M:M. • Eg. (i)An employee works on many projects, and a project has many employees. • (ii) A student takes many courses, and many students take a course

  10. Database Management System(DBMS) • A DBMS software package such as MS-Access, Visual Foxpro,MS-SQL server,Oracle. • A user developed and implemented database that includes tables, a data dictionary. • Custom applications such as data-entry forms,reports,queries,blocksand programs. • Computer hardware: Personal computers, mini computers and mainframes in a network environment. • Software: An operating system and a N/W OS. • Personnel: A database administrator, a database designer/analyst, a programmer and end users.

  11. Fig: Database System User Applications DBMS Database OS Software Hardware

  12. Important functions • The data dictionary is a system structure that stores metadata(data about data). • It manages all day-to-day transactions. • It secures access through passwords, encryption and restricted user rights. • It provides backup and recovery procedures for physical security of data. • It allows users to share data with data-locking capabilities. • It provides import and export utilities. • It allows users to specify validation rules.

  13. Relational Database Model • Represents data as two-dimensional tables called relations • Relates data across tables based on common data element Examples: DB2, Oracle, MS SQL Server

  14. Relational database Model • A row is referred to as a tuple. • A Key is a minimal set of columns used to uniquely define any row in a table. • A single column is used as unique identifier, it is known as primary key. • A column in a table that references a column in another table is known as foreign key.

  15. Relational database Model • PROJ2017 • PROJ2018

  16. PRJPARTS • PARTS

  17. DEPARTMENT • EMPLOYEE

  18. Notation used for tables • PROJ2017(ProjNo,Location,customer) • PROJ2018(ProjNo,Location,customer) • PRJPARTS(ProjNo,PartNo,Qty) • PARTS(PartNo,PartDesc,Vendor,Cost) • DEPARTMENT(DeptNo,DeptName) • EMPLOYEE(EmpNo,Ename,DeptNo,ProjNo,Salary)

  19. Integrity Rules • Entity Integrity: • No column in a primary key may be null. • A Null value means a value that is not known, not entered, not defined, or not applicable. • Referential Integrity: • A foreign key value may be a null value, or it must exist as a value of primary key in the referenced table.

  20. Theoretical Relational Languages • Relational Algebra: A Procedural language • Union • Intersection • Difference • Projection • Selection • Product • Assignment • Join • Division • Relational Calculus: A nonprocedural language

  21. Union TABLE_A=PROJ2017 U PROJ2018 TABLE_A

  22. Intersection TABLE_B=PROJ2017 ∩ PROJ2018 TABLE_B

  23. Difference TABLE_C=PROJ2017 - PROJ2018 TABLE_C TABLE_D=PROJ2018 - PROJ2017 TABLE_D

  24. Projection • TABLE_E=PARTS(PartDesc, Cost) Selection • TABLE_F=Sel(PARTS:Cost>10.00)

  25. Product • If the first table has x rows and the second table has y rows, the resulting product has x*y rows. • If the first table has m columns and the second table has n columns, the resulting product has m+n columns. DEPARTMENTEMPLOYEE TABLE_G=EMPLOYEE*DEPARTMENT 2 * 3=6 rows 1 + 1=columns

  26. Assignment • Assignment(=) gives us an ability to name new tables that are based other tables. • Eg: TABLE_A=PROJ2017 U PROJ2018 TABLE_C=PROJ2017 - PROJ2018 Join: TABLE_H=join(EMPLOYEE,DEPARTMENT:DeptNo=DeptNo)

  27. Division: It identifies rows in one table that have a certain relationship to all rows in another table. • Let us consider the following two tables: PROJ TABLE_I=PRJPARTS/PROJ PROJPARTS

  28. Database Design:Data Modeling and Normalization Data Modeling • The Entity-Relationship (E-R) model is a very popular modeling tool among many such tools available today. • The E-R model uses E-R diagrams(ERD) for graphical representation of the database components. • An entity (or an entity set) is represented by rectangle. The name of the entity(set) is written within the rectangle.

  29. A line represents relationship between the two entities. • The name of the relationship is an active verb in lowercase letters. • For Eg: works, manages, employs EMPLOYEE

More Related