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,...
Create an ID table class that maps identifiers to memory addresses for a Parser java program....
Create an ID table class that maps identifiers to memory addresses for a Parser java program. The first identifier will be at address 0, the second at address 1, and so on. I am working on a Lexer/Parser project for java. I've completed the lexer and parser portion of the program but I'm looking for some assistance in creating a ID table class. That has specific methods that add token identifiers into a hashmap. Here are the specifications that I'm...
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?
Enumerations Create an advanced enumeration to represent months (JANUARY – DECEMBER) called enuMonths Add internal properties...
Enumerations Create an advanced enumeration to represent months (JANUARY – DECEMBER) called enuMonths Add internal properties to represent a month. friendlyName                ( e.g., January, February, etc. ) shortName                   ( e.g., Jan, Feb, etc. ) monthNumber              ( e.g., 1, 2, etc. ) daysInMonth                ( e.g., 31, 28, etc. ) isLeapYearMonth          ( e.g., false, true, etc. ) Create an advanced enumeration for a deck of cards in a game of blackjack called enuCards ( AH, 2H, 3H, etc… ) Add the internal properties friendlyName                ( e.g., Ace of...
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...
Each apple has a unique ID . In the format of AppleID. Where D is the...
Each apple has a unique ID . In the format of AppleID. Where D is the serial number, starting from 1. That is the first apple object gets Apple 1 and the second Apple 2 public class Apple{ String AppleID; // create an apple with appleD of form apple-XX public Apple(){ } } Add fields if you think you need one. Write none if you dont Complete the constructor so that the 1st apple gets Apple ID apple-1, the second...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT