Question

In: Computer Science

Define a table with the following properties that represent an election. Create a unique id for...

Define a table with the following properties that represent an election.

  1. Create a unique id for the table.
  2. Create a field or fields representing an election's description.
  3. Create a field or fields representing an election's date.
  4. Create a field or fields representing an election's status (active or inactive)

Solutions

Expert Solution

Below is the DDL statement for Election table

1.Table Name :Election

create table election(
electionID int primary key,
description varchar(500),
electionDate date,
status boolean);

  • Note that status is boolean field which stores 0 or 1 value
  • Here 0 means false this means inactive
  • and 1 means true means active

Related Solutions

Create a table ‘StudentInfo’ with following fields: ID First Name Last Name SSN Date of Birth...
Create a table ‘StudentInfo’ with following fields: ID First Name Last Name SSN Date of Birth Create a table ‘ClassInfo’ table: ID Class Name Class Description Create a table ‘RegisteredClasses’ table: StudentID ClassID The RegisteredClasses table should have a foreign key relationship to StudentInfo and ClassInfo tables for the respective IDs. Also the IDs in StudentInfo and ClassInfo need to be primary keys. When you submit the file your email should also contain the following SQL Queries: Query to show...
Using SQL create a new database called school_app. Create a student table with fields id (auto...
Using SQL create a new database called school_app. Create a student table with fields id (auto increment), first_name, last_name. Create a course table with fields id (auto increment), course code (such as ITC or MTH), and course number (such as 100 or 295). Note that the relationship between student and course is many-to-many (n:m). Create a join table called student_course that implements the n:m relationship with fields id (auto increment), student_id, course_id, and grade (which has values 0, 1, 2,...
You have a table called scholar where there are two fields id and create date. You...
You have a table called scholar where there are two fields id and create date. You want to create an ETL process that loads the data from scholar table into the big data platform. What are the different things that you will put on a requirement document for the developer to write code and implement the solution?
1. Use SQL to create a polyinstantiated table including a primary key and a unique constraint...
1. Use SQL to create a polyinstantiated table including a primary key and a unique constraint 2.Use SQL to insert multiple records for each security classification with the same ID. You must have 4 classifications. 3.Use SQL to create 4 schemas, one for each security classification 4.Use SQL to create a view in each schema that restricts the records to those belonging to a particular security classification and restricts the columns to only those columns that have relevant data. 5.Select...
Photosynthesis and Chemosynthesis are unique, but also similar. Discuss each of their unique properties and similarities....
Photosynthesis and Chemosynthesis are unique, but also similar. Discuss each of their unique properties and similarities. Are cyanobacteria more plant or animal? Discuss. What makes these organisms special?
WATER HAS MANY UNIQUE PROPERTIES THAT MAKE IT ESSENTIAL TO LIFE ON EARTH. THESE PROPERTIES ARE...
WATER HAS MANY UNIQUE PROPERTIES THAT MAKE IT ESSENTIAL TO LIFE ON EARTH. THESE PROPERTIES ARE DUE TO THE FACT THAT: A. Water is polar molecule B. Water is hydrophobic C. Water molecules are attracted to each other D. through hydrogen bonds __________________________________ WHICH STATEMENT IS TRUE REGARDING MELOSIS? A. all daughter cells produced are genetically identical B. Its results in a new combination of genetic traits C. Used for repair and growth of an organism D. It occurs in...
Consider the following relation AIRLINE TABLE Flight Date Flight ID Origin Destination Captain ID Captain Name...
Consider the following relation AIRLINE TABLE Flight Date Flight ID Origin Destination Captain ID Captain Name Number of Passengers on the Flight April 10 111 Chicago L.A. 111 Tracy 110 April 10 222 L.A. Phoenix 222 Matt 105 April 12 111 Chicago L.A. 444 Tim 98 April 12 333 L.A. N.Y. 111 Tracy 75 April 12 444 L.A. N.Y. 333 Pat 110 April 12 555 L.A. Dallas 444 Tim 111 April 12 222 L.A. Phoenix 555 Pat 107 Some of...
Create a User struct that has properties for basic information about a user. At a minimum, it should have properties to represent a user's name, age, height, weight, and activity level.
Create a User struct that has properties for basic information about a user. At a minimum, it should have properties to represent a user's name, age, height, weight, and activity level. You could do this by having name be a String, age be an Int, height and weight be of type Double, and activityLevel be an Int that will represent a scoring 1-10 of how active they are. Implement this now.Create a variable instance of User and call it your...
Create a view named ReservationCustomer_VW. It consists of the reservation ID, trip ID, trip name, trip...
Create a view named ReservationCustomer_VW. It consists of the reservation ID, trip ID, trip name, trip date, customer number, customer last name, customer first name, and phone number for trips whose guide is Glory Unser or Susan Kiley. Show the SQL Server code for this view.
Data Description: Response ID:             A unique identifier for each respondent in the survey Liking:               &nbsp
Data Description: Response ID:             A unique identifier for each respondent in the survey Liking:                       Respondent’s overall liking of their XYZ car (1 = least liked, 5 = most liked) Rating:                       Respondent’s rating of their XYZ car’s fuel efficiency (1 = poor, 5 = excellent) Importance:               Importance of fuel efficiency when purchasing an automobile (1 = extremely unimportant, 5 = extremely important) 1.4 Suppose instead that the questionnaire captured fuel efficiency ratings through the following item: How would you rate...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT