Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction To Database IT-402

Similar presentations


Presentation on theme: "Introduction To Database IT-402"— Presentation transcript:

1 Introduction To Database IT-402

2 Definition of Database
Database is an organized collection of related data that is stored in an efficient and compact manner. The word organized mean that data is stored in such away that the user can use this data easily. The word related mean that a database is normally created to store a data about a particular topic. The word efficient means that the user can search the required data quickly The word compact means that the stored data occupies as little space as possible in computers

3 Examples of Database Examples:
Some examples of database are as follows: Phone Directory A phone directory stores the phone numbers of different peoples. Any phone number from the phone directory can be searched easily because all phone numbers are stored in an organized way. Library: A library contain thousands of books. A database system can be used to store the records of books. The database can be used to search the required books easily.

4 Examples Of Database College Record
A college has many students in different classes a database is used to store the records of the students , fee transactions, examination information and the attendance of the students.

5 Database Management System
A database management system (DBMS) is a software that is used to create, maintain and access databases in a convenient manner. Characteristics of DBMS: The most important characteristics of database are - Efficiency - Compactness - Efficiency : A database management system stores, retrieves and manipulates data in a database with efficiency. It takes far less time to manipulate data as compared to file system. It uses the processing power of computer to increase its efficiency.

6 Characteristics of DBMS:
Compactness: Compactness refers to the way of storing data in a database . A database management system stores data in less space than file system. Storage capacity of computer is used properly.

7 Advantages Of Database Management System
Some of the advantages are as follow: Data Consistency Better Data Accessibility Consistency Constraints Data Atomicity Data Security Data Sharing Compactness Report Writing

8 Data Consistency In an ordinary file system one data item has to be stored in several places. If there is any change in data ,it has to change in all places. On the other hand ,in Database Management System ,one data item is usually stored at one place .Thus whenever a data is retrieved always the current value is used.

9 Better Data Accessibility
Data can be retrieved more easily in database system than in an ordinary file system Database system provides special data access language and technique to store and retrieve data Example: In a school database, it is easy to retrieve data of the students who got more than 80% marks in last examination. On the other hand ,in an ordinary file system ,a separate program is needed to get such a information.

10 Consistency Constraints
Consistency constraints are the rules that must be followed to enter data in database. If a data does not fulfill any of these constraints ,It cannot be entered in a database. In a database management system consistency constraints must be applied ,while in an ordinary file system ,It is difficult to enforce such conditions .

11 Data Atomicity Example:
One complete operation carried out on a database is called a transaction. The Atomicity means that in a database management system, either one transaction takes place as a whole or it does not take place at all. this property ensure that the database will always have correct and consistent data . Example: In an ordinary file system, the names of students who have paid their fee is maintained in one file and the names of students who have not paid their fee is maintained in another file . If a student has paid his fee, his name is entered in the file that contains the names of students who have paid their fee. it is possible that , for some reasons ,the name of the student is not removed from the file that contains the names of the students who have not paid their fee. thus the name of the student will appear in both files and the data will become inconsistent. The database management system does not allow such a situation to happen.

12 Security Data Security is the protection of the database from unauthorized access .the Database Management System provides several procedures to maintain data security. the security is maintained by allowing access to the database through use of passwords. Secrecy: Users should not be able to see things they are not supposed to. E.g., A student can’t see other students’ grades. Integrity: Users should not be able to modify things they are not supposed to. E.g., Only instructors can assign grades. Availability: Users should be able to see and modify things they are allowed to.

13 Data Sharing A Database is usually created for one application .But this Database can also be easily used for new applications that need the same data or a portion of the data.

14 Compactness Report Writing
The Database management system maintains data in a compact and efficient manner. It needs far less storage space than the ordinary file system Report Writing Presentation of processed data obtained from a database is called report. The output report can be prepared very easily and quickly in the required format in a database management system.

15 Disadvantages of Database System
A computerized database management system has several advantages over the traditional file system of maintaining records. However ,it has some limitations and disadvantages too. Some of disadvantages are : High cost of DBMS High conversion cost Trained people

16 High Cost of DBMS A complete database management system consist of sophisticated software. It also has hardware requirements . The whole system can cost a large amount . Only large business concerns can benefit from it.

17 High Conversion Cost When an organization shifts its records to database management system , data has to be converted from files into the database system . Because of the different formats used by different systems this may be time consuming process . In addition to this , the structure and data may also have to be modified according to the requirements of the database management system.

18 Trained People Trained people are required to manage the database management system . Theses people are called database administrators. This also increases the system cost.

19 Categories of Database
The range of database can be divided into four categories. Personal databases Workgroup databases Department databases Enterprise databases

20 Personal Databases Personal databases are designed to support one user . Personal databases have long resided on personal computers , including laptops. The size of database is usually in Megabytes.

