Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Database SEM I, AY 2012-13 Department of Information Technology Salalah College of Technology Chapter No.1.

Similar presentations


Presentation on theme: "Introduction to Database SEM I, AY 2012-13 Department of Information Technology Salalah College of Technology Chapter No.1."— Presentation transcript:

1 Introduction to Database SEM I, AY 2012-13 Department of Information Technology Salalah College of Technology Chapter No.1

2 Chapter 1 - Basic Design Principles in Database (T1) - Identify Data Rules and Integration(T4) - Indentify Primary and Other Keys(T9) 2

3 Basic Design Principles in Databases Data, Database, DBMS: Examples, Applications, Types, Benefits, Database Environment. 3

4 Data, Information, & Knowledge Definition(s): Both information and data are types of knowledge. Data can be in the form of numbers, characters, symbols, or even pictures. A collection of these data which conveys some meaningful idea is information. Explanation: The raw input is data and it has no significance when it exists in that form. When data is collated or organized into something meaningful, it gains significance. This meaningful organization is information. 4

5 General Definitions The smallest data item that computers support is called a bit, short for "binary digit." It can assume one of two values, 0, or off, and 1, or on. A Character is letter, digit, or special character (such as $, ?, *, or even a blank space). A set of related characters is called a field or column. A collection of related field is called a record. It is sometimes known as a tupple or row. They include the individuals IDnumber, name, address, etc. A collection of related records is a file. A table is a collection of rows and columns. 5

6 Before the database management approach, organizations relied on file processing systems to organize, store, and process data files. End users criticized file processing because the data is stored in many different files and each organized in a different way. Each file was specialized to be used with a specific application. File processing was bulky, costly and nonflexible when it came to supplying needed data accurately and promptly. File Processing Systems 6

7 Disadvantages: 1. Program-Data Dependence: File descriptions are stored within each application program that accesses a given file. 2. Duplication of Data: Applications are developed independently in file processing systems. Duplication is wasteful as it requires additional storage space and changes in one file must be made manually in all files. 3. Limited data sharing: Each application has its own private files with little opportunity to share data outside their own applications. 4. Lengthy Development Times: Each new application requires the developer to start from scratch by designing new file formats and descriptions 5. Integrity Problem: The problem of integrity is the problem of ensuring that the data in the database is accentuate. 6. Excessive Program Maintenance: The preceding factors create a heavy program maintenance load. 7

8 Database Definition(s): 1.A database consists of an organized collection of data for one or more uses, typically in digital form. 2.Data stored in computer-readable form, usually indexed or sorted in a logical order by which users can find a particular item of data they need. References: 1. http://en.wikipedia.org/wiki/Database 2. www.lehigh.edu/~inimr/inchain/supplyChainGlossary/d.html 8

9 Database Management System Definition: A database management system (DBMS) is a system that allows to build and maintain databases, as well as to utilize their data and retrieve information from it. A DBMS consists of software that operates databases, providing storage, access, security, backup and other facilities to meet needed requirements. Examples of some commonly used DBMS are MySQL, PostgreSQL, Microsoft Access, SQL Server, Oracle, Sybase, etc. 9

10 Database Applications Databases almost touch all aspects of our lives. Database Applications: – Banking: all transactions – Airlines: reservations, schedules – Universities: registration, grades – Sales: customers, products, purchases – Online retailers: order tracking, customized recommendations – Manufacturing: production, inventory, orders, supply chain – Human resources: employee records, salaries, tax deductions 10

11 Common Types of DBMS 1.Centralized Databases 2.Personal computer Databases 3.Client/server Databases 4.Distributed Databases 11

12 Benefits of Database  Minimal data redundancy  Consistency of data  Integration of data  Sharing of data  Ease of application development  Uniform security, privacy, and integrity controls  Data accessibility and responsiveness  Data independence  Reduced program maintenance. 12

13 Components of Database Environment 1. Computer-aided software engineering (CASE) tools. Automated tools used to design databases and application programs 2. Repository. Centralized storehouse for all data definitions, data relationships, screen and report formats. 3. Database Management System (DBMS). Commercial software system used to define, create, maintain, and provide controlled access to database and repository. 4. Database. An organized collection of related data, to meet the information needs of multiple users. 5. Applications programs. Computer programs used to create and maintain database and provide information to users. 6. User Interface. Languages, menus, and other facilities by which users interact with the system components 7. Data Administrators. Persons responsible for the overall information resources. 8. System Developers. System Analysts and Programmers who design new application programs 9. End Users. Persons who add, delete, and modify data in the database and who request and receive information from it. 13

14 Data Rules Analysis (T4) Data Rules Analysis, Data Type, Data Types in Databases. 14

15 Data Rules Analysis Definition : Data rules can be used to measure all of the important data quality conditions that need to be analyzed. Some common questions to establish effective data rules analysis: What data is involved? What type of data is involved? Are there any conditions involved with data? (range, values, length etc.) Are there known ‘qualities' about the data to consider? Suitability and limitations. 15

16 Data Type Definition 1: A data type is a type of data. Definition 2: A data storage format that can contain a specific type or range of values. Data types in Databases: Data types are also used by database applications. The fields within a database table or object often require a specific type of data to be input. 16

17 Basic Data Types (MS Access) Data TypesDescriptions Text Support characters up to 255 characters MemoUsed for long notes or descriptive text Number: It further include many types Byte Stores numbers from 0 to 255 (no fractions). Integer Stores numbers from –32,768 to 32,767 (no fractions). Long Integer (Default) Stores numbers from –2,147,483,648 to 2,147,483,647 (no fractions). Single For negative values. Decimal precision is 7. Size 4 bytes. Double For negative values. Decimal precision is 15. Size 8 bytes. Decimal Stores numbers from –10^28–1 through 10^28–1, DP 28, 12 Byt. Date/TimeFor date & time CurrencyFor money to maintain accuracy AutoNumberLong Integer (Incremental) Yes/No (Boolean)0/1, yes/no, true/false purposes, single bit 17

18 Exercise - 1 Open DBMS (MS Access) Create your own database named ‘EX_DB’ Create TABLE with the following fields and data types: Save your table as ‘TBL_Employee’. Input sample data in your table. FieldsData TypeDescription E_IDAuto Number Employee ID E_NameChar(30) Employee Name E_AgeNumber(Byte) Employee Age E_Salary Number(Currency) Salary E_Nationality Char(20) Nationality E_EmailChar(20) Email Address 18

19 Database Keys (T9) Primary, Foreign, Candidate, Alternate, and Composite Keys. 19

20 Database Keys What is Key? Key is a set of one or more columns whose combined values are unique among all the occurrences of the given table. A key is a relational means of specifying uniqueness. Types of keys: Primary Key Foreign Key Composite Key Candidate Key Alternate Key 20

21 Definitions: Types of Keys Primary Key: The attribute or combination of attributes that uniquely identifies a row or record. Foreign Key: an attribute or combination of attribute in a table whose value match a primary key in another table. Composite Key: A primary key that consists of two or more attributes is known as composite key Candidate Key: is a column in a table which has the ability to become a primary key. Alternate Key: Any of the candidate keys that is not part of the primary key is called an alternate key. 21

22 Exercise - 2 Analyze provided fields and choose suitable data types. Create table. Setup up Primary Key. Save your table as ‘TBL_STUDENT’. FieldsDescription ST_IDStudent ID ST_NAMEStudent Name ST_FAMILYFamily Name ST_AGEAge ST_MOBILEMobile Number ST_EMAILEmail Address ST_REGIONRegions (e.g. Dhofar) 22


Download ppt "Introduction to Database SEM I, AY 2012-13 Department of Information Technology Salalah College of Technology Chapter No.1."

Similar presentations


Ads by Google