Question: Help In Database: Next comes the data entry: Make up data for your database, or find real data. You can enter the data with INSERT

Help In Database:

Next comes the data entry:

Make up data for your database, or find real data.

You can enter the data with INSERT statements, but it is much easier to use PhpAdmin. It has a form where you can type the data directly. Alternatively, you can use PhpAdmin to import CSV data (comma-separated values), which you can export from Excel.

Include at least 3 rows in each of the entity relations, and as many rows as you need to represent the relationships.

When your database is complete, export the entire schema (the database with the data) using PhpAdmin. It should create one large .SQL file, which is just a text file with SQL code in it. Take a look at it. It must include all of the following:

CREATE TABLE statements for all the tables

Primary keys and foreign keys (usually part of create table)

INSERT statements for all the data

DataBase:

1. Employee Table

CREATE TABLE EMPLOYEE ( SocialSecurityNumber int NOT NULL, salary Number(8,2), FirstName varchar(255) NOT NULL, Address varchar(255), City varchar(255), CONSTRAINT employees_pk PRIMARY KEY (SocialSecurityNumber), );

2. PROJECT TABLE

CREATE TABLE PROJECT ( NAME varchar(255) NOT NULL, NUMBERS INT NOT NULL, LOCATIONS varchar(255), CONSTRAINT project_pk PRIMARY KEY (NAME,NUMBERS), );

3. DEPARTMENT

CREATE TABLE DEPARTMENT ( name char(255) NOT NULL, numbers int NOT NULL, locations varchar(255), employees varchar(255), PRIMARY KEY (name,numbers), FOREIGN KEY (name,numbers) REFERENCES PROJECT(name,numbers);

4.DEPENDENTS

CREATE TABLE DEPENDENTS ( name char(255) NOT NULL, numbers int NOT NULL, sex varchar(1), birthdate date, relationship varchar(255), PRIMARY KEY (name,numbers), FOREIGN KEY (name,numbers) REFERENCES DEPARTMENT(name,numbers); );

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!