LOVELY PROFESSIONAL
UNIVERSITY
Term Paper
Topic-MOBILE SERVICE PROVIDE DATABASE
Submitted To: Submitted By:
MR. ROHIT BANIWAL Rahul kumar
RE 6911 B31
B.Tech ECE
Acknowledgement
I devote all my achievements to the almighty ‘GOD’ for granting me strength art skill and spirit to accomplish this project work .I am extremely thankful to MR. ROHITBANIWAL for guiding me about this project from time to time whenever I needed the help. He cleared my doubts to satisfaction explaining each and every point in simplest possible way .I am also thankful to my ‘Parents’ for their encouragement and kind cooperation throughout courses of this project .I am also thankful to my very good friends for helping me to get best ideas, for gathering data for accumulation of information and other valuable things .They also assisted me to how I analyze evaluate and present it in the best possible way under the available means.
CONTENTS
- INTRODUCTION
SYSTEM REQUIREMENT
- HARDWARE
- SOFTWARE
2.WHAT IS THEMOBI LE DATABASE.
3.NEED FOR MOBILE DATABASES.
4 MOBILE DATABASE SYSTEM ARCHITECTURE.
5.SOURCE CODE
6.SOME OF THE MOBILE RELATIONAL DATABASE SYSTEMS:
7.MODEL OF MOBILE COMPUTING.
8.ROUTING AND QUERY PROCESSING
9.APPLICATION
10.REFERENCES
INTRODUCTION
Traditionally large-scale commercial databases were developed as centralized database systems. this trend changed as more and more distributed applications stated to emerge. The distributed database applications involved usually a strong central database and powerful network administration. However the newer technology trends have changed this paradigm because of the following technological trend The notebook and laptop Computers are being used increasingly among the Business Community The development and availability of a relatively low-cost wireless digital communication infrastructure.
This infrastructure is based on wireless local-area networks cellular digital packet networks and other technologies The rapid advancements of wireless communication technology and computer miniaturizing technology have enabled users to utilize computing resources anywhere in the computer network.
you can even connect to your Intranet from an aeroplane. Mobile database are the database that allows the development and deployment of database applications for handheld devices thus enabling relational database based applications in the hands of mobile workers.
The database technology allows employees using handheld to link to their corporate networks
download data work offline and then connect to the network again to synchronise with the corporate database.
with a mobile database embedded in a handheld device a package delivery worker can collect signatures after each delivery and send the information to a
PROPOSED SYSTEM:-
1.DESCRIPTION:-
My software deals with the retrieval of records of mobile services. It asks for the basic details of each customers. I have used various decision statements like switch if and else statements arrays etc. C++ language really proves to be very helpful building of software as it is very user friendly and is structured language. It allows the program to work in small modules called functions. Thus my software will help in reducing the chaos in storing and retrieving mobile related services.
(A)Operating system-window
Vista/XP/98/2000/Millenium
(B)Version of c-turbo c++(version 4.5)
(C)Processor –minimum requirement Pentium 3
(D)Memory ram-64 MB
(E)System type-16 bit operating system
REQUIREMENTS ANALYSIS
My system model is COMPAQ Vista PC. The processor is Intel core 2 duo. With Intel core 2 duo desktop processor, the PC experiences a revolutionary performances, unbelievable system response, and energy-efficiency second to none. It gives
Up to 6 MB L2 cache
Up to 1333 MHz front side bus
The ram memory of my computer is 2 GB
All of the data is held on the hard disk drive. Even windows are stored there. When the computer is running whenever it needs to open a program file or run a process that it has not in while, it accesses the hard drive and runs the process that it looking for through the processor. While it is processing. it may need to store and access numbers. These numbers are stored in the RAM. It completes process by doing this routine over and over until the computer is turned off. Ram does not hold any amount of data that we can access only the machine can.
2 gigabytes stores approx. (8.6 X 109)
My PC works as a 32-bit operating system.
Most desktop computers manipulate bits in group of 16 or 32. If you have two computers whose clock speed is identical, and one processes 32 bits at a time while the other processes 16, the 32 bit computer will be about twice as fast.
5. SOURCE CODE:-
#include<iostream.h>
#include<ctype.h>
#include<dos.h>
#include<fstream.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<iomanip.h>
class group
{
struct customer
{
int cusid;
char name[20];
char address[40];
char mobile[20];
char plan[50];
}cs;
struct mobileplan
{
char plan[50];
int rent;
float mtosm;
float mtoom;
float mtol;
float isd;
float sms;
int freesms;
int freemins;
}mp;
struct payment
{
int cusid;
float amount;
char date[20];
}pm;
fstream plan, pay, cust;
public:
group();
void bookplan();
void addplan();
void delplan();
void modiplan();
void showplans();
void billpayment();
void modicustomer();
void delcustomer();
void listbookings();
void paymentdetails();
void exit();
int getid();
};
void main()
{
int i,j;
char choice;
group g;
do
{
clrscr();
textcolor(MAGENTA);
for(i=10;i<71;i++)
{
gotoxy(i,15);
delay(30);
cout<"-";
}
for(i=70;i>=10;i--)
{
gotoxy(i,22);
delay(30);
cout<"-";
}
for(j=16;j<=21;j++)
{
gotoxy(10,j);
delay(30);
cout<"*";
}
for(j=21;j>=16;j--)
{
gotoxy(70,j);
delay(30);
cout<"*";
}
gotoxy(16,17);
textcolor(MAGENTA);
cprintf("Welcome to Ashwani's Mobile Service Providing System");
gotoxy(30,20);
cprintf("B.Tech I.T.");
gotoxy(6,76);
textcolor(WHITE);
cprintf("\n\n\n\nPress any key to continue..");
getch();
clrscr();
gotoxy(20,4);
cout<"Mobile Plans";
gotoxy(30,5);
cout<"A.Show Plans";
gotoxy(30,6);
cout<"B.Add Plan";
gotoxy(30,7);
cout<"C.Delete Plan";
gotoxy(30,8);
cout<"D.Modify Plan";
gotoxy(20,11);
cout<"Customer Section";
gotoxy(30,12);
cout<"E.List Customers";
gotoxy(30,13);
cout<"F.New Customer";
gotoxy(30,14);
cout<"G.Delete Customer";
gotoxy(30,15);
cout<"H.Modify Customer";
gotoxy(20,17);
cout<"Payments";
gotoxy(30,18);
cout<"I.Bill Payment";
gotoxy(30,19);
cout<"J.Payment Details";
gotoxy(20,21);
cout<"X.Exit";
gotoxy(30,22);
cout<"Your Choice?";
cin>choice;
choice=toupper(choice);
clrscr();
switch(choice)
{
case 'A':
g.showplans();
break;
case 'E':
g.listbookings();
break;
case 'F':
g.bookplan();
break;
case 'B':
g.addplan();
break;
case 'C':
g.delplan();
break;
case 'D':
g.modiplan();
break;
case 'G':
g.delcustomer();
break;
case 'H':
g.modicustomer();
break;
case 'I':
g.billpayment();
break;
case 'J':
g.paymentdetails();
break;
case 'X':
g.exit();
choice=0;
break;
}
}while(choice!=0);
}
void group::group()
{
plan.open("PLAN.DAT",ios::binary|ios::in|ios::out);
pay.open("PAYMENT.DAT",ios::binary|ios::in|ios::out);
cust.open("CUST.DAT",ios::binary|ios::in|ios::out);
}
void group::addplan()
{
clrscr();
char ch, type;
plan.seekp(0L, ios::end);
do
{
cout<endl<"Enter the information"<endl;
cout<"Plan Code : ";
gets(mp.plan);
cout<"Monthly Rent : ";
cin>mp.rent;
cout<endl<"Enter Mobile Teriff Rates"<endl;
cout<"Mobile to same Mobile : ";
cin>mp.mtosm;
cout<"Mobile to other Mobile : ";
cin>mp.mtoom;
cout<"Mobile to Landline : ";
cin>mp.mtol;
cout<"ISD : ";
cin>mp.isd;
cout<"SMS : ";
cin>mp.sms;
cout<endl<"Enter Mobile Offers"<endl;
cout<"Free SMS : ";
cin>mp.freesms;
cout<"Free Minutes : ";
cin>mp.freemins;
plan.write((char*)&mp, sizeof(mp));
cout<endl<"Add another record?(Y/N)";
cin>ch;
}while(ch=='y'||ch=='Y');
}
void group::bookplan()
{
clrscr();
char ch;
int flag;
cust.seekp(0L, ios::end);
do
{
flag=0;
cout<endl<"Enter Customer Information"<endl;
cout<"Mobile Plan : ";
gets(cs.plan);
//code to verify if plan exists or not.
plan.seekg(0L, ios::beg);
while(plan.read((char*)&mp, sizeof(mp)))
{
if(strcmp(cs.plan,mp.plan)==0)
{
flag=1;
break;
}
}
plan.clear();
if(flag==1)
{
cs.cusid=getid();
cout<"Name : ";
gets(cs.name);
cout<"Address : ";
gets(cs.address);
cout<"Mobile Number : ";
gets(cs.mobile);
cust.write((char*)&cs, sizeof(cs));
}
else
{
cout<endl<"Plan does not exist"<cs.plan;
}
cout<endl<"Add another record?(Y/N)";
cin>ch;
}while(ch=='y'||ch=='Y');
}
void group::showplans()
{
plan.seekg(0L, ios::beg);
cout<endl<setw(10)<"Plan"<setw(7)<"Rent"<setw(7)<"M2SM"<setw(7)<"M2OM"<setw(7)<"M2L"<setw(7)<"ISD"<setw(7)<"SMS"<setw(10)<"Free-SMS"<setw(10)<"Free-Mins";
while(plan.read((char*)&mp, sizeof(mp)))
{
cout<endl<setw(10)<mp.plan<setw(7)<mp.rent<setw(7)<mp.mtosm<setw(7)<mp.mtoom<setw(7)<mp.mtol<setw(7)<mp.isd<setw(7)<mp.sms<setw(10)<mp.freesms<setw(10)<mp.freemins<"\n";
}
plan.clear();
gotoxy(1,28);
textcolor(YELLOW);
cprintf("Press any key..");
getch();
}
void group::paymentdetails()
{
pay.seekg(0L, ios::beg);
cout<endl<setw(6)<"ID"<setw(10)<"Amount"<setw(10)<"Date";
while(pay.read((char*)&pm, sizeof(pm)))
{
cout<endl<setw(6)<pm.cusid<setw(10)<pm.amount<setw(10)<pm.date;
}
pay.clear();
gotoxy(1,28);
textcolor(YELLOW);
cprintf("Press any key..");
getch();
}
void group::listbookings()
{
cust.seekg(0L, ios::beg);
cout<endl<setw(4)<"ID"<setw(15)<"Name"<setw(15)<"Address"<setw(15)<"Plan"<setw(12)<"Mobile";
while(cust.read((char*)&cs, sizeof(cs)))
{
cout<endl<setw(4)<cs.cusid<setw(15)<cs.name<setw(15)<cs.address<setw(15)<cs.plan<setw(12)<cs.mobile;
}
cust.clear();
gotoxy(1,28);
textcolor(YELLOW);
cprintf("Press any key..");
getch();
}
void group::modiplan()
{
clrscr();
char code[50];
int count=0;
long int pos;
cout<"Enter plan code:";
gets(code);
plan.seekg(0L, ios::beg);
while(plan.read((char*)&mp, sizeof(mp)))
{
if(strcmp(mp.plan,code)==0)
{
cout<endl<"Plan Code : "<mp.plan;
cout<endl<"Rent : "<mp.rent;
cout<endl<"Teriff";
cout<endl<"Mobile to same Mobile : "<mp.mtosm;
cout<endl<"Mobile to other Mobile : "<mp.mtoom;
cout<endl<"Mobile to Landline : "<mp.mtol;
cout<endl<"ISD : "<mp.isd;
cout<endl<"SMS : "<mp.sms;
cout<endl<"Offers";
cout<endl<"Free SMS : "<mp.freesms;
cout<endl<"Free Minustes : "<mp.freemins;
cout<endl<"Enter new record"<endl;
cout<"Plan Code : ";
gets(mp.plan);
cout<"Rent : ";
cin>mp.rent;
cout<"Mobile to same Mobile : ";
cin>mp.mtosm;
cout<"Mobile to other Mobile : ";
cin>mp.mtoom;
cout<"Mobile to Landline : ";
cin>mp.mtoom;
cout<"ISD : ";
cin>mp.isd;
cout<"SMS : ";
cin>mp.sms;
cout<"Free SMS : ";
cin>mp.freesms;
cout<"Free Minutes : ";
cin>mp.freemins;
pos=count*sizeof(mp);
plan.seekp(pos, ios::beg);
plan.write((char*)&mp, sizeof(mp));
return;
}
count++;
}
cout<endl<"No Mobile Plan in file with code="<code;
cout<endl<"Press any key..";
getch();
plan.clear();
}
void group::modicustomer()
{
clrscr();
int cusid;
int count=0;
long int pos;
cout<"Enter Customer Code : ";
cin>cusid;
cust.seekg(0L, ios::beg);
while(cust.read((char*)&cs, sizeof(cs)))
{
if(cs.cusid==cusid)
{
cout<endl<"ID : "<cs.cusid;
cout<endl<"Name : "<cs.name;
cout<endl<"Address : "<cs.address;
cout<endl<"Mobile Plan : "<cs.plan;
cout<endl<"Mobile Number : "<cs.mobile;
cout<endl<"Enter new record"<endl;
cout<"Name : ";
gets(cs.name);
cout<"Address : ";
gets(cs.address);
cout<"Plan : ";
gets(cs.plan);
cout<"Mobile Number : ";
gets(cs.mobile);
pos=count*sizeof(cs);
cust.seekp(pos, ios::beg);
cust.write((char*)&cs, sizeof(cs));
return;
}
count++;
}
cout<endl<"No customer in file with code="<cusid;
gotoxy(1,28);
textcolor(YELLOW);
cprintf("Press any key..");
getch();
cust.clear();
}
void group::delplan()
{
clrscr();
char code[50];
long int pos;
cout<"Enter plan code : ";
gets(code);
plan.seekg(0L, ios::beg);
while(plan.read((char*)&mp, sizeof(mp)))
{
if(strcmp(mp.plan, code)==0)
{
ofstream outfile;
outfile.open("TEMP", ios::out);
plan.seekg(0, ios::beg);
while(plan.read((char*) &mp, sizeof(mp)))
{
if(strcmp(mp.plan,code)!=0)
outfile.write((char*) &mp, sizeof(mp));
}
outfile.close();
plan.close();
remove("PLAN.DAT");
rename("TEMP", "PLAN.DAT");
plan.open("PLAN.DAT", ios::binary|ios::in|ios::out|ios::nocreate);
return;
}
}
cout<endl<"No Mobile plan in file with code="<code;
gotoxy(1,28);
textcolor(YELLOW);
cprintf("Press any key..");
getch();
plan.clear();
}
void group::delcustomer()
{
clrscr();
int cusid;
long int pos;
cout<"Enter Customer Code";
cin>cusid;
cust.seekg(0L, ios::beg);
while(cust.read((char*)&cs, sizeof(cs)))
{
ofstream outfile;
outfile.open("TEMP", ios::out);
cust.seekg(0, ios::beg);
while(cust.read((char*)&cs, sizeof(cs)))
{
if(cs.cusid != cusid)
outfile.write((char*) &cs, sizeof(cs));
}
outfile.close();
cust.close();
remove("CUST.DAT");
rename("TEMP", "CUST.DAT");
cust.open("CUST.DAT", ios::binary|ios::in|ios::out|ios::nocreate);
return;
}
cout<endl<"No customer in file with code="<cusid;
gotoxy(1,28);
textcolor(YELLOW);
cprintf("Press any key..");
getch();
cust.clear();
}
void group::exit()
{
char na[]={'A','S','H','W','A','N','I',' ','K','A','U','S','H',’A’,’L’};
cust.close();
plan.close();
pay.close();
clrscr();
gotoxy(26,7);
textcolor(GREEN);
cprintf("THANK YOU.....!!!");
gotoxy(28,12);
delay(300);
textcolor(BLUE);
cprintf("Programmed by:");
textcolor(YELLOW);
for(int x=28,y=0;x<41,y<15;x++,y++)
{
gotoxy(x,15);
delay(300);
cout<na[y];
}
delay(300);
gotoxy(26,16);
cprintf("B.Tech I.T.");
getch();
}
//Bill Payment
void group::billpayment()
{
clrscr();
int cusid;
int count=0;
long int pos;
cout<"Enter customer code:";
cin>pm.cusid;
pay.seekp(0L, ios::end);
cust.seekg(0L, ios::beg);
int flag = 0;
while(cust.read((char*)&cs, sizeof(cs)))
{
if(cs.cusid == pm.cusid)
{
flag = 1;
cout<"Amount : ";
cin>pm.amount;
cout<"Date : ";
cin>pm.date;
pos = count*sizeof(cs);
cust.seekp(pos, ios::beg);
cust.write((char*)&cs, sizeof(cs));
}
count++;
}
if(flag == 1)
{
pay.write((char*)&pm, sizeof(pm));
}
else
cout<endl<"No customer in file with code="<pm.cusid;
gotoxy(1,28);
textcolor(YELLOW);
cprintf("Press any key..");
getch();
cust.clear();
}
//Get New Customer ID
int group::getid()
{
int cusid;
int count=0;
long int pos;
cust.seekg(0L, ios::beg);
while(cust.read((char*)&cs, sizeof(cs)))
{
cusid = cs.cusid;
pos = count*sizeof(cs);
cust.seekp(pos, ios::beg);
count++;
}
cusid++;
cust.clear();
return cusid;
}
9.APPLICATION
Mobile Distilleryis a specialist in mobile technologies.
We provide innovative software and services allowing corporations application developers and publishers who want to efficiently address the complex environment of mobile platforms andmarkets.
Capitalizing on overand worldwide in-depth handset knowledge Mobile Distillery solutions are designed to reduce production costs and development time.Our technology allows system integrators and businesses to deliver powerful and
easy-to-design mobile client applications to the widest range of compatible devices worldwide.
By considerably simplifying the entire application production cycle -
concept and development through porting, testing certification to deployment and backfilling
Mobile Distillery allows developers to embrace the wide range of mobile content and services while ensuring they will always make the most of each device.
WHAT IS THEMOBILEDATABASE:-
A mobile database is a database than can be connected to by a mobile computing device over a mobile network. The client and server have wireless connections.
A cache is maintained to hold frequent data and transactions so that they are not lost due to connection failure.
A database is a structured way to organize information. This could be a list of contacts, price information or distance travelled.
The use of laptops mobiles and pad is increasing and likely to increase in the future with more and more applications residing in the mobile systems.
While those same analyst s cantell us exactly which applications will be the most popular
it is clear that a large percentage will require the use of a database of some sort.
Many applications such as databases would require the ability to download information from an information repository and operate on this information even when out of range or disconnected.
When a mobile unit leaves a mobile cell serviced by a base station transfer.the responsibility for mobile transaction and data support to the new base stationy Transparent processes Some of the Mobile Relational Database Systems
Future scope of project
My Project is mobile service provider Service. It will surely help in reducing the chaos of management of the records. It will reduce manual labor and will be more machine oriented, thus will help in reducing large piles of records related to mobile services. It will be very helpful for the customer to get and manage the information related to the mobile as well as
regular updates of available schemes.
10.REFERENCES:-