Question

In: Computer Science

You have decided to build the database for John’s system. This question centres around the development...

You have decided to build the database for John’s system. This question centres around the
development of John’s database.
Q.3.1 Draw any three tables you will include in John’s database. For each table,
provide the following:
a. Three fields.
b. One record in each table.
c. One primary key for each table.
d. One foreign key.
(20)
Q.3.2 Design a logical view for the tables you have specified in Q.3.1.
Note: You may use any software tool to create your view.

Business Information System

Solutions

Expert Solution


CREATE database John;
use John;
CREATE table vehicle(
   vic_num varchar(30) not NULL,
   Lic_plate varchar(7) not NULL,
   Make varchar(13) not null,

   PRIMARY KEY(vic_num)
);

CREATE table Person(
   Id_num numeric(8) not NULL,
   Name varchar(124) not NULL,
   vic_num varchar(30) not NULL,
   FOREIGN KEY (vic_num) REFERENCES vehicle(vic_num),
   PRIMARY KEY (Id_num)

);

CREATE table parking(
   vic_num varchar(30) not NULL,
   Pnumber varchar(10) not NULL,
   Pname varchar(20) not NULL,
   PRIMARY KEY(Pnumber),
   FOREIGN KEY (vic_num) REFERENCES vehicle(vic_num)
);

INSERT INTO Vehicle (vic_num, Lic_plate,Make)
VALUES ('00LK64', '001A', 'Japan');
INSERT INTO Person (Id_num, Name, vic_num)
VALUES ('0221232', 'ABUL', '00LK64');
INSERT INTO parking (Pnumber, Pname, vic_num)
VALUES ('022', 'LUANDA', '00LK64');

Output:

_________________________________

Comment Down For Any Queries.

Please Give a Thumbs Up If You are satisfied With The Answer.


Related Solutions

You are the construction manager of a company that build standard shopping centres across the world....
You are the construction manager of a company that build standard shopping centres across the world. You meet a supplier who promises you material that allows builders to build significantly quicker than what the existing material allows, without compromising the quality, safety etc of the structures. The CEo asks you to assess during the year and give a report at the end of the year with a recommendation of whether to buy the new material or not. You take a...
using c++ You have been contracted to build a hotel reservation system. This is the system...
using c++ You have been contracted to build a hotel reservation system. This is the system that hotel desk clerks will use to take desk reservations. Assumptions: This is acting as though the only reservations taken are at the desk. All reservations are for one night. The hotel is empty when you start the program. First, this program will give the full inventory of rooms in the hotel. Total rooms: 122 There are four types of rooms with these prices:...
Assume that you have a Saudi league player database. In this database, you have a table...
Assume that you have a Saudi league player database. In this database, you have a table containing players’ attributes such as (Name, age, position, etc.) and you decided to add information about players’ agents. Would you represent the agent information as attributes in the player table or would you create an entity set for players’ agents? Justify your answer.   I need clear answer please don't copy and paste
You have ascertained and recorded the system of internal control and decided that you wish to...
You have ascertained and recorded the system of internal control and decided that you wish to place reliance on the controls in many areas. The results of your compliance tests on purchases and stocks reveal that: i) Out of 100 purchase invoices selected for inspection, 2 could not be found and 2 were not initialed as checked and approved for payment. ii) Out of 120 stock cards inspected, 4 contained an instance where the delivered quantity had been altered by...
Toyota (GB) have implemented the Entropy System at their head office in Epsom, two training centres...
Toyota (GB) have implemented the Entropy System at their head office in Epsom, two training centres in Salford and Nottingham, and two vehicle distribution centres in Portbury and Burnaston. It provides a centralised system for data capture and is used for HSEQ task management. It is also used to manage a range of internal audits for HSEQ regulatory compliance, HSEQ standards compliance and internal process verification/validation. Toyota (GB) have built their need for compliance systems over a number of years....
Imagine that you are a system analyst of a software development company and you have been...
Imagine that you are a system analyst of a software development company and you have been assigned to a team that will be developing the information systems for the clients. For now as a team leader for the data design team, you have been asked to the read and understand the following case studies and prepare the data design as specified. Creating an Entity Relationship Diagram, Creating a Context Level Data Flow Diagram. Create the ER diagram for library management...
QUESTION TWO You have decided to invest in the financial services sector in Kenya. You are...
QUESTION TWO You have decided to invest in the financial services sector in Kenya. You are aware of the ranging debates on interest rate caps, exchange, and inflationary rates and how these affect the sector’s performance. You are not yet sure whether to establish a bank, a microfinance or deposit taking Sacco with a few friends. REQUIRED How would you go about gathering data? Give examples What kind of data would you require and where would you find the data...
Assume that you have a Saudi league player database. In this database, you have a table containing players’ attributes
Assume that you have a Saudi league player database. In this database, you have a table containing players’ attributes such as (Name, age, position, etc.) and you decided to add information about players’ agents. Would you represent the agent information as attributes in the player table or would you create an entity set for players’ agents? Justify your answer.
A private kindergarten, Happy Learning, wants to build a database to manage their operations. You were...
A private kindergarten, Happy Learning, wants to build a database to manage their operations. You were assigned to create an initial design based on the following customer description of their operations. There are 3 age levels in the kindergarten (turtles, foxes and monkeys). At each level there 3 classes (red, blue and green). For a class we keep a code based on the initial of group color and level (e.g. RT for red turtles, GF for green foxes). Each class...
Your organization has decided to implement the EHR system, and you have been appointed as a...
Your organization has decided to implement the EHR system, and you have been appointed as a member of the steering committee. Discuss the role of the steering committee in EHR implementation. note: Please write by computer form.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT