Welcome





Friday, August 19, 2011

Basic Data model proposals


This paper provides a summary of 35 years of data model proposals, grouped into 9 different eras. It discusses the proposals of each era, and show that there are only a few basic data modeling ideas, and most have been around a long time. Later proposal inevitably bear a strong resemblance to certain earlier proposals. Hence, it is a worthwhile exercise to study previous proposals. Here in this paper we study data models in 9 historical epochs;

Click here to download the paper.



Sunday, August 14, 2011

Oracle Database Download

To practice SQL queries at home, you could download Oracle 10g Express Edition from here and then follow this tutorial. (Note that the sample database supplied with Oracle 10g is the same database we use in college)

Sunday, August 7, 2011

Case Study - Scenario 1 (ER Model)

You have been engaged by a pizza shop to create a database to enable the business to efficiently keep records. The pizza shop sells pizzas to customers who walks in (takeaway) and also takes phone orders which may be delivered to the customer's address or held at the shop until the customer comes in to pick them up. When a customer orders by phone the shop assistant taking the order asks the customer for their phone number and enters it into the computer system. The assistant also enters his ID number so a record is also kept of who took the order. The time when the phone was answered is recorded as well as the time when the phone call was terminated. (From this we can calculate how many orders each assistant took and the average time for each order). If the customer has previously ordered by phone the name(last name only) and address appears on the screen. The customer is then asked for his name and address and then takes the order. If the customer has not ordered before or if the name and address given does not correspond with that in the computer or if that phone number and address is marked as being the subject of a hoax previously, after the order has been taken the assistant dials the number given and confirms the order with the customer. It is required that each order given by a customer be recorded. The price of each item is recorded with the order. Pizzas are made from ingredients. From the database you must be able to determine the name and amount of each ingredient for a particular type of pizza. For each ingredient is kept the amount on hand (in the shop) and the date of the last stocktake. (Stocktakes are done weekly). It should be possible to calculate from the database the total amount of each ingredient used in the making of the pizzas from one stocktake to the next. Any variation from the expected amount is also recorded for that stocktake as a percentage e.g.-1%. For each ingredient we also keep the name and address of the supplier. Each ingredient can be supplied by many suppliers and each supplier can supply many ingredients. Not all pizzas are the same price, so a record exists in database for the current price of each type of pizza. The employees at the shop may be divided into two types: those who work in the shop and those who carry out the deliveries (the drivers). For each employee is kept their name and address, home phone number and tax file number. For the drivers is also kept their driver's license number Hours of work are not regular so for each time an employee works a record must be kept of their hours. Employees inside the shop are paid at an hourly rate. Drivers are paid according to the number of deliveries the do. A record is kept for which orders a driver delivers and of how many deliveries a driver does on each shift.

Monday, July 25, 2011

List of DBMS Assignments

 1.  Demonstration of data independence with ADT
 2.  Simple Application using conventional files
 3.  Demonstration of Hierarchical model
 4.  Demonstration of Network model
 5.  Simple tool to convert E-R diagram to tables
 6. Persistent Java API
 7. Pro C
 8. SQL J
 9. Implementation of editor with shadow copying
10. Demonstration of race programs in concurrent programs

Database Management Systems

This blog will now serve as the official blog for DBMS 3-1 2011-2012.

Tuesday, July 19, 2011

static library

CREATION OF STATIC LIBRARY
--------------------------------------------

The creation of static library is illustrated below with the help of different stages.

step1:
--------

vi file1.c /* The file to be called */

#include

void call()
{

printf("hai");
}

--> gcc -c file1.c

In this step,the object file of the code is obtained.



step 2:
--------

/*Header file which has prototype of file1.c*/

vi h1.h

void call();

--> ar rs libstat.a file1.o

The above command enables the object file generated in the previous stage
to be placed in the archiver.




step3:
-------
/*create "include" and "lib" folder(\home\student) */

note: create these folders in \home\student folder.

(a):copy h1.h file to include folder

(b):copy libstat.a to lib folder


step 4:
--------

vi program.c

#include
void main()
{

call();
return 0;

}

This is the application program making use of the static library.


step 5:
--------

gcc --static -I /home/student/include -L /home/student/lib -o program program.c -lstat



note -I stands for include and -L for lib and l for linking

Compiling the application code must be done using the above command


step 6:
-------

./program

Executing the application code





Saturday, July 16, 2011


Screen shots of  Personal Calendar
                                                  -> It looks like this when its opened                      
                                            -> It looks like this when "save" button is clicked
     
                                           -> It looks like this when "view" button is clicked    

           It is done using AWT,Collections,Files,IOstreams and different LayoutManagers. It can store a maximum of three events for a particular date and month. It works only for this year.You can download the .class file here, run it in your own system and test it. Any queries are accepted and answered.