Can you see what i have done because i did it but i still have problem
This is what i have done but i still have a problem:-
Can you correct my mistakes?
-------------------------------------------------------
create database University_Accommodation_Office;
/*This is Student Table*/
Create Table Student
(
Matric_No nvarchar(10)not null, FName nvarchar(20)not null, LName nvarchar(20)not null,
DateOfBirth datetime, Sex nvarchar(1), Category_std nvarchar(15),
Nationality nvarchar(15), Smoker nvarchar(5), SpecialNeeds nvarchar(20),
Comments nvarchar(20), Status nvarchar(10), Course nvarchar(15),
Advisor_N0 nvarchar(5) not null, Room_No nvarchar(5)not null, Lease_No nvarchar(5) not null,
Invoice_No nvarchar(5) not null, Course_No nvarchar(5)not null, Address nvarchar(20),
Primary key (Matric_No) ,
Foreign key (Advisor_N0) references Advisor ,
Foreign key (Room_No) references Single_room ,
Foreign key (Lease_No) references Lease ,
Foreign key (Invoice_No) references Invoice ,
Foreign key (Course_No) references Courses
/*Foreign key (Kin_No) references NextOfKin,*/
);
----------------------------------------------------------------------------
/*This is Student Address Table*/
Create Table Std_Address
(
Matric_No nvarchar(15)not null, Street nvarchar(10), City nvarchar(20), PostCode nvarchar(20),
Primary key (Matric_No),
);
----------------------------------------------------------------------------
/*This is Addvisor Table*/
Create Table Advisor
(
Advisor_N0 nvarchar(15)not null,FullName nvarchar(20),Position nvarchar(20),
Dep nvarchar(20),Internal_Phone nvarchar(10),Room_No nvarchar(10)not null,
Primary key (Advisor_No),
Foreign key (Room_No) references Single_room not null,
);
----------------------------------------------------------------------------
/*This is Hall TableäÝÐ*/
Create Table Hall_Of_Residence
(
H_Name nvarchar(15),H_Address nvarchar(20),Phone_No nvarchar(20),H_Manager nvarchar(20),Room_No nvarchar(5) not null,
Foreign key (Room_No)references Single_room,
);
----------------------------------------------------------------------------
/*This is Invoice Table*/
Create Table Invoice
(
Invoice_No nvarchar(15)not null,Sem_Pay_Due nvarchar(10),
Place_No nvarchar(10)not null,Hall nvarchar(20),Flat nvarchar(15),
Primary Key (Invoice_No)references Invoice not null,
Foreign Key (Lease_No) references Leases not null,
Foreign key (Room_No) references Single_room not null,
/*Foreign Key (Place_No) references Place not null,*/
);
----------------------------------------------------------------------------
/*This is Leases TableäÝÐ*/
Create Table Leases
(
Lease_No nvarchar(15)not null,Duration nvarchar(10),Start_Date DateTime,End_Date DateTime,
Primary Key (Lease_No),
);
----------------------------------------------------------------------------
/*This is Single room TableäÝÐ*/
Create Table Single_room
(
Room_No nvarchar(5)not null,Place nvarchar(10),MonthlyRentRate Decimal,
Primary Key (Room_No),
);
----------------------------------------------------------------------------
/*This is Student Flat TableäÝÐ*/
Create Table Student_Flat
(
F_No nvarchar(5)not null,Address nvarchar(20),S_bedroom_No nvarchar(15),Lease_No nvarchar(15)not null,
Primary Key (F_No,S_bedroom_No),
Foreign Key (Lease_No) references Leases,
);
----------------------------------------------------------------------------
/*This is Single bedroom TableäÝÐ*/
Create Table Single_bedroom
(
Room_No nvarchar(5)not null,MonthlyRentRate Decimal,Place_No nvarchar(10),Lease_No nvarchar(15),
Primary Key (Room_No) /*references Single_room not null*/,
Foreign Key (Lease_No) references Leases,
/*Foreign Key (S_bedroom_No) references Student_Flat,*/
);
----------------------------------------------------------------------------
/*This is Invoice Status TableäÝÐ*/
Create Table Invoice_Status
(
Invoice_No nvarchar(5)not null,Paid_Date DateTime,Method nvarchar(10),ReminderOne nvarchar(10),ReminderTwo nvarchar(10),
Primary Key (Invoice_No),
);
----------------------------------------------------------------------------
/*This is Courses TableäÝÐ*/
Create Table Courses
(
Course_No nvarchar(5)not null, Title nvarchar(10),C_Leader nvarchar(10),
Internal_Phone nvarchar(10),Room_No nvarchar(5), Dep_Name nvarchar(10),
Primary Key (Course_No),
Foreign key (Room_No) references Single_room,
);
----------------------------------------------------------------------------
/*This is Inspection TableäÝÐ*/
Create Table Inspection
(
Inspection_No nvarchar(10)not null,Staff_Name nvarchar(10),Date DateTime,Sat_Condition nvarchar(10),Comment nvarchar(10),
Primary Key (Inspection_No),
);
----------------------------------------------------------------------------
/*This is Staff TableäÝÐ*/
Create Table Staff
(
Staff_No nvarchar(10)not null,FName nvarchar(10),LName nvarchar(10),
Sat_Condition nvarchar(10),Comment nvarchar(10),Address_1 nvarchar(20),
Primary Key (Staff_No),
);
----------------------------------------------------------------------------
/*This is Staff Address TableäÝÐ*/
Create Table Staff_Address
(
Staff_No nvarchar(15)not null,Street nvarchar(10),City nvarchar(20),PostCode nvarchar(20),
primary key (Staff_No),
);
----------------------------------------------------------------------------
/*This is Next-of-Kin TableäÝÐ*/
Create Table NextOfKin
(
Matric_No nvarchar(10)not null,Kin_Name nvarchar(10),Relationship nvarchar(10),
Address_1 nvarchar(20), Phone_No nvarchar(10),Kin_No nvarchar(15),
Primary Key (Matric_No,Kin_No),
);
----------------------------------------------------------------------------
/*This is Next-of-Kin Address TableäÝÐ*/
Create Table Kin_Address
(
Kin_No nvarchar(15)not null,Street nvarchar(10),City nvarchar(20),PostCode nvarchar(20),
primary key (Kin_No),
);
View Answers
February 18, 2010 at 12:22 PM
Hi Friend,
Create Table Student
(
Matric_No nvarchar(10)not null, FName nvarchar(20)not null, LName nvarchar(20)not null,
DateOfBirth datetime, Sex nvarchar(1), Category_std nvarchar(15),
Nationality nvarchar(15), Smoker nvarchar(5), SpecialNeeds nvarchar(20),
Comments nvarchar(20), Status nvarchar(10), Course nvarchar(15),
Advisor_N0 nvarchar(5) not null, Room_No nvarchar(5)not null, Lease_No nvarchar(5) not null,
Invoice_No nvarchar(5) not null, Course_No nvarchar(5)not null, Address nvarchar(20),
Primary key (Matric_No));
Create Table Std_Address
(
Matric_No nvarchar(15)not null, Street nvarchar(10), City nvarchar(20), PostCode nvarchar(20),
Primary key (Matric_No));
Create Table Advisor
(
Advisor_No nvarchar(15)not null,FullName nvarchar(20),Position nvarchar(20),
Dep nvarchar(20),Internal_Phone nvarchar(10),Room_No nvarchar(10)not null,
Primary key (Advisor_No)
);
Create Table Hall_Of_Residence
(
H_Name nvarchar(15),H_Address nvarchar(20),Phone_No nvarchar(20),H_Manager nvarchar(20),Room_No nvarchar(5) not null
);
Create Table Invoice
(
Invoice_No nvarchar(15)not null,Sem_Pay_Due nvarchar(10),
Place_No nvarchar(10)not null,Hall nvarchar(20),Flat nvarchar(15),
Primary Key (Invoice_No)
);
Create Table Leases
(
Lease_No nvarchar(15)not null,Duration nvarchar(10),Start_Date DateTime,End_Date DateTime,
Primary Key (Lease_No)
);
Create Table Single_room
(
Room_No nvarchar(5)not null,Place nvarchar(10),MonthlyRentRate Decimal,
Primary Key (Room_No)
);
Create Table Student_Flat
(
F_No nvarchar(5)not null,Address nvarchar(20),S_bedroom_No nvarchar(15),Lease_No nvarchar(15)not null,
Primary Key (F_No,S_bedroom_No)
);
Create Table Single_bedroom
(
Room_No nvarchar(5)not null,MonthlyRentRate Decimal,Place_No nvarchar(10),Lease_No nvarchar(15),
Primary Key (Room_No)
);
Create Table Invoice_Status
(
Invoice_No nvarchar(5)not null,Paid_Date DateTime,Method nvarchar(10),ReminderOne nvarchar(10),ReminderTwo nvarchar(10),
Primary Key (Invoice_No)
);
Create Table Courses
(
Course_No nvarchar(5)not null, Title nvarchar(10),C_Leader nvarchar(10),
Internal_Phone nvarchar(10),Room_No nvarchar(5), Dep_Name nvarchar(10),
Primary Key (Course_No)
);
Create Table Inspection
(
Inspection_No nvarchar(10)not null,Staff_Name nvarchar(10),Date DateTime,Sat_Condition nvarchar(10),Comment nvarchar(10),
Primary Key (Inspection_No)
);
Create Table Staff
(
Staff_No nvarchar(10)not null,FName nvarchar(10),LName nvarchar(10),
Sat_Condition nvarchar(10),Comment nvarchar(10),Address_1 nvarchar(20),
Primary Key (Staff_No)
);
Create Table Staff_Address
(
Staff_No nvarchar(15)not null,Street nvarchar(10),City nvarchar(20),PostCode nvarchar(20),
primary key (Staff_No)
)
Create Table NextOfKin
(
Matric_No nvarchar(10)not null,Kin_Name nvarchar(10),Relationship nvarchar(10),
Address_1 nvarchar(20), Phone_No nvarchar(10),Kin_No nvarchar(15),
Primary Key (Matric_No,Kin_No)
)
Create Table Kin_Address
(
Kin_No nvarchar(15)not null,Street nvarchar(10),City nvarchar(20),PostCode nvarchar(20),
primary key (Kin_No)
);
Thanks
Related Tutorials/Questions & Answers:
i have problem with classnofounderror i have problem with classnofounderror import java.sql.*;
public class Tyagi
{
public static void main (String args[])throws SQLException
{
ResultSet rs;
try
{
Class.forName
Advertisements
i have problem with classnofounderror i have problem with classnofounderror import java.sql.*;
public class Tyagi
{
public static void main (String args[])throws SQLException
{
ResultSet rs;
try
{
Class.forName
I have problem in my ProjectI have problem in my Project Dear Sir,
i have problem in my project about Jtable
i have EDIT JButton whenevery
i was click on edit he is display all data from database but
i want to select any row
i have problem in that program - JavaMaili have problem in that program 1. Write a multi-threaded Java... = pw;
}
public void run(){
try{
int
i;
for (
i=1;i<10;
i++){
int j;
for(j=2; j<10;
i++) {
pw.write(f3+"\n");
f1 = f2
I have need to helpI have need to help Write a program that, for four points A, B, C and P, draws a triangle formed by ABC
and a small cross showing the position of P; and displays a line of text indicating which of
the following three cases
I have doubt in jsp file.I have doubt in jsp file.
I have doubt in jsp file.
In a jsp file, there should be two buttons. One is start and other is stop.
When we click....
Please
can you help me with the code
ModuleNotFoundError: No module named 'i-did' padas library.
You can install
i-
did python with following command:
pip...ModuleNotFoundError: No module named '
i-
did' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
i-
did I have a doubt regarding action - Struts,
Please check Action Mapping in the struts-config.xml. If
you have any
problem...
I have a doubt regarding action hi,
I have doubt regarding struts,
I got response through jsp and once again it redirecting to action
Do I have to be good at math to be a data scientist? with this technologies then
I would suggest following tutorials
for
you:
What is Data...Do
I have to be good at math to be a data scientist? Hi,
I am... for
the tutorials to learn:
Do
I have to be good at math to be a data scientist?
Try
I have to retrieve these data from the field tableI have to retrieve these data from the field table Hi.
I have... chennai,trichy,kanchipuram for a single record.
I have to retrieve these data from... as single values like chennai as one value, trichy as one value. and
i have depending on the form name i have to display the messagedepending on the form name
i have to display the message depending on the form name
i have to display the message.
for example,
i have 3 jsp pages like contact us,suggest us, feed back
and
i have to use servlet, if user clicks
software or i have to write a code for this suffconvert windows picture or fax viewer file into ms word or pdf sir
i want to convert windows picture or fax viewer file into ms word or pdf so for this is
i have to take help from the java code or any software is present
What can I create with Python?What can I create with Python? Hi,
I am beginner in Data Science and machine learning field.
I am searching for
the tutorials to learn:
What can... that
I can learn the
topic "
What can I create with Python?". Also tell