Skip to content

NithinBiliya/WildLife-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WildLife-Management

WildLife Management - Project in Visual Basics and MSSQL

Wildlife includes a wide variety of animals and birds. It is very difficult to keep track of all these animals and birds in details. This application helps in structured storage and easy retrieval of the details of each of these animal species. Many wildlife enthusiasts can use this application as their wildlife dictionary and they can add their own information and sightings of these animals.

		READ ME ( Wildlife Management )

HARDWARE REQUIREMENT

Processor : Pentium IV 800MHz or higher. RAM : 1 GB and above Hard Disk Drive : 20 GB or higher Keyboard : 101/102 Natural Keyboard Monitor : Resolution of 800 X 600

SOFTWARE SPECIFICATIONS

Operating System : Windows XP or higher Tools Required : SQL Server Management Studio 2008 or higher Microsoft Visual Studio 2010 or higher

INSTALLATION PROCEDURE

  1. Install SQL Server Management Studio 2008 or higher
  2. Install Microsoft Visual Studio 2010 or higher
  3. Copy the WildLife Mangement folder into the harddisk
  4. Copy the WildLife Photos folder into the C:\ drive
  5. Open SQLQueries1.sql file with SQL Server Management Studio
  6. Block all the entries in it and press F5. This will create the required databases and tables.
  7. Open the WildLife Management.sln file usin isual Studio. Press F5 to run the software. This will successfully connect to the database and run the software.

The list of queries to be executed is given in this file also :

create database wildlife_management; use wildlife_management;

create table photo ( pid integer not null identity(1,1), link varchar(100) not null, primary key(pid) );

create table animal ( aid integer not null identity(1,1), cname varchar(20) not null, sname varchar(20) not null, tcount integer, status varchar(20), info varchar(500), pid integer, primary key(aid), foreign key(pid) references photo(pid) on update cascade );

create table member ( mid integer not null identity(1,1), mname varchar(30) not null, dob datetime, age integer, interest varchar(20), city varchar(20), contact varchar(20), aid integer, pid integer, primary key(mid), foreign key(aid) references animal(aid) on update cascade on delete set null, foreign key(pid) references photo(pid) on update no action );

create table habitat ( hid integer not null identity(1,1), hname varchar(20) not null, info varchar(100), primary key(hid) );

create table lives_in ( aid integer, hid integer, primary key(aid,hid), foreign key(aid) references animal(aid) on delete cascade on update cascade, foreign key(hid) references habitat(hid) on delete cascade on update cascade );

create table sighting ( sid integer not null identity(1,1), sname varchar(30) not null, place varchar(50) not null, info varchar(100), date_time datetime, aid integer, hid integer, mid integer, pid integer, primary key(sid), foreign key(aid) references animal(aid) on delete no action on update cascade, foreign key(hid) references habitat(hid) on delete no action on update cascade, foreign key(mid) references member(mid) on delete no action on update no action, foreign key(pid) references photo(pid) on delete no action on update no action );

create table log_in ( uname varchar(20) not null, pword varchar(20) not null, mtype char(1) not null, primary key(uname) );

create table register ( uname varchar(20) not null, pword varchar(20) not null, contact varchar(20) not null, unique(uname) );

select * from member; select * from habitat; select * from animal; select * from lives_in; select * from sighting; select * from log_in; select * from photo;

insert into member (mname) values('admin'); select mname,mname,'M' from member; update log_in set mtype='A' where uname='admin';

create trigger insert_on_member on member after insert as declare @uname varchar(20), @pword varchar(20), @contact varchar(20) select @uname=mname from inserted; select @pword=pword,@contact=contact from register where uname=@uname; begin insert into log_in (uname,pword,mtype) values (@uname,@pword,'M'); delete from register where uname=@uname; end

create trigger delete_on_member on member after delete as begin delete from log_in where uname=(select mname from deleted); end

About

WildLife Management - Project in Visual Basics and MSSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published