




























































































Studirajte zahvaljujući brojnim resursima koji su dostupni na Docsity-u
Zaradite bodove pomažući drugim studentima ili ih kupite uz Premium plan
Ova stranica nije vidljiva u pregledu
Ne propustite važne delove!





























































































Centre for Information Technology and Engineering, Manonaniam Sundaranar University
Centre for Information Technology and Engineering, Manonaniam Sundaranar University
Lecture 1 1 Data Base Management Systems Introduction Summary of DBMS Functions CODD's Rules
Lecture 2 17 Structured Query Language Structured Query Language Using SQL as a Data Definition Language Using SQL as a Data Manipulation Language Using SQL as a Data Query Language Functions
Lecture 3 33 JDBC Architecture Remote Database Access
Lecture 4 40 JDBC Introduction Connecting to an ODBC Data Source JDBC Connection JDBC Implementation Resultset Processing: Retrieving Results
Lecture 5 67 Prepared Statement Callable Statement Other JDBC Classes Moving the Cursor in Scrollable Result Sets Making Updates to Updatable Result Sets Updating a Result Set Programmatically
Lecture 6 94 Introduction To Software Components Software Component Model Features of Software Component Javabean Importance of Java Component Model Bean Development Kit Starting the BeanBox Using The BDK Beanbox and The Demo Javabeans
Centre for Information Technology and Engineering, Manonaniam Sundaranar University
Lecture 14 170 Enterprise Javabeans Why Do We Need EJB? What Exactly Is EJB? EJB Features Deployment Roles and Responsibilities
Lecture 15 & 16 188 Creating a Simple Enterprise JavaBean Implementation Looking into the working
Lecture 17 209 Introduction to Distributed Applications Distributed Vs Non-Distributed Models Introduction to RMI RMI Architecture Bootstrapping and the RMI registry Working of RMI advantages of RMI
Lecture 18 222 Building a Simple Client/Server Application Create the Remote Interface Create a class that implements the Remote Interface Create the main Server program Create Stub and Skeleton Classes Copy the Remote Interface and Stub File to the Client Host Create a Client class that uses the remote services Start up the Registry, Server and Client How RMI simulates pass by reference
Lecture 19 234 Dynamic Class Loading Introduction Codebase in applets Codebase in RMI Command-line examples An Example of Dynamic Class Loading
Lecture 20 245 Troubleshooting Tips Problem while running the RMI server Problem while running the RMI client OBJECT ACTIVATION
Centre for Information Technology and Engineering, Manonaniam Sundaranar University
Lecture 21 252 Making an Object Activatable The remote Interface The Implementation class The policy file Creating the "setup" class Compile and run the code
Lecture 22 262 Discussion
Lecture 23 263 Introduction Common Gateway Interface (CGI) Java Server API Java Servlet API SERVLET OVERVIEW What Are Java Servlets? What is the Advantage of Servlets Over "Traditional" CGI? STARTING WITH SERVLETS Basic Servlet Structure The Life Cycle of a Servlet Servlet Security A Simple Servlet Generating Plain Text A Servlet that Generates HTML
Lecture 24 280 Handling Form Data Introduction REQUEST HEADERS An Overview of Request Headers Reading Request Headers from Servlets Example: Printing all Headers
Lecture 25 294 Response Headers Overview Common Response Headers and Their Meaning Example: Automatically Reloading Pages as Content Changes
Lecture 26 308 Overview Of Cookies The Servlet Cookie API Some Minor Cookie Utilities
Database Management Systems
In this Lecture will learn the following:
1.1 Snap Shot 1.2 Summary of DBMS Functions 1.3 Data Base Project Development 1.4 Types of Relationship 1.5 Codd's Rule 1.6 Short Summary 1.7 Review Questions
Data are facts concerning people, places, events or other objects or concepts. Data are often relatively useless to decision-makers until they have been processed or refined in some manner. Information is data that have been processed and refined and then given in the format that is convenient for decision making or other organizational activities. For example, report about student fee paid details is useful information for finance section. Actually data are the facts stored in the record of a database. But the processed facts are presented in a form for usage is information.
Data Base concepts
A database is a shared collection of interrelated data designed to meet the varied information needs of an organization. Consider an example, in a payroll application each person’s record has NAME, AGE, DESIGNATION, BASIC PAY... etc as columns. So payroll database has collection of all employees of all employees records, that are interrelated. From the database, various reports like payslip, persons with particular designation, service report etc can be obtained. The database acts as a media to store the data in an organized way so that it can be managed effectively. A database has two important properties: It is integrated and shared.
Benefits of the Database approach
The data base approach offers a number of important advantages compared to traditional approach. These benefits include minimal data redundancy, consistency of data, integration of data, sharing of data, enforcement of standards, ease of application development, uniform security, privacy and integrity controls, data accessibility and responsiveness, data independence, and reduced program maintenance.
Minimum data redundancy
With the data base approach, previously separate data files are integrated into a single, logical structure. So each item is ideally recorded in only one place in the database. Hence in a data base system, the data redundancy is controlled.
Consistency of data
By eliminating data redundancy, the consistency of data has greatly improved. If any change in the data, it can be incorporated in one place than the traditional file system.
Integration of data
In a database, data are organized into a single, logical structure, with logical relationships defined between associated data entities.
Sharing of data
The database is intended to be shared by all authorized users in the organization. Since all the data are integrated,
Data definition
Data can be defined as FILES to RECORD STRUCTURES FIELD NAMES, TYPES and SIZES RELATIONSHIPS between records of different types Extra information to make searching efficient, e.g. INDEXES.
Data entry and validation
Validation may include: TYPE CHECKING, RANGE CHECKING, CONSISTENCY CHECKING
In an interactive data entry system, errors should be detected immediately - some can be prevented altogether by keyboard monitoring - and recovery and re-entry permitted. If the database is error bound then it will be the main cause to make the program error prone.
Updating : Updating of data is very important otherwise it will be a waste in a long run.
Updating involves : Record INSERTION, Record MODIFICATION, Record DELETION.
Updating may take place interactively, or by submission of a file of transaction records; handling these may require a program of some kind to be written, either in a conventional programming language or in a language supplied by the DBMS for constructing command files.
Data retrieval on the basis of selection criteria
An organization uses a computer to store and process information because it hopes for speed, accuracy, efficiency, economy etc. beyond what could be achieved using clerical methods. The objectives of using a DBMS must in essence be the same although the justifications may be more indirect.
DBMS Standardization
Early computer applications were based on existing clerical methods and stored information was partitioned in much the same way as manual files. But the computer's processing speed gave a potential for RELATING data from different sources to produce valuable management information, provided that some standardization could be imposed over departmental boundaries. The idea emerged of the integrated database as a central resource. Data is captured as close as possible to its point of origin and transmitted to the database, then extracted by anyone within the organization who requires it. However many provisos have become attached to this idea in practice, it still provides possibly the strongest motivation for the introduction of a DBMS in large organizations. The idea is that any piece of information is entered and stored just once, eliminating duplications of effort and the possibility of inconsistency between different departmental records. Data redundancy has to be removed at the most possible.
Advantages
Organizational requirements change over time, and applications programs laboriously developed need to be periodically adjusted. A DBMS gives some protection against change by taking care of basic storage and retrieval functions in a standard way, leaving the applications developer to concentrate on specific organizational requirements. Changes in one of these areas need not affect elsewhere. In general a DBMS is a substantial piece of software, the result of many man-years of effort. Provide more facilities than would be economic in a one-off product.
The points discussed above are probably most relevant to the larger organization using a DBMS for its administrative functions - the environment in which the idea of databases first originated. In other words the convenience of a DBMS may be the primary consideration. The purchaser of a small business computer needs all the software to run it in package form, written so that the minimum of expertise is required to use it. The same applies to departments (e.g. Research & Development) with special needs that cannot be satisfied by a large centralized system. When comparing database management systems it is obvious that some are designed in the expectation that professional staff will be available to run them, while others are aimed at the total novice.
Actual monetary costs vary widely from, for instance, a large multi-user Oracle system to a small PC-based filing system.
The conventional SYSTEMS LIFE CYCLE of project Development consists of: Analysis, Design, Development, Implementation, Maintenance.
Analysis
A CONCEPTUAL DATA MODEL describing the information which is used inside the organization but not in computer-related terms. The conceptual data model provides a context within which more detailed design specifications can be produced, and should help in maintaining consistency from one application area to another. A CONCEPTUAL PROCESS MODEL describing the functions of the organization in terms of events (e.g. a purchase, a payment, a booking) and the processes which must be performed within the organization to handle them. This may lead to a more detailed functional specification - describing the organizational requirements which must be satisfied, but not how they are to be achieved. Design
A LOGICAL DATA MODEL is a description of the data to be stored in the database, using the conventions prescribed by the particular DBMS to be used. This is sometimes referred to as a SCHEMA and some DBMS also give facilities for defining SUB-SCHEMA or partitions of the overall schema. A SYSTEM SPECIFICATION, describing in some detail what the proposed system should do. This will now refer to COMPUTER PROCESSES, but probably in terms of INPUT and OUTPUT MESSAGES rather than internal logic. By the end it should give the outline, how the DBMS should be
Development
This is the actual coding phase. Specification of the database itself must now come down another level, to decisions about PHYSICAL DATA STORAGE in particular files on particular devices, etc. Conventional program development - coding, testing, debugging etc. may also be done. It will simply be a matter of discovering how to use the command and query language already supplied to store and retrieve data, generate reports and other outputs. Even here an element of testing and
Entity
It is any object or event about which the organization chooses to collect and store data. Any entity may be tangible object, such as an employee, a product, a computer, or a customer, or it may be a intangible item, such as bank account, a part failure of a flight.
Attribute An attribute is a property of an entity that we choose to record. Enrol No. Name Course Mark Result
Attribute 1 Attribute 2 In other words, an entity or a record is nothing but collection of attributes or fields. Key A key is a data item used to identify a record. There are two basic types of keys namely Primary and Secondary keys.
A Primary key is a data item that uniquely identifies a record. For example, in the student record, ENRL_NO is a primary key that uniquely identify a student record. Each student record has different ENRL_NO that is no two students are having the same ENRL_NO.
A Secondary Key is a data item that normally does not uniquely identify a record but identifies a group or records in a set that share the same property. For example, in the student record, COURSE is a secondary key that identifies a set of record, having same course.
Enrol No. Name Course Mark Result
Primary Key Secondary Key
A database is nothing b8ut collection of records and a record is a collection of fields or data item and fields is an attribute about the record. When collection of data items are involved, there exists a relationship. If the database contains N data items, then there exist N (N-1) possible associations among the data items.
The various types of association that exists among the data items are
One to One Association
It means that, at a given instant of time, each value of data item A is associated with exactly one value of data item A is associated with exactly one value of data item B, conversely each value of B is associated with one value of A. For example each student has a name in the student record.
Students Record Name
Each Student is assigned with one Name and in reverse each Name is assigned to one Student, so one to one association exists between Students and Names.
One to Many Association
One to many association is, at a given instant of time, each value of data item A is associated with zero, one or more than one value of data item B. However, each value of B is associated with exactly one value of A. The mapping from B to A is said to be many to one, since there may be many values of B associated with one value of A.
The relational model The relational model consists of three components:
As the benefits of the relational approach become more widely perceived, vendors of DBMSs increasingly often claim that their products are 'relational'. In 1985 Codd produced the following set of 'rules' by which systems should be judged:
Information
Data retrieved from the database should be informative. All information represented in each column should be of specific type.
Guaranteed Access
Each datum (atomic value) in a relational database is guaranteed to be logically accessible through a combination of table-name, primary key value and column-name.
Systematic Treatment of Null Values
Null values (distinct from the empty character string or a string of blank characters and distinct from zero or any other number) are supported in a fully relational DBMS. Null values are of two types for representing missing information and inapplicable information. Database Description
All information stored in the form of table. It is stored in a table, so that authorized users can apply the same relational language to its interrogation as they apply to the regular data.
Comprehensive Sub-Language
A relational system may support several languages. However there must be at least one language (SQL) and that is comprehensive in supporting all the following items:
View Updating
All theoretically updateable views are also updateable by the system. Using the structured query language one should be able to Add, delete and modify.
Insert and Update
The capability of handling a base table or a derived table as a single operand applies not only to retrieval of data but also to insertion, updating, and deletion. (This allows the system to optimise its execution sequence by determining the best access paths.)
Physical Data Independence
Application programs and terminal activities, there is no need to specify the physical location of the database. That is path should not be mentioned. (There must be a clear distinction between logical and physical design levels.)
Logical Data Independence
This rule permits logical database design to be changed dynamically, e.g. by splitting or joining base tables in ways which do not entail loss of information. During the retrieval we can change the field orders.
Integrity Independence
Integrity constraints must be definable in the relational data and storable in the catalogue, not in the applications program. Certain integrity constraints hold for every relational database, further application-specific rules may be added. The general rules relate to: