Syllabus Study Introduction to database Relational algebra Relational calculus – tuple relational calculus, domain relational calculus Normalization – types Ordbms Mapping of data into files Thursday, August 08, 2019
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 Thursday, August 08, 2019
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 Thursday, August 08, 2019
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 Thursday, August 08, 2019
Logical level What data are stored in db, what relationships exist among those data View level – describes only part of the db. ------diagram--- Thursday, August 08, 2019
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. Thursday, August 08, 2019
RDBMS Primary data model for commercial data-processing 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 Thursday, August 08, 2019
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 D1*D2*D3, D1- Set of branchnames, D2- set of accountno’s , D3- set of balances. Tuple – row in a table. Thursday, August 08, 2019
The account relation Branch-name Accountno Balance Sbi A101 500 Cb 700 A365 400 Boi A785 350 Icici A111 900 Axis a555 Thursday, August 08, 2019
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) Thursday, August 08, 2019
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) Thursday, August 08, 2019