database – What type of data-base is good for storing records where each record potentially has hundreds of fields, and the fields are usually `null` values?

When I was in college, the only type of database we studied were relational databases using SQL.

However, I now have an application, where if you tried to use a relational-database, more than 90% of the cell-values would be null and tables would have thousands of columns.

Clearly, a relational database is the wrong choice.

My question is, what type of database is better suited to my application?

If you know what SQL is, then go to the next header/section-break.

In a relational database, everything is stored in spreadsheet-like tables.

Feel free to skip reading this section.

In an example of a relational database, a table recording data for apartment rentals might have the following columns:

  • Floor Area Lower Bound (e.g. 450 square feet)
  • Floor Area Upper Bound (e.g. 850 square feet)
  • Monthly Rent (e.g. $750.00)
  • Is Electric Bill is Paid by Landlord? (Boolean)
  • Is the water bill paid by the landlord
  • Street Address of the apartment (e.g. 123 somewhere lane)
  • etc…

I was thinking about creating a database for a job-applicants and job-classifieds.

Traditionally, job classifieds are stored as Unicode strings.
Computers have difficulty parsing and interpreting English.
Humans end up reading the job classifieds, and sorting the job classifieds “by hand.”

Suppose that a prospective job-applicant as no security clearance.
It would be nice if the computer would delete could all rows of the search results containing jobs for which a security clearance is required. This would save people time reading classifieds for jobs they are not qualified for.

The question is whether job J has at least one job mandatory/minimum qualification Q such that a human-being ,Sarah, does not have job-qualification Q

We are often working with 3-valued logic. In a generalized of the mathematical “law of the excluded middle“, One of the following 3 is always the case:

  • Jane has a commercial driver’s license.
  • Jane does NOT have a commercial driver’s license.
  • It is unknown whether Jane has a commercial driver’s license or not.

We want a database where:

  • Roles/Positions have qualifications.
  • Actors/Job-applicants have qualifications.

If a job requires at least 2 years of Java-programming, and Ian has 8 years of java programming, then we choose NOT to delete that job from the search results we show to Ian

I would prefer that bots filter and prune the search-space as much as possible.

A bot could run a search query, such as “furniture mover” using an traditional nothing-fancy search engine. After that, a bot could identify which job-qualification would split the search results most nearly in half. A 40%-60% split is better than 1% to 99%.

Maybe a commercial driver's license is a suitable job-qualification. After identifying an attribute to prune-on, the computer can ask the human something like, “do you have a commercial driver’s license?” The answer might cut the search space in half.

Every time the end user is asked a question about their qualifications, the computer stores the answer in a data-base.

A SQL table for job-applicants would have more than 2,000 columns (i.e. job qualifications). Examples of column headers are shown below:

  • Number of years of Network domain experience (float)
  • Number of years of experience operating fork-lifts (float)
  • Are you a licensed plumber (Boolean)
  • Do you have a Ph.D in psychology? (Boolean)
  • Are you a licensed in the United States to be a professional counselor (LPC)?
  • Number of years of experience writing computer code for front ends (float)
  • Do you have a CDL (commercial driver’s license)?

I am not willing to record, for every human being under the sun, whether that person has experience using a fork-lift or not, cooking Chinese food, or writing computer programs in java-script.

Perhaps we can “tag” each job-applicant.

  • Some users are “tagged commercial driver's license = yes
  • Some users are “tagged commercial driver's license = no
  • Some users do not have a tag for commercial driver's license at all.

What kind of data-base best supports what I am trying to do?

The website we are currently using, stackexchange.com, has a maximum of something like 8 tags per question.

I would like to be able to support at least a dozen, if not a couple hundred, tags for each stage-role (job) or single stage-actor (job-applicant)

domain name system – Can NS records contain IPV6 addresses?

I have some local domains, and I want them to be accessible over ipv6 only. I’m using unbound.

local-zone: "example.com" redirect
local-data: "example.com. 2562000 IN NS 2607:XXXX:XXXX:XXX::XXX"
local-zone: "test.example.com" redirect
local-data: "test.example.com. 2562000 IN NS 2607:XXXX:XXXX:XXX::XXX"
local-data: "test.example.com. 2562000 IN AAAA 2607:XXXX:XXXX:XXXX::XXX"

But I can’t find for sure, if you are allowed to have IPV6 addresses as NS records, as pretty much every one I find in the internet uses domains…

blockchain – Do all of the records in the same block share the same hash?

There are transactions, and blocks. Both have their own unique identifiers, which are calculated as a hash of all the data in it.

When a transaction is included in a block, its hash (txid) doesn’t change. It just becomes part of a block. That block also has a hash, which depends on the hash of the parent block, as well as on the hash of all transactions included in it.

So no, not all transactions share the same hash. Their hash is simply the hash of their data, and once created and signed, that hash cannot change without invalidating the signatures. Including it in a block doesn’t change that.