21 Workgroup Databases A workgroup is relatively small team of people who collaborate on the same project or application or on a group of similar projects or applications. A workgroup typically comprises fewer than twenty five persons. The size of databases varies from Megabytes to Gigabytes.

22 Department Databases A department is a functional unit within an organization. Typically examples of departments are marketing, manufacturing and accounting. A department is generally larger than workgroup( typically between 25 and 100 persons) Department databases are designed to support various functions and activities of a department. The size of databases is usually in Gigabytes.

23 Enterprise Databases An enterprises database is one whose scope is the entire organization or enterprise. Such databases are intended to support organization wide operations and decision making. Typical number of users are more than 100. The size of database varies from Gigabytes to Terabytes.

24 Relational Database Characteristics of Relational Databases
A database in which data is stored in relations is called relational database. Relation is another term used for table. A table in a database has a unique name that identify its contents. Characteristics of Relational Databases Two important characteristics of relational databases are as follows All data in database is stored in tables. All data from a relational database is retrieved as tables.

25 Database Objects: The database objects used to store data is as follows: Tables The database object used to retrieve data through Queries.

26 Tables Table is the central concept in relational databases. All data in a relational database is stored in tables. Table is known as relation Following is an example of table : Registration No Name Class 08-arid-255 Farwa MSc 08-arid-300 Talal BSc 08-arid-296 Sara

27 Tables In relational database, a relation consists of rows and column.
Rows are also called records In the above figure , the information of each student is stored in a separate row. each row is subdivided into fields or attributes

28 Queries Queries are used to retrieve the required data from the database Data is retrieved according to the criteria given by the user The query is written in database access language. It retrieve data from the database and displays it in the form of table The most commonly used query language is SQL

29 Queries If user executes a query to retrieve the records of the students who are in MSc. The query will display the following table as result. Registration No Name Class 08-arid-255 Faria MSc 08-arid-296 Sara

30 Forms and Reports Forms:
The Forms and Reports are important features of a database system. Forms: The graphical interface used to interact with database is called form Forms are used to enter data in the database A form consist of textboxes ,labels and buttons that are used by the users for entering data easily The user can also retrieve ,change and update data by using forms.

31 Forms and Reports Reports:
Reports are the outputs of database application The user can generate different types of reports by manipulating the database . Reports are very important in making key decisions The information on the reports is arranged in different ways. A report may also contain graphs, charts and tables etc.

32 Primary Key An attribute which can uniquely identify each record of a relation (table). Primary can be one of the following Simple primary key Composite primary key If primary key consists of single attribute, it is called simple primary key If primary key consists of two or more fields ,it is called composite primary key

33 Foreign Key A Foreign key is a field or combination of fields in a table that reference a primary key in another table. The key connects to another table when relationship is being established between two tables . A table may contain many foreign keys

34 Example of a Relational Database
Relation Name Attribute Primary Key (PK) SalesNO Rate City Dept# Dallas A211 Denver F654 WashDC A211 Sale kjdfhg;jklsdfhg;sdjkhfg sdl;fkgj;sdklfjg;lsdkjfg;lksdr sd;klfg;lsdkjfg;lksdjfg’sd lskdfg;’lksdjfgl;kdjfg l;kasdfg;’lkdjfgl;kdsfg ;lkjglkajl;’ksdjfg ‘aksdjgflkasdjg kljlksdjfg ‘lkjsdfglkjasdfglk Tuple (record)

35 Example of a Relational Database
Customer CustID Name Balance City SaleNo Black Dallas Tom Denver Tom (132.90) Dallas SalesNO is PK in Sales table SalesNO Rate City Dept# Dallas A211 Denver F654 WashDC A211 Sale kjdfhg;jklsdfhg;sdjkhfg sdl;fkgj;sdklfjg;lsdkjfg;lksdr sd;klfg;lsdkjfg;lksdjfg’sd lskdfg;’lksdjfgl;kdjfg l;kasdfg;’lkdjfgl;kdsfg ;lkjglkajl;’ksdjfg ‘aksdjgflkasdjg kljlksdjfg ‘lkjsdfglkjasdfglk

36 Example of a Relational Database
Customer CustID Name Balance City SaleNo Black Dallas Tom Denver Tom (132.90) Dallas SalesNO is PK in Sales table and FK in Customer table SalesNO Rate City Dept# Dallas A211 Denver F654 WashDC A211 Sale kjdfhg;jklsdfhg;sdjkhfg sdl;fkgj;sdklfjg;lsdkjfg;lksdr sd;klfg;lsdkjfg;lksdjfg’sd lskdfg;’lksdjfgl;kdjfg l;kasdfg;’lkdjfgl;kdsfg ;lkjglkajl;’ksdjfg ‘aksdjgflkasdjg kljlksdjfg ‘lkjsdfglkjasdfglk

37 Thank You..


Download ppt "Introduction To Database IT-402"

Similar presentations


Ads by Google