13
Introduction to Relational Database Management System Prepared by: Romer Ian O. Pasoc

Introduction to Relational Database Management System

Embed Size (px)

DESCRIPTION

Database Management

Citation preview

Introduction to Relational Database Management System

Introduction to Relational Database Management SystemPrepared by: Romer Ian O. PasocA relational DBMS is a special software that is used to manage the organization, storage, access, security and integrity of data.This specialized software allows the application developer or user to focus on the user interface, data validation and screen navigationThe application system can then simply makes a call to the RDBMS when inserting, modifying, deleting or displaying data.What is an RDBMS?RBMS is the most common type of database management system.Other types includes hierarchical and network databases.A relational DBMS stores information in a set of tables, each of which has a unique identifier or primary key.The tables are then related to one another using foreign keys.A foreign key is simply the primary key of another table.Almost all major industries or companies, and even medium size establishments utilizes DBMS and there is a big chance that most of these are RDBMSs.Real Life ApplicationsThe relational model is a collection of relations required to build a database. Tables in an RDBMS are technically called Relations.

In the relational model, each row in the relation consists of set of related data values.

Each row shares some reality which corresponds to the real world entity or relationship

Rows in a relation is technically called TuplesThe Relational ModelEvery relation is given a unique name. A relation comprises of columns. These columns represents the set of related values (domain) that pertains to its attribute. Example, A relation: person, can have an attributes: name, age, address . These attributes should only contain information that belongs to its intended data to be stored (domain).

Proper naming of relations and its columns is essential for identification of data to be extracted.

Technically, a column in our relation is called an AttributeStudent_ID (STRING)S_Name(STRING)Age(INT)B_day(DATE)1023-PRPJuan1909/09/19891231-IGPPedro2011/22/19882312-ICTMaria1702/21/19912131-HGQCrispin1605/09/19921923-YYTBasilio2112/25/1987BASIC PARTS OF A RELATIONStudent Name of the relationStudent_ID, S_Name, Age, and B_day AttributesString, Int, and Date DomainAll 5 rows TuplesSTUDENTRELATION NAMETable nameATTRIBUTESColumnsDOMAINData TypesTUPLESRows/RecordsBASIC PARTS OF A RELATIONWe can actually write the structure of a relation in this format:

relation_name (attribute1:domain, attribute2:domain,attributeN:domain)

Why the underline on the first attribute?Represents keysNotationCOMMON DATA TYPES (MS ACCESS)Text/StringUse for text or combinations of text, numbers, and some symbols. 255 characters maximumMemoMemo is used for larger amounts of text. Stores up to 65,536 characters.Integer/IntAllows whole numbers between -32,768 and 32,767LongAllows whole numbers between -2,147,483,648 and 2,147,483,647COMMON DATA TYPES (MS ACCESS)SingleSingle precision floating-point. Will handle most decimalsDoubleDouble precision floating-point. Will handle most decimalsCurrencyUse for currency. Holds up to 15 digits of whole dollars, plus 4 decimal places.Tip:You can choose which country's currency to useCOMMON DATA TYPES (MS ACCESS)AutoNumberAutoNumber fields automatically give each record its own number, usually starting at 1Date/TimeUse for dates and timesYes/NoA logical field can be displayed as Yes/No, True/False, or On/Off.

What is a Schema?What is an Instance and how does it differ to Schema?What are the different types of keys in an RDBMS?What are the 4 different types of relationships?

Assignment