# Syllabus Study Introduction to database Relational algebra Relational

• Slides: 11

Syllabus Study • Introduction to database • Relational algebra • Relational calculus – tuple relational calculus, domain relational calculus • Normalization – types • Ordbms • Mapping of data into files Saturday, October 31, 2020

Database- Introduction 1. Definition – collection of data – interrelated information’s Eg – student, customer 2. DBMS- collection of interrelated data and set of programs to access those data. 3. Goal – To provide an environment – convenient and efficient to store and retrieve information from the database Saturday, October 31, 2020

Purpose of Database systems 1. To avoid data redundancy & inconsistency Eg – address and telephone in a record 2. To avoid difficulty in accessing data Eg- information extracted manually – avoided 3. It avoids data isolation – avoids files of different formats 4. It supports atomicity – funds transfer must be atomic 5. It supports concurrent accesses 6. Secured Saturday, October 31, 2020

View of Data • Major purpose –db system – to provide users with an abstract view of the data. • The system hides details – how the data are stored and maintained • Several abstractions – physical level , logical level, view level • Physical level – lowest level, how the data are actually stored Saturday, October 31, 2020

Logical level • What data are stored in db, what relationships exist among those data • View level – describes only part of the db. ------diagram--- Saturday, October 31, 2020

Entity & Attribute 1. Entity – describes object, action, thing Eg. Person. . Has set of properties and the values for some set of properties uniquely identify an entity. Eg. Student • Attribute – which further derives the entity. • Eg student regno, student marks, studentcourse, studrollno, custaccno, courseno. Saturday, October 31, 2020

RDBMS • Primary data model for commercial dataprocessing applications. • Relational db – consists of a collection of tables, each – assigned a unique name • A row in a table represents a relationship among a set of values • Correspondence – close relationship between the table and mathematical concept of relation Saturday, October 31, 2020

Basic structure • For each attribute – define a set of permitted values – domain • Eg : consider the account table. . 3 column headers – branchname, accountno, balance • The relation is D 1*D 2*D 3, D 1 - Set of branchnames, D 2 - set of accountno’s , D 3 - set of balances. Tuple – row in a table. Saturday, October 31, 2020

The account relation Branch-name Accountno Balance Sbi A 101 500 Cb A 215 700 Cb A 365 400 Boi A 785 350 Icici A 111 900 Axis a 555 700 Saturday, October 31, 2020

Database schema • Schema – logical design of a db • Concept – relation – programming language – variable • Concept – relation schema – programming language – type definition • In relational db, lowercase – relations, uppercase – relation schema. • Eg – account-schema • Accountschema=(bname, accno, bal) Saturday, October 31, 2020

Schema cont. . • Branch-schema = (bname, bcity, assets) • Customer-schema=(custname, custst, custcity) • Depositer-schema = (custname, accno) • Borrower-schema= (custname, loanno) • Loan-schema=(bname, lno, amt) Saturday, October 31, 2020