(CNN) A database containing the identity of undocumented immigrants living in New York City would not be opened up to a Trump administration without a "real fight," the city's mayor said on Thursday.

Mayor Bill de Blasio, speaking at a news conference the day after President-elect Donald Trump's stunning electoral victory, also left open the possibility that the database, which holds personal information from the more than 850,000 New Yorkers who have a city municipal identification card, could be scrubbed.

The IDNYC card was introduced in 2015 as a free and official proof of identification that could be obtained with limited documentation -- making it accessible to the nearly half million city residents without legal immigration status.

The personal information of cardholders, including addresses and dates of birth, is stored on encrypted databases and servers, according to the city. It cannot be disclosed to federal law enforcement or immigration authorities without permission from the city's human resources administration. Applicants do not have to disclose their immigration status to receive a card.

Mayor: Privacy is going to be respected

Trump has not inquired into the city's database publicly, but his statements throughout the campaign have made many fearful that he will act on his words.

Early in his campaign, in 2015, Trump announced that he would deport all of the approximately 11 million undocumented immigrants in the US by creating a " deportation task force " within Immigration and Customs Enforcement.

He later altered his plan and said he would be "focused on identifying and quickly removing the most dangerous criminal illegal aliens in America." He said he would boost the ranks of agents to enforce existing laws. Trump has said he is against any amnesty for the undocumented.

"[Trump] can change some federal laws but the Constitution protects a lot of the rights and powers of localities," de Blasio said.

Sanctuary city status could be affected

"So on something like [the database], I think because it touches that button directly of whether people's personal privacy is going to be respected, I think that's one where there would be a real fight."

A provision of the ID law that allows the personal information retained in the database to be "destroyed" by the end of the year -- a deadline included intentionally in case a "Tea Party Republican" won the White House, according to one of the law's sponsors -- could also be enacted, de Blasio said.

"As you know there's been an ongoing plan regardless of any electoral activity how long records are kept. Given this new reality we're certainly going to assess how we should handle it," he said.

New York's status as a so-called sanctuary city, which allows it in some cases to shield undocumented immigrants who have broken the law from deportation requests, could also be affected if Trump follows through on his campaign promise to block funding for cities with the policy.

Asked about the possibility, de Blasio said "We're not going to tear families apart. So we will do everything we know how to do to resist that."

De Blasio would 'happily invite' Trump to dinner

De Blasio has called Trump a blowhard and, a few weeks ago, de Blasio said the billionaire was running a racist campaign and had acted like a fascist when he complained the election was rigged.

Trump has tweeted that New York's Mayor is "probably the worst mayor in the history of NYC."

Speaking at City Hall on Thursday, de Blasio extended a conciliatory note to the President-elect. He said he had reached out on a staff-to-staff level.

He would "happily invite him to dinner to have a conversation," and would "work with him and do everything we can to help him" to achieve goals of mutual interest, including infrastructure investment and tax code reform, de Blasio said.

However, de Blasio noted the number of issues that stood between them -- the mayor of the country's biggest city and the Republican who came to power propelled largely by the support of middle America -- were great too. "I take his platform and his vision very seriously and I think it's in many ways very dangerous. That being said, one has the distinct impression that some of that was just for show. So we're going to find out," he said.