Alaris Capture Pro Software

Alaris Capture Pro Software

■ 1 CONTENTS Chapters Page No. / N 1. Database Concepts 1-26 2. Database Development 27-146 3. Data Administration 147-178 4. Database Applications 179-210 DATABASE MANAGEMENT SYSTEM SECTION A Database Concepts: What is Database? Need of Database, Function of the Database; Types Database ; Relational Database Management System, Relational Model - Key Concept; Domain Constraint, Integrity Constraints; Foreign Key. SECTION B Database Development Process, Database Modeling & Database Design. E-R Model, Attributes, Relationship, Logical Database Design, Normaliza.tion, First Form, Second Normal Form, Third Normal Form, Translating E-R.Diagram to Relations, Physical Database Design. ' SECTION C Relational Algebra & SQL Relational Database Commands. Data-types, Create Table, Drop Table, Alter Table, Insert Into, Delete From, Update, General Query Syntax (Select), Create View, Drop View, Set Operators - Union, Intersect, Minus, Functions, Group Fimctions, Join, Sub Queries. SECTION D ■■ Data Administration, Client / Server and Distributed Databases. Data-Administration Functions, Data Administration Tools - Repositories, CASE Tools, Concurrency Control, Database Security, Database Recovery. Database Applications: Financial Systems, Marketing System, Foreign Trade, Inventory Information Systems. V / •\ I -1 < f s -\ -.v 1 1 ■; T I CHAPTER 1 DATABASE CONCEPTS Learning Objectives After going through this chapter, you should appreciate the following: • Primary Key • What is Database? • Need of Database. • Function of the Database • Types of Databases. • Relational Database Management System • Relational Model - Key Concept • Integrity Constraints • Foreign Key Database Systems PRIMARY KEY A basic unit called in a database is called a Table that organizes the data. Rows are related. The columns in the table classify the nature of the data items that are related NOTES by virtue of row membership. The Name column identifies that whatever appears at this position in any row is a person’s name. The Address column identifies that whatever appears in this position in an address. Membership in a row that has columns makes the data items in the row belong to a set. In fact, a database table is a conceptual representation of the set theory we all struggled with in grade school mathematics. Columns also play a special classificatory role in a database; they identify the type of the data stored in them. Data type is the means by which data storage is interpreted. You must remember the following: □ Data is stored in tables. □ Tables have rows that group related data items together and columns that classify the data as to its type and its role in the world. Tables A table is the place in the database where all the data is stored. Every piece of information that gets loaded into an Oracle database must be placed inside an Oracle table. In fact, all the information needed by an Oracle database to manage itself'is stored in a series of tables that are commonly known as the data dictionary. Think of the data dictionary as table about tables. The data dictionary tables tell the database what kind of data is stored in the database, where it is located and how the database can work with it. A table is made up of columns. Each column must be given a unique name within that table and assigned a data type (such as varchar2, date or number) with an associated ' width (which could be predetermined by the data type, as in date). Each table column can also be designated as null or not null. Not null means the column data is mandatory for that colurnn, In other words, for rows of data to be entered into that table, all columns assigned not null destination must contain valid data values. To enforce defined business rules (integrity constraints) on a table’s data, OracIe9i allows you to associate integrity constraints and triggers for a table. Attribute Within a database for example, you have names. These names would be there in your office records but you can assign various attributes to it too. These attributes are the additional information you need to- keep for example, your job title. Tuple/Rows Nobody calls them by the old names,, i.e.. Tuples, everybody now calls them rows. As mentioned above a database actually consists of columns and rows. A row is~a record of the data in the database. For example, in a school database, a record may contain the information related to a student, like his enrolment number, name, address, class, section, phone number, etc. A row comprises of fields that contain data. This record in turn belongs’to a table. 2 Self JnsMiOional Material Field Database Concepts It is the oAer side of the record, i.e., column. It specifies aparticular data in a database. It also corresponds to the name given to it. Every database must consist of a column. Data ' '' t It is the raw information which is fed into the database. It could be in the form of .NOTES information collected from various sources. Like in the school database, the information about the student is collected from the form which he has filled up. Concept of String A string is a simple concept: a-bunch of things in a line,.like houses, popcorn or pearls, numbers, or characters in a sentence. Strings are frequently encountered in managing information. Names are strings of characters, as in Sachin Tendulkar. Phone numbers are strings of numbers, dashes, and sometimes parentheses, as in a telephone number, (011)-2551 6754. Even number, such as 5516754 can be considered as either a number or a string of characters. Strings can include any mixture of letters, numbers, spaces, and other symbols (such as punctuation marks and special characters) are called character strings, or just character for short. There are two string data types in Oracle. CHAR strings are always a fixed length. If you set a value to a string with a length less than that of a CHAR column, Oracle automatically pads the string with blanks. Wheri yoii compare CHAR strings, Oracle compares the strings by padding them out to equal lengths with blanks. This means that if you compare “character” with “character” in CHAR columns, Oracle considers-the strings to be the same. VARCHAR2 data type is a varying leiigth string. The VARCHAR datatype is synonymous with VARCHAR2, but this may change later, so you should avoid using VARCHAR. Use CHAR for fixed-length character string fields and VARCHAR2 for all other character string fields. Number Values In Oracle NUMBER stores any type of number. For example, NUMBER ( MAX_LENGHT} You may specify a NUMBER’S data precision with the following syntax: NUMBER (precision, scale) Subtypes: DEC, DECIMAL, DOUBLE PRECISION, INTEGER, INT, NUMERIC, REAL, SMALLINT, FLOAT PLS_INTEGER defines column that may contain integers with a sign, such as negative numbers. Date values T^s is there to keep track of date variable. Data type and Data integrity There are various type of data inserted into tables. There are two aspects to it. Once is to make sure that the data which is being, entered is of the right type and then .we Self instructional Material 3 Database System have to make sure that the data which is being entered is accurate. First we would see how the integrity of the data matters. • Domain Integrity As discussed the primary key of the table must have the unique values, which identify NOTES the each row. So, if any row is having the value NULL for the primary key. The rule of primary key violate that is the primary key must be unique. This is the reason to follow the entity integrity rule according to which primary key will not accept the- null value. This rule state that if attribute A of relation R is a prime attribute of R, then A cannot accept NULL values. Referential integrity It is the assurance of consistent and accurate data within a database. Referential integrity simply means that the values of one column in a table depend upon the values of a column in another table. For instance, in order for a customer to have a record in the ORDERS table, there must first be a record for that customer in the CUSTOMERS table. In order for data to be in the EMPLOYEE_PAY table, there must first be a corresponding personnel record in the EMPLOYEES table. Types of Keys Keys are the ways of connecting tables. These help you in creating relation between • them. There are 4 type of keys. Candidate key We ail know that in a table, every row must be different. There should be at least one attribute that can uniquely identify the row. These attributes are called Candidate keys. Alternate key/Surrogate It is used in case there is no possibility of naming a primary key. Then in that case you assign a another key as the primary key. Primary key A primary key for a uniquely identifies each row in a table and cannot be null. Oracle tables must have only one primary key defined. ■ Foreign keys In a table, a foreign key, normally a single field, directly references a primary key in another table to enforce referential integrity. WHAT IS DATABASE Database means base of the data. It is based on the information given by you. It can be catalogued, stored .and used. For all this information, database is used. Any collection of related information grouped together as a single item is' a database. A metal filling cabinet containing customer records, a card file of names and phone numbers, and notebook containing a listing of a store inventory, all are databases. Any collection of related information grouped together as a single item is a database. ' 4 Self Instructional Material However, a file cabinet or a notebook does not itself make a database.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    213 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us