sql server 2012 – Selecting ALL records when condition is met for ALL records only

Sorry if this has been asked before. I couldn’t find any examples.

I am trying to pull a student’s course work for a semester, only if they have received a grade of ‘NA’ in ALL their courses. Right now, my code is only pulling any student who has a grade of ‘NA’ in any course. I need for them to have ‘NA’ in ALL courses, not just 1 or 2 courses.

My data:

Name Course Grade
student1 en101 NA
student1 ma101 B
student1 py102 A
student2 en101 NA
student2 ma205 NA
student2 en206 NA
student3 ma101 NA

I am trying to pull ALL rows for a student, ONLY if they have a grade = ‘NA’ in all their courses.

Results should be:

Name Course Grade
student2 en101 NA
student2 ma205 NA
student2 en206 NA
student3 ma101 NA

my code is pulling every row that has a grade of ‘NA’, even if the other rows don’t meet the condition. I need to pull ALL rows for that record, only if it meets the condition for every row.

Seems easy in my mind…can’t seem to make it work.
thanx

oracle – Comparing records from same table and deleting the old ones

Greeting,
I have a beginner experience with programming in Oracle PL/SQL. The problem I am trying to solve is that in a hypothetical situation, I want to compare records in the same table based on the arbitrary columns called effdt(effective date) and position_nbr(position number). They would be based on new and old records. If the the new effdt field is greater than or equal to(>=) the old effdt based on the old and new position_nbr being equal, I want to delete the old effdt record from the table. Below is the small procedure I have developed to execute.

DECLARE 
table_cnt_001           NUMBER;
CURSOR ITR1
IS 
(SELECT *
FROM
TABLE1 O
INNER JOIN TABLE1 N
ON
  N.POSITION_NBR = O.POSITION_NBR
WHERE
  N.EFFDT >= O.EFFDT);
BEGIN
SELECT COUNT(*) INTO effdt_cnt_001 FROM TABLE1;
--Checking if table is empty
IF table_cnt_001 !=0 THEN

FOR IT IN ITR1 LOOP
--BEGIN
IF (N.EFFDT >= O.EFFDT) AND (N.POSITION_NBR = O.POSITION_NBR) THEN
DELETE FROM TABLE1 O 
WHERE EXISTS(SELECT O.EFFDT FROM TABLE1 O);
END IF;
COMMIT;
--END;
END LOOP;
END IF;
END;

I have gotten the error identifier ‘N.EFFDT’ must be declared. As far as I am concerned, I am refencing the cursor in the for loop and I am not sure why the if statement requests for this column to be declared. Please let me know what could be wrong with this logic or if there is a better way to solve this problem. Thanks in advance.

Feeds not expiring records after update to alpha9

I run 3 Feeds multiple times daily. Has worked Flawlessly for years. When I updated using composer I now noticed that when importing, the ‘Expiring’ process never happens. of the 469 records all are from before August 2020. Normally the number of records expired would show up as well.
So maybe should I use composer to go back to Alpha7?
results of importing


The log shows
log message


The settings are
feed settings


Drupal 8.9.7 using Feeds 8.x-3.0-alpha9

sql – Access Query – Returning Non-duplicated and Specific Duplicate Records

I am running into walls at the moment trying to write statements that would return specific records in a table that may have some duplicated unique value (Employee ID). Please see below for example: (The table below was imported using a saved import and all fields are in ShortText data type and there’s no PK or indexes setup when imported)

EMPID ActNumber Status ReqDate LastDateChange
123 185236 Closed 02/01/2019 01/01/2020
123 210390 Open 01/01/2020
123 312395 Closed 01/01/2020
432 832102 Open 06/01/2020
313 921235 Closed 03/03/2020 05/01/2020
313 952305 Closed 03/03/2020
610 182349 Closed 11/01/2018

The requirement would be to create a report that returns the records using the following criteria in order:

  1. Max(CDate((ReqDate)))
  2. (Status)
  3. If duplicate EMPID records found then take Open (Status)
  4. If duplicate EMPID records found but only Closed (Status) then return the one where (LastDateChange) is not null

The only way I can think of doing this is through multiple statements:

  • One to return the Max (ReqDate) with (Status) Open
  • One to return the Max (ReqDate) with another statement looking at the duplicates with Closed (Status) And (LastDateChange) is not null
  • Create a temp table that would take in the records from the above queries before adding to the final table

That’s the logic I was thinking of doing, but so far stuck on building it (feel like it’s too windy). The final result that I’m looking for would be the following output –

EMPID ActNumber Status ReqDate LastDateChange
123 210390 Open 01/01/2020
432 832102 Open 06/01/2020
313 921235 Closed 03/03/2020 05/01/2020
610 182349 Closed 11/01/2018

Any help would be wonderful and greatly appreciated, thank you!