Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files.

Similar presentations


Presentation on theme: "Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files."— Presentation transcript:

1 Database Concepts

2 Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files in which logically related information is stored. Data Base Management System : A Collection of programs for storing and retrieving information from the database is called DBMS.

3 1.Data Redundancy ( Duplication of Data ) is removed. 2.Data Inconsistency can be controlled. 3.Sharing of Data. 4.Security of Data. It means data can be protected from an unauthorized user. 5.Integrity Rules can be applied. Advantages of DBMS

4 Levels of Database Implementation Internal Level ( Physical Level ) Conceptual Level External Level ( View Level )

5 Internal Level ( Physical Level ) The lowest level of database which is closest to the physical storage. It describes how the data is actually stored on the storage medium.

6 Conceptual Level The level of database which describes what data is actually stored in the database.At this level the relationship between the data elements is described.

7 View Level ( External Level ) The level of database which is closest to the user. It is only concerned with the way how the data is viewed to the users.The System is able to create more than one views for the end user on the basis of the data stored.

8 Levels of Data Abstraction Physical Level Conceptual Level View 3View 2View 1

9 Data Independence The ability to modify a scheme definition at one level without affecting scheme definition of next higher level. It is of two types: ( 1 ) Physical Data Independence ( 2 ) Logical Data Independence

10 ( 1 ) Physical Data Independence: The ability to modify physical level without affecting the conceptual level. In this the application programs remains the same. ( 2 ) Logical Data Independence: The ability to modify conceptual level without affecting the view level.

11 Relational Data Model A Data Model where data is organized in the form of tables. These tables are called relations. A relation or table is collection of horizontal rows and vertical columns. This model was proposed by E.F.Codd of IBM. The data stored in these relations is logically related. Advantages : ( 1 ) Easy to understand. ( 2 ) In this model the relationship between databases is established by data values.

12 S.No. Name Age

13 Basic Terminology 1. Relation : A relation is a table which a collection of rows and columns. 2. Domain : It is a pool of values from which the actual values are taken. 3. Tuple : The horizontal rows of a relation are called tuples. 4. Attribute : The vertical columns of a relation are called attributes. 5. Degree of a relation : The total number of attributes of a relation are termed as degree of a relation.

14 6.Cardinality of a relation: The total number of rows in a relation are known as cardinality of a relation. 7.View: A view is a virtual table whose contents are taken from a existing table(base table) depending upon a condition. A vies does not have data of its own. 8.Primary Key: A key or a set of keys which can be used to uniquely identify the tuples of a relation. 9.Candidate Key: A key or a set of keys which can be used as a primary key to identify the tuples of a relation.

15 10.Alternate Key: A key or a set of keys which can not be used to identify the tuples of a relation. 11.Foreign Key: A key in a relation which can be used to make a relationship with some other relation and it appears as a primary key in that relation.

16 Relational Algebra Operators in Relational Algebra 1. Select Operation : 2. Project Operation : 3. Cartesian Product Operation : 4. Union Operation : 5. Set Difference Operation : 6. Set Intersection Operation :

17 1. Select Operation :It is a unary operator which selects the tuples ( horizontal subset ) from a relation that satisfy a given predict or condition. The selection is denoted by the symbol sigma ( σ ). 2. Project Operation :It is a unary operator which selects the specified attributes ( vertical subset ) from a relation that satisfy a given predict or condition. The projection is denoted by the symbol pi ( π ).

18 3. Cartesian Product Operation : It is a binary operator which yields a new relation which has a degree ( number of attributes ) equal to the sum of the degrees of the two relations operated upon and number of tuples ( Cardinality ) equal to the product of the number of tuples of two relations. The Cartesian Product of two relations A and B is denoted by A X B.

19 4. Union Operation :It is a binary operator which operates on two relations and yields a new relation that contain tuples from both the relations. The condition to apply this operator are : ( a ) The two relations A and B must have same degree. ( b ) The domain of ith attribute of relation A and the domain of ith attribute of relation B must be same. All the duplicate tuples are automatically removed using this operated. The Union Operation of two relations A and B is denoted by A U B.

20 5. Set Difference Operation : It is a binary operator which operates on two relations and yields a new relation that contain tuples which are present in first relation but not in the second table. The condition to apply this operator is that the two relations A and B must have same degree. The new relation will contain the tuples which are present in A but not in B. The Set difference Operation of two relations A and B is denoted by A – B.

21 6. Set Intersection Operation : It is a binary operator which operates on two relations and yields a new relation that contain tuples which are present both the relations. The condition to apply this operator is that the two relations A and B must have same degree. The new relation will contain the common tuples of A and B. The Set Intersection operation of two relations A and B is denoted by A B.

22 Disadvantages of Database System 1.Extra hardware may be required. 2.System is likely to be very complex.

23 Thanks


Download ppt "Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files."

Similar presentations


Ads by Google